ADTF
Loading...
Searching...
No Matches
dd_predefined_units.h File Reference
#include <ddl/dd/datamodel/datamodel_units.h>
#include <memory>
#include <string>
#include <type_traits>
#include <unordered_map>
Include dependency graph for dd_predefined_units.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

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

Macros

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

Detailed Description

OO DataDefinition Redesign

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")

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

◆ 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