9 #ifndef IFW_DIT_DID_RECORD_HPP_
10 #define IFW_DIT_DID_RECORD_HPP_
28 const std::string& lower_limit,
29 const std::string& upper_limit);
38 const std::string& lower_limit,
39 const std::string& upper_limit);
69 void _Copy(
const Range& source);
170 static std::string
PrintRecords(std::vector<dit::did::Record>& records,
181 Record(
const std::string& key_name,
193 void Parse(
const std::string& key_name,
197 const std::string&
GetName()
const;
203 const std::vector<std::string>&
GetClasses()
const;
212 template <
class TYPE>
216 const std::string&
GetUnit()
const;
219 const std::vector<Range>&
GetRanges()
const;
225 const std::vector<std::string>&
GetTags()
const;
236 const bool compact =
false)
const;
256 void _Copy(
const Record& source);
262 #endif // !IFW_DIT_DID_RECORD_HPP_
Class to handle YAML files.
Class implementing the handling of Yaml files in the ICS environment.
Definition: Yaml.hpp:27
static void DecodeFormat(const std::string &did_format, FormatSpecifier &format_specifier)
Decode the format in a DID record.
Definition: Record.cpp:75
~Range()
Definition: Record.cpp:33
std::string ToString(DidRecField fields=DID_REC_FIELD_ALL, const bool compact=false) const
Get string copy of one or more header fields.
Definition: Record.cpp:327
Range & operator=(const Range &source)
Copy operator.
Definition: Record.cpp:51
std::string ToString() const
Print out the members in a string buffer.
Definition: Record.cpp:68
const std::string DID_REC_FIELD_CLASS_STR
Definition: Record.hpp:119
Definition: Record.hpp:109
const std::string & GetComment() const
Get the comment defined.
Definition: Record.cpp:306
std::vector< Range > m_field_ranges
Definition: Record.hpp:250
const std::string & GetDescription() const
Get the description of the key.
Definition: Record.cpp:320
const std::map< DidRecField, std::string > DID_REC_FIELDS_NB_MAP
map to map from record "class" field numeric to string representation.
Definition: Record.hpp:130
Definition: Record.hpp:105
Definition: Record.hpp:111
std::string m_field_unit
Definition: Record.hpp:249
const std::string DID_REC_FIELD_TAGS_STR
Definition: Record.hpp:126
Record & operator=(const Record &source)
Copy operator.
Definition: Record.cpp:464
const std::string & GetName() const
Return name of the keyword record.
Definition: Record.cpp:250
const std::string DID_REC_FIELD_DEFAULT_STR
Definition: Record.hpp:122
Definition: Record.hpp:106
DataType
Data types numeric representations.
Definition: types.hpp:34
ctd::defines::DataType GetDataType() const
Return data type defined for the keyword.
Definition: Record.cpp:271
Definition: Record.hpp:102
const std::string & GetFormat() const
Return the output format defined for the keyword.
Definition: Record.cpp:278
std::string m_alt_field_name
Definition: Record.hpp:243
const std::string & GetUnit() const
Return the unit, if defined for the key.
Definition: Record.cpp:292
const std::string DID_REC_FIELD_FORMAT_STR
Definition: Record.hpp:121
std::string m_field_default
Definition: Record.hpp:248
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.
Definition: Record.cpp:136
const std::string DID_REC_FIELD_UNIT_STR
Definition: Record.hpp:123
std::string m_field_format
Definition: Record.hpp:247
TYPE GetDefaultValue() const
Return the default value, if defined for the key.
Definition: Record.cpp:285
static std::string PrintRecords(std::vector< dit::did::Record > &records, const DidRecField fields=DID_REC_FIELD_ALL)
Print (dump) records contained in the class in a string buffer.
Definition: Record.cpp:491
std::vector< std::string > m_field_tags
Definition: Record.hpp:252
ctd::defines::DataType m_data_type
Definition: Record.hpp:64
std::string m_lower_limit
Definition: Record.hpp:65
Definition: Record.hpp:103
Range()
Definition: Record.cpp:12
void Convert(const std::string &str_value, std::string &native_value)
Handle case: Conversion of std::string to std::string.
Definition: conversion.cpp:52
ctd::defines::DataType m_field_type
Definition: Record.hpp:246
Definition: Record.hpp:104
const std::map< std::string, DidRecField > DID_REC_FIELDS_NAME_MAP
map to map from record "class" field string to numeric representation.
Definition: Record.hpp:144
Data Interface Dictionary keyword record class.
Definition: Record.hpp:158
const std::string DID_REC_FIELD_DESCRIPTION_STR
Definition: Record.hpp:127
void SetLimits(ctd::defines::DataType data_type, const std::string &lower_limit, const std::string &upper_limit)
Define (set) the limits for the range.
Definition: Record.cpp:38
std::string m_field_comment
Definition: Record.hpp:251
Class to contain limits for one range.
Definition: Record.hpp:22
std::string m_upper_limit
Definition: Record.hpp:66
Record()
Definition: Record.cpp:111
std::string m_field_name
Definition: Record.hpp:242
DidRecField
Dictionary keyword record field types.
Definition: Record.hpp:100
std::string m_org_name
Definition: Record.hpp:244
Definition: Record.hpp:107
void GetUpperLimit(TYPE &upper_limit) const
Get the upper limit value.
Definition: Record.hpp:51
Definition: Record.hpp:108
std::string m_field_description
Definition: Record.hpp:253
const std::string & GetAltName() const
Return name of the alternative keyword record (without the optional indeces).
Definition: Record.cpp:257
~Record()
Definition: Record.cpp:131
const std::string DID_REC_FIELD_TYPE_STR
Definition: Record.hpp:120
const std::vector< std::string > & GetTags() const
Get list of the optional tags defined.
Definition: Record.cpp:313
const std::string DID_REC_FIELD_RANGE_STR
Definition: Record.hpp:124
const std::vector< std::string > & GetClasses() const
Get list of classes defined for the record.
Definition: Record.cpp:264
void GetLowerLimit(TYPE &lower_limit) const
Get the lower limit value.
Definition: Record.hpp:43
std::vector< std::string > m_field_classes
Definition: Record.hpp:245
const std::string DID_REC_FIELD_COMMENT_STR
Definition: Record.hpp:125
Definition: Record.hpp:101
const std::vector< Range > & GetRanges() const
Get the valid ranges defined for the key.
Definition: Record.cpp:299