CatapultServer  v0.5.0.1 (Elephant)
EntityType.cpp File Reference
Include dependency graph for EntityType.cpp:

Namespaces

 catapult
 
 catapult::model
 

Macros

#define DEFINE_CASE(RESULT)   case utils::to_underlying_type(RESULT)
 
#define CASE_WELL_KNOWN_ENTITY_TYPE(NAME)   DEFINE_CASE(Entity_Type_##NAME): return #NAME
 
#define CUSTOM_ENTITY_TYPE_DEFINITION   1
 
#define STR(SYMBOL)   #SYMBOL
 
#define DEFINE_ENTITY_TYPE(BASIC_TYPE, FACILITY, DESCRIPTION, CODE)
 

Functions

std::ostream & catapult::model::operator<< (std::ostream &out, EntityType entityType)
 Insertion operator for outputting entityType to out. More...
 

Macro Definition Documentation

◆ CASE_WELL_KNOWN_ENTITY_TYPE

#define CASE_WELL_KNOWN_ENTITY_TYPE (   NAME)    DEFINE_CASE(Entity_Type_##NAME): return #NAME

◆ CUSTOM_ENTITY_TYPE_DEFINITION

#define CUSTOM_ENTITY_TYPE_DEFINITION   1

◆ DEFINE_CASE

#define DEFINE_CASE (   RESULT)    case utils::to_underlying_type(RESULT)

◆ DEFINE_ENTITY_TYPE

#define DEFINE_ENTITY_TYPE (   BASIC_TYPE,
  FACILITY,
  DESCRIPTION,
  CODE 
)
Value:
DEFINE_CASE(MakeEntityType((model::BasicEntityType::BASIC_TYPE), (model::FacilityCode::FACILITY), CODE)): \
return STR(DESCRIPTION)

◆ STR

#define STR (   SYMBOL)    #SYMBOL
catapult::model::MakeEntityType
constexpr EntityType MakeEntityType(BasicEntityType basicEntityType, FacilityCode facilityCode, uint8_t code)
Makes entity type given basicEntityType, facilityCode and code.
Definition: EntityType.h:46
STR
#define STR(SYMBOL)
Definition: EntityType.cpp:33
DEFINE_CASE
#define DEFINE_CASE(RESULT)
Definition: EntityType.cpp:26