BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
25 #include <boost/multiprecision/integer.hpp>
30 #define MAX_NESTING (200)
65 object( uint8_t space_id, uint8_t type_id ) :
id( space_id, type_id, 0 ) {}
73 virtual std::unique_ptr<object>
clone()
const = 0;
74 virtual void move_from(
object& obj ) = 0;
76 virtual std::vector<char>
pack()
const = 0;
87 template<
typename DerivedClass>
92 std::unique_ptr<object>
clone()
const override
94 return std::make_unique<DerivedClass>( *
static_cast<const DerivedClass*
>(
this) );
99 static_cast<DerivedClass&
>(*this) = std::move(
static_cast<DerivedClass&
>(obj) );
103 std::vector<char>
pack()
const override {
return fc::raw::pack(
static_cast<const DerivedClass&
>(*
this) ); }
106 template<
typename DerivedClass, u
int8_t SpaceID, u
int8_t TypeID>
122 template<
typename DerivedClass>
149 namespace boost {
namespace multiprecision {
namespace detail {
150 template<
typename To>
151 struct is_restricted_conversion<
graphene::db::object,To> :
public mpl::true_ {};
#define FC_REFLECT_DERIVED_TEMPLATE(TEMPLATE_ARGS, TYPE, INHERITS, MEMBERS)
Use the Curiously Recurring Template Pattern to automatically add the ability to clone,...
FC_REFLECT_TYPENAME(fc::log_message)
virtual std::vector< char > pack() const =0
static constexpr uint8_t type_id
virtual void move_from(object &obj)=0
annotation_map annotations
void set_annotation(object_id_type id)
virtual fc::variant to_variant() const =0
void move_from(object &obj) override
virtual std::unique_ptr< object > clone() const =0
std::vector< char > pack() const override
An object that is easily extended by providing pointers to other objects, one for each space.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
fc::flat_map< uint8_t, object_id_type > annotation_map
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
static constexpr uint8_t space_id
object_id< SpaceID, TypeID > get_id() const
object_id_type get_annotation(uint8_t annotation_id_space) const
std::unique_ptr< object > clone() const override
virtual ~object()=default
void pack(Stream &s, const flat_set< T, A... > &value, uint32_t _max_depth)
fc::variant to_variant() const override
base for all database objects