ADTF  3.18.2
DDDefault

Convenience class to create a valid predefined Data Definition with predefined types. More...

Public Types

enum class  CreateOption { use_all_types = 0 , use_std_types_only = 1 , use_ddl_types_only = 2 }
 CreateOption for create. More...
 

Static Public Member Functions

static dd::DataDefinition create (CreateOption create_option=CreateOption::use_all_types)
 Creates a default data defintion with predefined types, base units and unit prefixes. More...
 

Detailed Description

Convenience class to create a valid predefined Data Definition with predefined types.


This implementation can be used as follows:

//create the default data defintion
auto my_dd_1 = DDDefault::create();
static dd::DataDefinition create(CreateOption create_option=CreateOption::use_all_types)
Creates a default data defintion with predefined types, base units and unit prefixes.
See also
DDDefault::CreateOption

Definition at line 33 of file dddefault.h.

Member Enumeration Documentation

◆ CreateOption

enum CreateOption
strong

CreateOption for create.

Enumerator
use_all_types 

add all predefined data types to the result of DDDefault::create return value.

use_std_types_only 

add only predefined types to the result of DDDefault::create return value that belongs to the C++ standard data types:

  • uint8_t, int8_t ...
  • bool, char, float, double
use_ddl_types_only 

add only predefined types to the result of DDDefault::create return value that belongs to the ddl data types:

  • tUInt8, tInt8 ...
  • tBool, tChar, tFloat32, tFloat64

Definition at line 38 of file dddefault.h.

Member Function Documentation

◆ create()

static dd::DataDefinition create ( CreateOption  create_option = CreateOption::use_all_types)
static

Creates a default data defintion with predefined types, base units and unit prefixes.

Parameters
create_optionchoose an option to create with all defined types, with standard types only or with ddl types only.
See also
CreateOption
Returns
dd::DataDefinition the valid Data Definiton of the file.