type_id.cpp: Define space_id and type_id for all object types
This commit is contained in:
parent
df60efc83c
commit
e814c4dbeb
2 changed files with 85 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ file(GLOB HEADERS "include/graphene/chain/*.hpp")
|
|||
## SORT .cpp by most likely to change / break compile
|
||||
add_library( graphene_chain
|
||||
types.cpp
|
||||
type_id.cpp
|
||||
address.cpp
|
||||
asset.cpp
|
||||
|
||||
|
|
|
|||
84
libraries/chain/type_id.cpp
Normal file
84
libraries/chain/type_id.cpp
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
#include <graphene/chain/account_object.hpp>
|
||||
#include <graphene/chain/asset_object.hpp>
|
||||
#include <graphene/chain/block_summary_object.hpp>
|
||||
#include <graphene/chain/delegate_object.hpp>
|
||||
#include <graphene/chain/global_property_object.hpp>
|
||||
#include <graphene/chain/key_object.hpp>
|
||||
#include <graphene/chain/limit_order_object.hpp>
|
||||
#include <graphene/chain/operation_history_object.hpp>
|
||||
#include <graphene/chain/proposal_object.hpp>
|
||||
#include <graphene/chain/short_order_object.hpp>
|
||||
#include <graphene/chain/transaction_object.hpp>
|
||||
#include <graphene/chain/vesting_balance_object.hpp>
|
||||
#include <graphene/chain/withdraw_permission_object.hpp>
|
||||
#include <graphene/chain/witness_object.hpp>
|
||||
#include <graphene/chain/witness_schedule_object.hpp>
|
||||
#include <graphene/chain/worker_object.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
|
||||
// C++ requires that static class variables declared and initialized
|
||||
// in headers must also have a definition in a single source file,
|
||||
// else linker errors will occur [1].
|
||||
//
|
||||
// The purpose of this source file is to collect such definitions in
|
||||
// a single place.
|
||||
//
|
||||
// [1] http://stackoverflow.com/questions/8016780/undefined-reference-to-static-constexpr-char
|
||||
|
||||
const uint8_t account_object::space_id;
|
||||
const uint8_t account_object::type_id;
|
||||
|
||||
const uint8_t asset_object::space_id;
|
||||
const uint8_t asset_object::type_id;
|
||||
|
||||
const uint8_t block_summary_object::space_id;
|
||||
const uint8_t block_summary_object::type_id;
|
||||
|
||||
const uint8_t call_order_object::space_id;
|
||||
const uint8_t call_order_object::type_id;
|
||||
|
||||
const uint8_t delegate_object::space_id;
|
||||
const uint8_t delegate_object::type_id;
|
||||
|
||||
const uint8_t force_settlement_object::space_id;
|
||||
const uint8_t force_settlement_object::type_id;
|
||||
|
||||
const uint8_t global_property_object::space_id;
|
||||
const uint8_t global_property_object::type_id;
|
||||
|
||||
const uint8_t key_object::space_id;
|
||||
const uint8_t key_object::type_id;
|
||||
|
||||
const uint8_t limit_order_object::space_id;
|
||||
const uint8_t limit_order_object::type_id;
|
||||
|
||||
const uint8_t operation_history_object::space_id;
|
||||
const uint8_t operation_history_object::type_id;
|
||||
|
||||
const uint8_t proposal_object::space_id;
|
||||
const uint8_t proposal_object::type_id;
|
||||
|
||||
const uint8_t short_order_object::space_id;
|
||||
const uint8_t short_order_object::type_id;
|
||||
|
||||
const uint8_t transaction_object::space_id;
|
||||
const uint8_t transaction_object::type_id;
|
||||
|
||||
const uint8_t vesting_balance_object::space_id;
|
||||
const uint8_t vesting_balance_object::type_id;
|
||||
|
||||
const uint8_t withdraw_permission_object::space_id;
|
||||
const uint8_t withdraw_permission_object::type_id;
|
||||
|
||||
const uint8_t witness_object::space_id;
|
||||
const uint8_t witness_object::type_id;
|
||||
|
||||
const uint8_t witness_schedule_object::space_id;
|
||||
const uint8_t witness_schedule_object::type_id;
|
||||
|
||||
const uint8_t worker_object::space_id;
|
||||
const uint8_t worker_object::type_id;
|
||||
|
||||
} }
|
||||
Loading…
Reference in a new issue