7#ifndef __FIELDPARSER_IMPL_H__
8#define __FIELDPARSER_IMPL_H__
70 const std::map<PString, FieldConfig> & mapChildren = field.
getVecChildren();
71 std::map<PString, FieldConfig>::const_iterator itFind = mapChildren.find(childName);
72 if(itFind != mapChildren.end()){
75 std::cerr <<
"FieldParser::addParseFieldValue : FieldConfig has no child named '"<<childName<<
"'" << std::endl;
88 if(!
checkInputType<T>(field) || !field.
getIsArray()){std::cerr <<
"FieldParser::addParseFieldArray : Field '"<<field.
getName()<<
"' is not defined as an array of the proper type" << std::endl;
return false;}
102 const std::map<PString, FieldConfig> & mapChildren = field.
getVecChildren();
103 std::map<PString, FieldConfig>::const_iterator itFind = mapChildren.find(childName);
104 if(itFind != mapChildren.end()){
107 std::cerr <<
"FieldParser::addParseFieldArray : FieldConfig has no child named '"<<childName<<
"'" << std::endl;
FieldType::FieldType phoenix_fieldType()
Get the default FieldType.
void setType(const FieldType::FieldType &type)
Sets the type of the AbtractField.
void setVarPtr(void *varPtr)
Sets the varPtr of the AbtractField.
void setIsOffsetReady(bool isOffsetReady)
Sets the isOffsetReady of the AbtractField.
void setArrayPtr(void **arrayPtr)
Sets the arrayPtr of the AbtractField.
void setNbElement(size_t *nbElement)
Sets the nbElement of the AbtractField.
void setIsArray(bool isArray)
Sets the isArray of the AbtractField.
void setOffset(size_t offset)
Sets the offset of the AbtractField.
void setTypeSize(size_t typeSize)
Sets the typeSize of the AbtractField.
Configuration to be used to create a field from a yml file.
const PString & getName() const
Gets the name of the FieldConfig.
size_t getId() const
Gets the id of the FieldConfig.
bool getIsArray() const
Gets the isArray of the FieldConfig.
const std::map< PString, FieldConfig > & getVecChildren() const
Gets the vecChildren of the FieldConfig.
AbtractField p_field
Field to be parsed.
bool checkInputType(const FieldConfig &field)
Check the template type with the FieldConfig.
void addParseFieldArray(T **tabPtr, size_t *nbElement, size_t fieldId, const PString &fieldName="")
Add a sub FieldParser for a Array type.
void addParseFieldValue(T *varPtr, size_t fieldId, const PString &fieldName="")
Add a sub FieldParser for a scalar type.
FieldParser()
Default constructor of FieldParser.
VecFieldParser p_vecChildren
Children used to parse other field and sub messages.
FieldParser * createSubFieldParser(size_t fieldId, const PString &fieldName)
Add a sub FieldParser.
FieldType
Type of the Field.