CatapultServer  v0.5.0.1 (Elephant)
Transaction.h File Reference
Include dependency graph for Transaction.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  catapult::model::Transaction
 Binary layout for a transaction. More...
 

Namespaces

 catapult
 
 catapult::model
 

Macros

#define DEFINE_TRANSACTION_CONSTANTS(TYPE, VERSION)
 Defines constants for a transaction with TYPE and VERSION. More...
 
#define DEFINE_TRANSACTION_VARIABLE_DATA_ACCESSORS(NAME, TYPE)
 Defines NAME (TYPE typed) variable data accessors around a similarly named templated untyped data accessor. More...
 
#define DEFINE_EMBEDDABLE_TRANSACTION(NAME)
 Defines a transaction with NAME that supports embedding. More...
 

Functions

bool catapult::model::IsSizeValid (const Transaction &transaction, const TransactionRegistry &registry)
 

Macro Definition Documentation

◆ DEFINE_EMBEDDABLE_TRANSACTION

#define DEFINE_EMBEDDABLE_TRANSACTION (   NAME)
Value:
struct Embedded##NAME##Transaction : public NAME##TransactionBody<model::EmbeddedTransaction> {}; \
struct NAME##Transaction : public NAME##TransactionBody<model::Transaction> {};

Defines a transaction with NAME that supports embedding.

◆ DEFINE_TRANSACTION_CONSTANTS

#define DEFINE_TRANSACTION_CONSTANTS (   TYPE,
  VERSION 
)
Value:
/* Transaction format version. */ \
static constexpr uint8_t Current_Version = VERSION; \
/* Transaction type. */ \
static constexpr EntityType Entity_Type = TYPE;

Defines constants for a transaction with TYPE and VERSION.

◆ DEFINE_TRANSACTION_VARIABLE_DATA_ACCESSORS

#define DEFINE_TRANSACTION_VARIABLE_DATA_ACCESSORS (   NAME,
  TYPE 
)
Value:
/* Returns a const pointer to the typed data contained in this transaction. */ \
const TYPE* NAME##Ptr() const { \
return reinterpret_cast<const TYPE*>(NAME##PtrT(*this)); \
} \
\
/* Returns a pointer to the typed data contained in this transaction. */ \
TYPE* NAME##Ptr() { \
return reinterpret_cast<TYPE*>(NAME##PtrT(*this)); \
}

Defines NAME (TYPE typed) variable data accessors around a similarly named templated untyped data accessor.

catapult::model::EntityType
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
catapult::model::BasicEntityType::Transaction
Transaction type.