CatapultServer  v0.5.0.1 (Elephant)
catapult::model::RegisterNamespaceTransactionBody< THeader > Struct Template Reference

Binary layout for a register namespace transaction body. More...

Inheritance diagram for catapult::model::RegisterNamespaceTransactionBody< THeader >:
Collaboration diagram for catapult::model::RegisterNamespaceTransactionBody< THeader >:

Public Member Functions

 RegisterNamespaceTransactionBody ()
 
bool IsRootRegistration () const
 Returns true if this transaction registers a root namespace. More...
 
bool IsChildRegistration () const
 Returns true if this transaction registers a child namespace. More...
 

Static Public Member Functions

static constexpr uint64_t CalculateRealSize (const TransactionType &transaction) noexcept
 Calculates the real size of register namespace transaction. More...
 

Public Attributes

model::NamespaceType NamespaceType
 Type of the registered namespace. More...
 
union {
   NamespaceId   ParentId
 
   BlockDuration   Duration
 
}; 
 
catapult::NamespaceId NamespaceId
 
uint8_t NamespaceNameSize
 Size of the namespace name. More...
 

Private Types

using TransactionType = RegisterNamespaceTransactionBody< THeader >
 

Static Private Member Functions

template<typename T >
static auto * NamePtrT (T &transaction)
 

Detailed Description

template<typename THeader>
struct catapult::model::RegisterNamespaceTransactionBody< THeader >

Binary layout for a register namespace transaction body.

Member Typedef Documentation

◆ TransactionType

template<typename THeader >
using catapult::model::RegisterNamespaceTransactionBody< THeader >::TransactionType = RegisterNamespaceTransactionBody<THeader>
private

Constructor & Destructor Documentation

◆ RegisterNamespaceTransactionBody()

template<typename THeader >
catapult::model::RegisterNamespaceTransactionBody< THeader >::RegisterNamespaceTransactionBody ( )
inline

Creates a register namespace transaction body.

Note
Explicit default constructor is needed because body contains a union.

Member Function Documentation

◆ CalculateRealSize()

template<typename THeader >
static constexpr uint64_t catapult::model::RegisterNamespaceTransactionBody< THeader >::CalculateRealSize ( const TransactionType transaction)
inlinestaticconstexprnoexcept

Calculates the real size of register namespace transaction.

◆ IsChildRegistration()

template<typename THeader >
bool catapult::model::RegisterNamespaceTransactionBody< THeader >::IsChildRegistration ( ) const
inline

Returns true if this transaction registers a child namespace.

◆ IsRootRegistration()

template<typename THeader >
bool catapult::model::RegisterNamespaceTransactionBody< THeader >::IsRootRegistration ( ) const
inline

Returns true if this transaction registers a root namespace.

◆ NamePtrT()

template<typename THeader >
template<typename T >
static auto* catapult::model::RegisterNamespaceTransactionBody< THeader >::NamePtrT ( T &  transaction)
inlinestaticprivate

Member Data Documentation

◆ @3

union { ... }

◆ Duration

template<typename THeader >
BlockDuration catapult::model::RegisterNamespaceTransactionBody< THeader >::Duration

Number of blocks for which the namespace should be valid.

Note
This field is only valid when NamespaceType is Root.

◆ NamespaceId

Id of the namespace.

Note
This must match the generated id.

◆ NamespaceNameSize

template<typename THeader >
uint8_t catapult::model::RegisterNamespaceTransactionBody< THeader >::NamespaceNameSize

Size of the namespace name.

◆ NamespaceType

Type of the registered namespace.

◆ ParentId

template<typename THeader >
NamespaceId catapult::model::RegisterNamespaceTransactionBody< THeader >::ParentId

Id of the parent namespace.

Note
This field is only valid when NamespaceType is Child.

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