ADTF  3.18.3
dd_predefined_units.h File Reference

OO DataDefinition Redesign. More...

Go to the source code of this file.

Classes

struct  BaseUnit< T >
 Generator template to create baseunits. More...
 
struct  UnitPrefix< T >
 Generator template to create UnitPrefix. More...
 
class  PredefinedUnits
 Static class for predefined units. More...
 

Namespaces

 ddl
 definition of the ddl namespace
 
 ddl::unit
 definiton of the unit namespace
 
 ddl::unit_prefix
 definiton of the unit prefixes namespace
 

Macros

#define DDL_BASE_UNIT_DEFINITION(classname, baseunitname, baseunitsymbol, baseunitdescription)
 Base unit template definiton. More...
 
#define DDL_UNIT_PREFIX_DEFINITION(classname, unitprefixname, unitprefixsymbol, unitprefixpower)
 Unit prefix template definiton. More...
 

Detailed Description

OO DataDefinition Redesign.

Definition in file dd_predefined_units.h.

Macro Definition Documentation

◆ DDL_BASE_UNIT_DEFINITION

#define DDL_BASE_UNIT_DEFINITION (   classname,
  baseunitname,
  baseunitsymbol,
  baseunitdescription 
)
Value:
namespace unit { \
struct classname { \
constexpr static const char* const _name = baseunitname; \
constexpr static const char* const _symbol = baseunitsymbol; \
constexpr static const char* const _description = baseunitdescription; \
}; \
} \
static_assert(true, "Simply to make sure a closing semicolon ';' is used for the macro")
@ unit
the unit is a unit (Unit)

Base unit template definiton.

Parameters
classnamethe classname for the base unit
baseunitnamethe name for the base unit
baseunitsymbolthe symbol for the base unit
baseunitdescriptionthe description for the base unit
See also
ddl::PredefinedUnits

Definition at line 73 of file dd_predefined_units.h.

◆ DDL_UNIT_PREFIX_DEFINITION

#define DDL_UNIT_PREFIX_DEFINITION (   classname,
  unitprefixname,
  unitprefixsymbol,
  unitprefixpower 
)
Value:
namespace unit_prefix { \
struct classname { \
constexpr static const char* const _name = unitprefixname; \
constexpr static const char* const _symbol = unitprefixsymbol; \
constexpr static const int32_t _power = unitprefixpower; \
}; \
} \
static_assert(true, "Simply to make sure a closing semicolon ';' is used for the macro")

Unit prefix template definiton.

Parameters
classnamethe classname for the unit prefix
unitprefixnamethe prefix name for the unit prefix
unitprefixsymbolthe symbol for the unit prefix
unitprefixpowerthe power for the unit prefix
See also
ddl::PredefinedUnits

Definition at line 91 of file dd_predefined_units.h.