From 9e46ed80a016e143f42e4663d134541b996ff088 Mon Sep 17 00:00:00 2001 From: theoreticalbts Date: Mon, 15 Jun 2015 19:39:32 -0400 Subject: [PATCH] Reflect many more types --- libraries/chain/include/graphene/chain/operations.hpp | 1 + libraries/chain/include/graphene/chain/types.hpp | 2 ++ .../include/graphene/chain/vesting_balance_object.hpp | 2 ++ libraries/chain/include/graphene/chain/worker_object.hpp | 2 ++ libraries/db/include/graphene/db/object.hpp | 7 ++++--- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libraries/chain/include/graphene/chain/operations.hpp b/libraries/chain/include/graphene/chain/operations.hpp index 6e9744ac..a6ea5f09 100644 --- a/libraries/chain/include/graphene/chain/operations.hpp +++ b/libraries/chain/include/graphene/chain/operations.hpp @@ -1571,4 +1571,5 @@ FC_REFLECT( graphene::chain::custom_operation, (fee)(payer)(required_auths)(id)( FC_REFLECT( graphene::chain::void_result, ) FC_REFLECT_TYPENAME( graphene::chain::operation ) +FC_REFLECT_TYPENAME( graphene::chain::operation_result ) FC_REFLECT_TYPENAME( fc::flat_set ) diff --git a/libraries/chain/include/graphene/chain/types.hpp b/libraries/chain/include/graphene/chain/types.hpp index a4d2b089..828c344e 100644 --- a/libraries/chain/include/graphene/chain/types.hpp +++ b/libraries/chain/include/graphene/chain/types.hpp @@ -576,6 +576,8 @@ FC_REFLECT( graphene::chain::chain_parameters, (worker_budget_per_day) ) +FC_REFLECT_TYPENAME( graphene::chain::share_type ) + FC_REFLECT_TYPENAME( graphene::chain::key_id_type ) FC_REFLECT_TYPENAME( graphene::chain::account_id_type ) FC_REFLECT_TYPENAME( graphene::chain::asset_id_type ) diff --git a/libraries/chain/include/graphene/chain/vesting_balance_object.hpp b/libraries/chain/include/graphene/chain/vesting_balance_object.hpp index 3d6ff6fb..22c10b67 100644 --- a/libraries/chain/include/graphene/chain/vesting_balance_object.hpp +++ b/libraries/chain/include/graphene/chain/vesting_balance_object.hpp @@ -149,6 +149,8 @@ FC_REFLECT(graphene::chain::cdd_vesting_policy, (coin_seconds_earned_last_update) ) +FC_REFLECT_TYPENAME( graphene::chain::vesting_policy ) + FC_REFLECT_DERIVED(graphene::chain::vesting_balance_object, (graphene::db::object), (owner) (balance) diff --git a/libraries/chain/include/graphene/chain/worker_object.hpp b/libraries/chain/include/graphene/chain/worker_object.hpp index 5306d41d..fe9fe842 100644 --- a/libraries/chain/include/graphene/chain/worker_object.hpp +++ b/libraries/chain/include/graphene/chain/worker_object.hpp @@ -188,6 +188,8 @@ FC_REFLECT( graphene::chain::refund_worker_type, (total_burned) ) FC_REFLECT( graphene::chain::refund_worker_type::initializer, ) FC_REFLECT( graphene::chain::vesting_balance_worker_type, (balance) ) FC_REFLECT( graphene::chain::vesting_balance_worker_type::initializer, (pay_vesting_period_days) ) +FC_REFLECT_TYPENAME( graphene::chain::worker_type ) +FC_REFLECT_TYPENAME( graphene::chain::worker_initializer ) FC_REFLECT_DERIVED( graphene::chain::worker_object, (graphene::db::object), (worker_account) (work_begin_date) diff --git a/libraries/db/include/graphene/db/object.hpp b/libraries/db/include/graphene/db/object.hpp index 81458477..16ff3fba 100644 --- a/libraries/db/include/graphene/db/object.hpp +++ b/libraries/db/include/graphene/db/object.hpp @@ -93,6 +93,8 @@ namespace graphene { namespace db { virtual vector pack()const { return fc::raw::pack( static_cast(*this) ); } }; + typedef flat_map annotation_map; + /** * @class annotated_object * @brief An object that is easily extended by providing pointers to other objects, one for each space. @@ -117,12 +119,11 @@ namespace graphene { namespace db { * Annotations should be accessed via get_annotation and set_annotation so * that they can be maintained in sorted order. */ - flat_map annotations; + annotation_map annotations; }; } } // graphene::db +FC_REFLECT_TYPENAME( graphene::db::annotation_map ) FC_REFLECT( graphene::db::object, (id) ) FC_REFLECT_DERIVED_TEMPLATE( (typename Derived), graphene::db::annotated_object, (graphene::db::object), (annotations) ) - -