CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
27 namespace catapult {
namespace model {
47 return static_cast<EntityType>(
48 (static_cast<uint16_t>(basicEntityType) & 0x03) << 14 |
50 (static_cast<uint8_t>(facilityCode) & 0xFF));
54 #define DEFINE_ENTITY_TYPE(BASIC_TYPE, FACILITY, DESCRIPTION, CODE) \
55 constexpr auto Entity_Type_##DESCRIPTION = model::MakeEntityType( \
56 (model::BasicEntityType::BASIC_TYPE), \
57 (model::FacilityCode::FACILITY), \
67 #define DEFINE_TRANSACTION_TYPE(FACILITY, DESCRIPTION, CODE) DEFINE_ENTITY_TYPE(Transaction, FACILITY, DESCRIPTION, CODE)
constexpr void HexFormat(const ByteArray< N, TTag > &)
constexpr EntityType MakeEntityType(BasicEntityType basicEntityType, FacilityCode facilityCode, uint8_t code)
Makes entity type given basicEntityType, facilityCode and code.
Definition: EntityType.h:46
EntityType
Enumeration of entity types.
Definition: EntityType.h:43
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
constexpr BasicEntityType ToBasicEntityType(EntityType type)
Converts an entity type into a basic entity type.
Definition: EntityType.h:70
DEFINE_ENTITY_TYPE(Block, Core, Nemesis_Block, 0)
Nemesis block.
FacilityCode
Possible facility codes.
Definition: model/FacilityCode.h:27
#define CASE_WELL_KNOWN_ENTITY_TYPE(NAME)
Definition: EntityType.cpp:28
std::ostream & operator<<(std::ostream &out, const EmbeddedTransaction &transaction)
Insertion operator for outputting transaction to out.
Definition: EmbeddedTransaction.cpp:28
Binary layout for a block.
Definition: Block.h:69
Definition: AddressExtractionExtension.cpp:28
BasicEntityType
Definition: EntityType.h:31
Binary layout for a transaction.
Definition: Transaction.h:32