BitShares-Core  6.1.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
graphene::db::object_id< SpaceID, TypeID > Struct Template Reference

#include <object_id.hpp>

Public Member Functions

 object_id ()=default
 
 object_id (const fc::unsigned_int &i)
 
 object_id (uint64_t i)
 
 object_id (const object_id_type &id)
 
void validate () const
 
object_idoperator= (const object_id_type &o)
 
 operator object_id_type () const
 
 operator uint64_t () const
 
template<typename DB >
auto operator() (const DB &db) const -> const decltype(db.get(*this))&
 
 operator std::string () const
 

Static Public Member Functions

static constexpr object_id max ()
 

Public Attributes

fc::unsigned_int instance
 

Static Public Attributes

static constexpr uint8_t type_bits = 8
 
static constexpr uint8_t instance_bits = 48
 
static constexpr uint64_t max_instance = 0x0000ffffffffffff
 
static constexpr uint8_t space_id = SpaceID
 
static constexpr uint8_t type_id = TypeID
 
static constexpr uint16_t space_type = uint16_t(uint16_t(space_id) << type_bits) | uint16_t(type_id)
 

Friends

object_id operator+ (const object_id &a, int64_t delta)
 
bool operator== (const object_id &a, const object_id &b)
 
bool operator!= (const object_id &a, const object_id &b)
 
bool operator== (const object_id_type &a, const object_id &b)
 
bool operator!= (const object_id_type &a, const object_id &b)
 
bool operator== (const object_id &a, const object_id_type &b)
 
bool operator!= (const object_id &a, const object_id_type &b)
 
bool operator== (const object_id &a, const fc::unsigned_int &b)
 
bool operator!= (const object_id &a, const fc::unsigned_int &b)
 
bool operator== (const fc::unsigned_int &a, const object_id &b)
 
bool operator!= (const fc::unsigned_int &a, const object_id &b)
 
bool operator< (const object_id &a, const object_id &b)
 
bool operator> (const object_id &a, const object_id &b)
 
size_t hash_value (const object_id &v)
 

Detailed Description

template<uint8_t SpaceID, uint8_t TypeID>
struct graphene::db::object_id< SpaceID, TypeID >

Definition at line 103 of file object_id.hpp.

Constructor & Destructor Documentation

◆ object_id() [1/4]

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::object_id ( )
default

◆ object_id() [2/4]

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::object_id ( const fc::unsigned_int i)
inlineexplicit

Definition at line 120 of file object_id.hpp.

◆ object_id() [3/4]

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::object_id ( uint64_t  i)
inlineexplicit

Definition at line 124 of file object_id.hpp.

◆ object_id() [4/4]

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::object_id ( const object_id_type id)
inlineexplicit

Definition at line 128 of file object_id.hpp.

Member Function Documentation

◆ max()

template<uint8_t SpaceID, uint8_t TypeID>
static constexpr object_id graphene::db::object_id< SpaceID, TypeID >::max ( )
inlinestatic

Definition at line 114 of file object_id.hpp.

◆ operator object_id_type()

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::operator object_id_type ( ) const
inlineexplicit

Definition at line 148 of file object_id.hpp.

◆ operator std::string()

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::operator std::string ( ) const
inlineexplicit

Definition at line 172 of file object_id.hpp.

◆ operator uint64_t()

template<uint8_t SpaceID, uint8_t TypeID>
graphene::db::object_id< SpaceID, TypeID >::operator uint64_t ( ) const
inlineexplicit

Definition at line 149 of file object_id.hpp.

◆ operator()()

template<uint8_t SpaceID, uint8_t TypeID>
template<typename DB >
auto graphene::db::object_id< SpaceID, TypeID >::operator() ( const DB &  db) const -> const decltype(db.get(*this))&
inline

Definition at line 152 of file object_id.hpp.

◆ operator=()

template<uint8_t SpaceID, uint8_t TypeID>
object_id& graphene::db::object_id< SpaceID, TypeID >::operator= ( const object_id_type o)
inline

Definition at line 139 of file object_id.hpp.

◆ validate()

template<uint8_t SpaceID, uint8_t TypeID>
void graphene::db::object_id< SpaceID, TypeID >::validate ( ) const
inline

Definition at line 134 of file object_id.hpp.

Friends And Related Function Documentation

◆ hash_value

template<uint8_t SpaceID, uint8_t TypeID>
size_t hash_value ( const object_id< SpaceID, TypeID > &  v)
friend

Definition at line 170 of file object_id.hpp.

◆ operator!= [1/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator!= ( const object_id< SpaceID, TypeID > &  a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 155 of file object_id.hpp.

◆ operator!= [2/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator!= ( const object_id_type a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 157 of file object_id.hpp.

◆ operator!= [3/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator!= ( const object_id< SpaceID, TypeID > &  a,
const object_id_type b 
)
friend

Definition at line 159 of file object_id.hpp.

◆ operator!= [4/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator!= ( const object_id< SpaceID, TypeID > &  a,
const fc::unsigned_int b 
)
friend

Definition at line 161 of file object_id.hpp.

◆ operator!= [5/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator!= ( const fc::unsigned_int a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 163 of file object_id.hpp.

◆ operator+

template<uint8_t SpaceID, uint8_t TypeID>
object_id operator+ ( const object_id< SpaceID, TypeID > &  a,
int64_t  delta 
)
friend

Definition at line 145 of file object_id.hpp.

◆ operator<

template<uint8_t SpaceID, uint8_t TypeID>
bool operator< ( const object_id< SpaceID, TypeID > &  a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 165 of file object_id.hpp.

◆ operator== [1/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator== ( const object_id< SpaceID, TypeID > &  a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 154 of file object_id.hpp.

◆ operator== [2/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator== ( const object_id_type a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 156 of file object_id.hpp.

◆ operator== [3/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator== ( const object_id< SpaceID, TypeID > &  a,
const object_id_type b 
)
friend

Definition at line 158 of file object_id.hpp.

◆ operator== [4/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator== ( const object_id< SpaceID, TypeID > &  a,
const fc::unsigned_int b 
)
friend

Definition at line 160 of file object_id.hpp.

◆ operator== [5/5]

template<uint8_t SpaceID, uint8_t TypeID>
bool operator== ( const fc::unsigned_int a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 162 of file object_id.hpp.

◆ operator>

template<uint8_t SpaceID, uint8_t TypeID>
bool operator> ( const object_id< SpaceID, TypeID > &  a,
const object_id< SpaceID, TypeID > &  b 
)
friend

Definition at line 167 of file object_id.hpp.

Member Data Documentation

◆ instance

template<uint8_t SpaceID, uint8_t TypeID>
fc::unsigned_int graphene::db::object_id< SpaceID, TypeID >::instance

Definition at line 177 of file object_id.hpp.

◆ instance_bits

template<uint8_t SpaceID, uint8_t TypeID>
constexpr uint8_t graphene::db::object_id< SpaceID, TypeID >::instance_bits = 48
static

Definition at line 106 of file object_id.hpp.

◆ max_instance

template<uint8_t SpaceID, uint8_t TypeID>
constexpr uint64_t graphene::db::object_id< SpaceID, TypeID >::max_instance = 0x0000ffffffffffff
static

Definition at line 107 of file object_id.hpp.

◆ space_id

template<uint8_t SpaceID, uint8_t TypeID>
constexpr uint8_t graphene::db::object_id< SpaceID, TypeID >::space_id = SpaceID
static

Definition at line 109 of file object_id.hpp.

◆ space_type

template<uint8_t SpaceID, uint8_t TypeID>
constexpr uint16_t graphene::db::object_id< SpaceID, TypeID >::space_type = uint16_t(uint16_t(space_id) << type_bits) | uint16_t(type_id)
static

Definition at line 112 of file object_id.hpp.

◆ type_bits

template<uint8_t SpaceID, uint8_t TypeID>
constexpr uint8_t graphene::db::object_id< SpaceID, TypeID >::type_bits = 8
static

Definition at line 105 of file object_id.hpp.

◆ type_id

template<uint8_t SpaceID, uint8_t TypeID>
constexpr uint8_t graphene::db::object_id< SpaceID, TypeID >::type_id = TypeID
static

Definition at line 110 of file object_id.hpp.


The documentation for this struct was generated from the following files: