ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
dit::did::Record Class Reference

Data Interface Dictionary keyword record class. More...

#include <Record.hpp>

Public Types

enum  DidRecField {
  DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4, DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16,
  DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64, DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256,
  DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL, DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4,
  DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16, DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64,
  DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256, DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL,
  DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4, DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16,
  DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64, DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256,
  DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL
}
 Dictionary keyword record field types. More...
 
enum  DidRecField {
  DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4, DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16,
  DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64, DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256,
  DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL, DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4,
  DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16, DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64,
  DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256, DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL,
  DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4, DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16,
  DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64, DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256,
  DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL
}
 Dictionary keyword record field types. More...
 
enum  DidRecField {
  DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4, DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16,
  DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64, DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256,
  DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL, DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4,
  DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16, DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64,
  DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256, DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL,
  DID_REC_FIELD_CLASS = 2, DID_REC_FIELD_TYPE = 4, DID_REC_FIELD_FORMAT = 8, DID_REC_FIELD_DEFAULT = 16,
  DID_REC_FIELD_UNIT = 32, DID_REC_FIELD_RANGE = 64, DID_REC_FIELD_COMMENT = 128, DID_REC_FIELD_TAGS = 256,
  DID_REC_FIELD_DESCRIPTION = 512, DID_REC_FIELD_ALL
}
 Dictionary keyword record field types. More...
 

Public Member Functions

 Record ()
 
 Record (const std::string &key_name, const ctd::file::Yaml &did)
 Set fields of the object from the keyword record contained in a string buffer. More...
 
 Record (const Record &source)
 
 ~Record ()
 
void Parse (const std::string &key_name, const ctd::file::Yaml &did)
 Parse Parse/extract the fields of a keyword record from a Yaml object. More...
 
const std::string & GetName () const
 Return name of the keyword record. More...
 
const ctd::defines::List
< std::string > & 
GetClasses () const
 Get list of classes defined for the record. More...
 
ctd::defines::DataType GetDataType () const
 Return data type defined for the keyword. More...
 
const std::string & GetFormat () const
 Return the output format defined for the keyword. More...
 
template<class TYPE >
TYPE GetDefaultValue () const
 Return the default value, if defined for the key. More...
 
const std::string & GetUnit () const
 Return the unit, if defined for the key. More...
 
const ctd::defines::List< Range > & GetRanges () const
 Get the valid ranges defined for the key. More...
 
const std::string & GetComment () const
 Get the comment defined. More...
 
const ctd::defines::List
< std::string > & 
GetTags () const
 Get list of the optional tags defined. More...
 
const std::string & GetDescription () const
 Get the description of the key. More...
 
std::string Print (DidRecField fields=DID_REC_FIELD_ALL, const bool compact=false) const
 Get string copy of one or more header fields. More...
 
Recordoperator= (const Record &source)
 Copy operator. More...
 
 Record ()
 
 Record (const std::string &key_name, const ctd::file::Yaml &did)
 Set fields of the object from the keyword record contained in a string buffer. More...
 
 Record (const Record &source)
 
 ~Record ()
 
void Parse (const std::string &key_name, const ctd::file::Yaml &did)
 Parse Parse/extract the fields of a keyword record from a Yaml object. More...
 
const std::string & GetName () const
 Return name of the keyword record. More...
 
const ctd::defines::List
< std::string > & 
GetClasses () const
 Get list of classes defined for the record. More...
 
ctd::defines::DataType GetDataType () const
 Return data type defined for the keyword. More...
 
const std::string & GetFormat () const
 Return the output format defined for the keyword. More...
 
template<class TYPE >
TYPE GetDefaultValue () const
 Return the default value, if defined for the key. More...
 
const std::string & GetUnit () const
 Return the unit, if defined for the key. More...
 
const ctd::defines::List< Range > & GetRanges () const
 Get the valid ranges defined for the key. More...
 
const std::string & GetComment () const
 Get the comment defined. More...
 
const ctd::defines::List
< std::string > & 
GetTags () const
 Get list of the optional tags defined. More...
 
const std::string & GetDescription () const
 Get the description of the key. More...
 
std::string Print (DidRecField fields=DID_REC_FIELD_ALL, const bool compact=false) const
 Get string copy of one or more header fields. More...
 
Recordoperator= (const Record &source)
 Copy operator. More...
 
 Record ()
 
 Record (const std::string &key_name, const ctd::file::Yaml &did)
 Set fields of the object from the keyword record contained in a string buffer. More...
 
 Record (const Record &source)
 
 ~Record ()
 
void Parse (const std::string &key_name, const ctd::file::Yaml &did)
 Parse Parse/extract the fields of a keyword record from a Yaml object. More...
 
const std::string & GetName () const
 Return name of the keyword record. More...
 
const ctd::defines::List
< std::string > & 
GetClasses () const
 Get list of classes defined for the record. More...
 
ctd::defines::DataType GetDataType () const
 Return data type defined for the keyword. More...
 
const std::string & GetFormat () const
 Return the output format defined for the keyword. More...
 
template<class TYPE >
TYPE GetDefaultValue () const
 Return the default value, if defined for the key. More...
 
const std::string & GetUnit () const
 Return the unit, if defined for the key. More...
 
const ctd::defines::List< Range > & GetRanges () const
 Get the valid ranges defined for the key. More...
 
const std::string & GetComment () const
 Get the comment defined. More...
 
const ctd::defines::List
< std::string > & 
GetTags () const
 Get list of the optional tags defined. More...
 
const std::string & GetDescription () const
 Get the description of the key. More...
 
std::string Print (DidRecField fields=DID_REC_FIELD_ALL, const bool compact=false) const
 Get string copy of one or more header fields. More...
 
Recordoperator= (const Record &source)
 Copy operator. More...
 

Static Public Member Functions

static void DecodeFormat (const std::string &did_format, FormatSpecifier &format_specifier)
 Decode the format in a DID record. More...
 
static std::string PrintRecords (ctd::defines::List< dit::did::Record > &records, const DidRecField fields=DID_REC_FIELD_ALL)
 
static void DecodeFormat (const std::string &did_format, FormatSpecifier &format_specifier)
 Decode the format in a DID record. More...
 
static std::string PrintRecords (ctd::defines::List< dit::did::Record > &records, const DidRecField fields=DID_REC_FIELD_ALL)
 
static void DecodeFormat (const std::string &did_format, FormatSpecifier &format_specifier)
 Decode the format in a DID record. More...
 
static std::string PrintRecords (ctd::defines::List< dit::did::Record > &records, const DidRecField fields=DID_REC_FIELD_ALL)
 

Static Public Attributes

static const std::string DID_REC_FIELD_CLASS_STR = "Class"
 
static const std::string DID_REC_FIELD_TYPE_STR = "Type"
 
static const std::string DID_REC_FIELD_FORMAT_STR = "Format"
 
static const std::string DID_REC_FIELD_DEFAULT_STR = "Default"
 
static const std::string DID_REC_FIELD_UNIT_STR = "Unit"
 
static const std::string DID_REC_FIELD_RANGE_STR = "Range"
 
static const std::string DID_REC_FIELD_COMMENT_STR = "Comment"
 
static const std::string DID_REC_FIELD_TAGS_STR = "Tags"
 
static const std::string DID_REC_FIELD_DESCRIPTION_STR = "Description"
 
static const std::map
< DidRecField, std::string > 
s_did_rec_fields_nb_map
 
static const std::map
< std::string, DidRecField
s_did_rec_fields_name_map
 

Protected Attributes

std::string m_field_name
 
ctd::defines::List< std::string > m_field_classes
 
ctd::defines::DataType m_field_type
 
std::string m_field_format
 
std::string m_field_default
 
std::string m_field_unit
 
ctd::defines::List< Rangem_field_ranges
 
std::string m_field_comment
 
ctd::defines::List< std::string > m_field_tags
 
std::string m_field_description
 

Detailed Description

Data Interface Dictionary keyword record class.

Member Enumeration Documentation

Dictionary keyword record field types.

Enumerator
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 

Dictionary keyword record field types.

Enumerator
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 

Dictionary keyword record field types.

Enumerator
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 
DID_REC_FIELD_CLASS 
DID_REC_FIELD_TYPE 
DID_REC_FIELD_FORMAT 
DID_REC_FIELD_DEFAULT 
DID_REC_FIELD_UNIT 
DID_REC_FIELD_RANGE 
DID_REC_FIELD_COMMENT 
DID_REC_FIELD_TAGS 
DID_REC_FIELD_DESCRIPTION 
DID_REC_FIELD_ALL 

Constructor & Destructor Documentation

dit::did::Record::Record ( )
dit::did::Record::Record ( const std::string &  key_name,
const ctd::file::Yaml did 
)

Set fields of the object from the keyword record contained in a string buffer.

Parameters
key_nameName of the key to process (unpack).
didDID contained in a Yaml object.
dit::did::Record::Record ( const Record source)
dit::did::Record::~Record ( )
dit::did::Record::Record ( )
dit::did::Record::Record ( const std::string &  key_name,
const ctd::file::Yaml did 
)

Set fields of the object from the keyword record contained in a string buffer.

Parameters
key_nameName of the key to process (unpack).
didDID contained in a Yaml object.
dit::did::Record::Record ( const Record source)
dit::did::Record::~Record ( )
dit::did::Record::Record ( )
dit::did::Record::Record ( const std::string &  key_name,
const ctd::file::Yaml did 
)

Set fields of the object from the keyword record contained in a string buffer.

Parameters
key_nameName of the key to process (unpack).
didDID contained in a Yaml object.
dit::did::Record::Record ( const Record source)
dit::did::Record::~Record ( )

Member Function Documentation

void dit::did::Record::DecodeFormat ( const std::string &  did_format,
FormatSpecifier format_specifier 
)
static

Decode the format in a DID record.

Parameters
did_formatFormat as defined in the DID.
format_specifierFormat specifier object with the decoded properties.
static void dit::did::Record::DecodeFormat ( const std::string &  did_format,
FormatSpecifier format_specifier 
)
static

Decode the format in a DID record.

Parameters
did_formatFormat as defined in the DID.
format_specifierFormat specifier object with the decoded properties.
static void dit::did::Record::DecodeFormat ( const std::string &  did_format,
FormatSpecifier format_specifier 
)
static

Decode the format in a DID record.

Parameters
did_formatFormat as defined in the DID.
format_specifierFormat specifier object with the decoded properties.
const ctd::defines::List< std::string > & dit::did::Record::GetClasses ( ) const

Get list of classes defined for the record.

const ctd::defines::List<std::string>& dit::did::Record::GetClasses ( ) const

Get list of classes defined for the record.

const ctd::defines::List<std::string>& dit::did::Record::GetClasses ( ) const

Get list of classes defined for the record.

const std::string & dit::did::Record::GetComment ( ) const

Get the comment defined.

const std::string& dit::did::Record::GetComment ( ) const

Get the comment defined.

const std::string& dit::did::Record::GetComment ( ) const

Get the comment defined.

ctd::defines::DataType dit::did::Record::GetDataType ( ) const

Return data type defined for the keyword.

ctd::defines::DataType dit::did::Record::GetDataType ( ) const

Return data type defined for the keyword.

ctd::defines::DataType dit::did::Record::GetDataType ( ) const

Return data type defined for the keyword.

template<class TYPE >
TYPE dit::did::Record::GetDefaultValue ( ) const

Return the default value, if defined for the key.

template<class TYPE >
TYPE dit::did::Record::GetDefaultValue ( ) const

Return the default value, if defined for the key.

template<class TYPE >
TYPE dit::did::Record::GetDefaultValue ( ) const

Return the default value, if defined for the key.

const std::string& dit::did::Record::GetDescription ( ) const

Get the description of the key.

const std::string & dit::did::Record::GetDescription ( ) const

Get the description of the key.

const std::string& dit::did::Record::GetDescription ( ) const

Get the description of the key.

const std::string& dit::did::Record::GetFormat ( ) const

Return the output format defined for the keyword.

const std::string& dit::did::Record::GetFormat ( ) const

Return the output format defined for the keyword.

const std::string & dit::did::Record::GetFormat ( ) const

Return the output format defined for the keyword.

const std::string& dit::did::Record::GetName ( ) const

Return name of the keyword record.

const std::string & dit::did::Record::GetName ( ) const

Return name of the keyword record.

const std::string& dit::did::Record::GetName ( ) const

Return name of the keyword record.

const ctd::defines::List<Range>& dit::did::Record::GetRanges ( ) const

Get the valid ranges defined for the key.

const ctd::defines::List< Range > & dit::did::Record::GetRanges ( ) const

Get the valid ranges defined for the key.

const ctd::defines::List<Range>& dit::did::Record::GetRanges ( ) const

Get the valid ranges defined for the key.

const ctd::defines::List<std::string>& dit::did::Record::GetTags ( ) const

Get list of the optional tags defined.

const ctd::defines::List<std::string>& dit::did::Record::GetTags ( ) const

Get list of the optional tags defined.

const ctd::defines::List< std::string > & dit::did::Record::GetTags ( ) const

Get list of the optional tags defined.

const std::string& dit::did::Record::GetUnit ( ) const

Return the unit, if defined for the key.

const std::string& dit::did::Record::GetUnit ( ) const

Return the unit, if defined for the key.

const std::string & dit::did::Record::GetUnit ( ) const

Return the unit, if defined for the key.

Record & dit::did::Record::operator= ( const Record source)

Copy operator.

Record& dit::did::Record::operator= ( const Record source)

Copy operator.

Record& dit::did::Record::operator= ( const Record source)

Copy operator.

void dit::did::Record::Parse ( const std::string &  key_name,
const ctd::file::Yaml did 
)

Parse Parse/extract the fields of a keyword record from a Yaml object.

Parameters
key_nameName of key to process.
didDID Yaml object.
void dit::did::Record::Parse ( const std::string &  key_name,
const ctd::file::Yaml did 
)

Parse Parse/extract the fields of a keyword record from a Yaml object.

Parameters
key_nameName of key to process.
didDID Yaml object.
void dit::did::Record::Parse ( const std::string &  key_name,
const ctd::file::Yaml did 
)

Parse Parse/extract the fields of a keyword record from a Yaml object.

Parameters
key_nameName of key to process.
didDID Yaml object.
std::string dit::did::Record::Print ( DidRecField  fields = DID_REC_FIELD_ALL,
const bool  compact = false 
) const

Get string copy of one or more header fields.

Parameters
fieldsKeyword record fields to return.
Returns
Buffer with fields, separated with newline if multiple requested.
std::string dit::did::Record::Print ( DidRecField  fields = DID_REC_FIELD_ALL,
const bool  compact = false 
) const

Get string copy of one or more header fields.

Parameters
fieldsKeyword record fields to return.
Returns
Buffer with fields, separated with newline if multiple requested.
std::string dit::did::Record::Print ( DidRecField  fields = DID_REC_FIELD_ALL,
const bool  compact = false 
) const

Get string copy of one or more header fields.

Parameters
fieldsKeyword record fields to return.
Returns
Buffer with fields, separated with newline if multiple requested.
static std::string dit::did::Record::PrintRecords ( ctd::defines::List< dit::did::Record > &  records,
const DidRecField  fields = DID_REC_FIELD_ALL 
)
static
std::string dit::did::Record::PrintRecords ( ctd::defines::List< dit::did::Record > &  records,
const DidRecField  fields = DID_REC_FIELD_ALL 
)
static
static std::string dit::did::Record::PrintRecords ( ctd::defines::List< dit::did::Record > &  records,
const DidRecField  fields = DID_REC_FIELD_ALL 
)
static

Member Data Documentation

ctd::defines::List< std::string > dit::did::Record::m_field_classes
protected
std::string dit::did::Record::m_field_comment
protected
std::string dit::did::Record::m_field_default
protected
std::string dit::did::Record::m_field_description
protected
std::string dit::did::Record::m_field_format
protected
std::string dit::did::Record::m_field_name
protected
ctd::defines::List< Range > dit::did::Record::m_field_ranges
protected
ctd::defines::List< std::string > dit::did::Record::m_field_tags
protected
ctd::defines::DataType dit::did::Record::m_field_type
protected
std::string dit::did::Record::m_field_unit
protected
const std::map< std::string, Record::DidRecField > dit::did::Record::s_did_rec_fields_name_map
static
const std::map< Record::DidRecField, std::string > dit::did::Record::s_did_rec_fields_nb_map
static

The documentation for this class was generated from the following files: