PhoenixProtocolBuffer  1.0.1
Set of tools to decode offset from protocol buffer
Loading...
Searching...
No Matches
FieldConfig Class Reference

Configuration to be used to create a field from a yml file. More...

#include <AbtractField.h>

Public Member Functions

 FieldConfig ()
 Constructor of class FieldConfig.
 
 FieldConfig (const FieldConfig &other)
 Copy Constructor of class FieldConfig.
 
size_t & getId ()
 Gets the id of the FieldConfig.
 
size_t getId () const
 Gets the id of the FieldConfig.
 
bool & getIsArray ()
 Gets the isArray of the FieldConfig.
 
bool getIsArray () const
 Gets the isArray of the FieldConfig.
 
PString & getName ()
 Gets the name of the FieldConfig.
 
const PString & getName () const
 Gets the name of the FieldConfig.
 
FieldType::FieldTypegetType ()
 Gets the type of the FieldConfig.
 
const FieldType::FieldTypegetType () const
 Gets the type of the FieldConfig.
 
std::map< PString, FieldConfig > & getVecChildren ()
 Gets the vecChildren of the FieldConfig.
 
const std::map< PString, FieldConfig > & getVecChildren () const
 Gets the vecChildren of the FieldConfig.
 
FieldConfigoperator= (const FieldConfig &other)
 Operator = of class FieldConfig.
 
void setId (size_t id)
 Sets the id of the FieldConfig.
 
void setIsArray (bool isArray)
 Sets the isArray of the FieldConfig.
 
void setName (const PString &name)
 Sets the name of the FieldConfig.
 
void setType (const FieldType::FieldType &type)
 Sets the type of the FieldConfig.
 
void setVecChildren (const std::map< PString, FieldConfig > &vecChildren)
 Sets the vecChildren of the FieldConfig.
 
virtual ~FieldConfig ()
 Destructor of class FieldConfig.
 

Protected Member Functions

void copyFieldConfig (const FieldConfig &other)
 Copy Function of class FieldConfig.
 

Private Member Functions

void initialisationFieldConfig ()
 Initialisation Function of class FieldConfig.
 

Private Attributes

size_t p_id
 Id of the field.
 
bool p_isArray
 True if the Field contains an array of value, false if not.
 
PString p_name
 Name of the Field.
 
FieldType::FieldType p_type
 Type of the Field.
 
std::map< PString, FieldConfigp_vecChildren
 Vector of children of the FieldConfig.
 

Detailed Description

Configuration to be used to create a field from a yml file.

Definition at line 79 of file AbtractField.h.

Constructor & Destructor Documentation

◆ FieldConfig() [1/2]

FieldConfig::FieldConfig ( )

Constructor of class FieldConfig.

Definition at line 278 of file AbtractField.cpp.

278 {
280}
void initialisationFieldConfig()
Initialisation Function of class FieldConfig.

References initialisationFieldConfig().

Referenced by copyFieldConfig(), FieldConfig(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FieldConfig() [2/2]

FieldConfig::FieldConfig ( const FieldConfig & other)

Copy Constructor of class FieldConfig.

Parameters
other: FieldConfig we want ot copy

Definition at line 285 of file AbtractField.cpp.

285 {
286 copyFieldConfig(other);
287}
void copyFieldConfig(const FieldConfig &other)
Copy Function of class FieldConfig.

References copyFieldConfig(), and FieldConfig().

+ Here is the call graph for this function:

◆ ~FieldConfig()

FieldConfig::~FieldConfig ( )
virtual

Destructor of class FieldConfig.

Definition at line 290 of file AbtractField.cpp.

290 {
291
292}

Member Function Documentation

◆ copyFieldConfig()

void FieldConfig::copyFieldConfig ( const FieldConfig & other)
protected

Copy Function of class FieldConfig.

Parameters
other: FieldConfig we want ot copy

Definition at line 411 of file AbtractField.cpp.

411 {
412 p_name = other.p_name;
413 p_id = other.p_id;
414 p_type = other.p_type;
415 p_isArray = other.p_isArray;
417}
PString p_name
Name of the Field.
size_t p_id
Id of the field.
std::map< PString, FieldConfig > p_vecChildren
Vector of children of the FieldConfig.
FieldType::FieldType p_type
Type of the Field.
bool p_isArray
True if the Field contains an array of value, false if not.

References FieldConfig(), p_id, p_isArray, p_name, p_type, and p_vecChildren.

Referenced by FieldConfig(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId() [1/2]

size_t & FieldConfig::getId ( )

Gets the id of the FieldConfig.

Returns
id of the FieldConfig

Definition at line 362 of file AbtractField.cpp.

362 {
363 return p_id;
364}

References p_id.

◆ getId() [2/2]

size_t FieldConfig::getId ( ) const

Gets the id of the FieldConfig.

Returns
id of the FieldConfig

Definition at line 355 of file AbtractField.cpp.

355 {
356 return p_id;
357}

References p_id.

Referenced by FieldParser::addParseFieldArray(), FieldParser::addParseFieldEnum(), FieldParser::addParseFieldValue(), and FieldParser::addSubMessage().

+ Here is the caller graph for this function:

◆ getIsArray() [1/2]

bool & FieldConfig::getIsArray ( )

Gets the isArray of the FieldConfig.

Returns
isArray of the FieldConfig

Definition at line 390 of file AbtractField.cpp.

390 {
391 return p_isArray;
392}

References p_isArray.

◆ getIsArray() [2/2]

bool FieldConfig::getIsArray ( ) const

Gets the isArray of the FieldConfig.

Returns
isArray of the FieldConfig

Definition at line 383 of file AbtractField.cpp.

383 {
384 return p_isArray;
385}

References p_isArray.

Referenced by FieldParser::addParseFieldArray().

+ Here is the caller graph for this function:

◆ getName() [1/2]

PString & FieldConfig::getName ( )

Gets the name of the FieldConfig.

Returns
name of the FieldConfig

Definition at line 348 of file AbtractField.cpp.

348 {
349 return p_name;
350}

References p_name.

◆ getName() [2/2]

const PString & FieldConfig::getName ( ) const

Gets the name of the FieldConfig.

Returns
name of the FieldConfig

Definition at line 341 of file AbtractField.cpp.

341 {
342 return p_name;
343}

References p_name.

Referenced by FieldParser::addParseFieldArray(), FieldParser::addParseFieldEnum(), FieldParser::addParseFieldValue(), FieldParser::addSubMessage(), and FieldParser::checkInputType().

+ Here is the caller graph for this function:

◆ getType() [1/2]

FieldType::FieldType & FieldConfig::getType ( )

Gets the type of the FieldConfig.

Returns
type of the FieldConfig

Definition at line 376 of file AbtractField.cpp.

376 {
377 return p_type;
378}

References p_type.

◆ getType() [2/2]

const FieldType::FieldType & FieldConfig::getType ( ) const

Gets the type of the FieldConfig.

Returns
type of the FieldConfig

Definition at line 369 of file AbtractField.cpp.

369 {
370 return p_type;
371}

References p_type.

Referenced by FieldParser::checkInputType().

+ Here is the caller graph for this function:

◆ getVecChildren() [1/2]

std::map< PString, FieldConfig > & FieldConfig::getVecChildren ( )

Gets the vecChildren of the FieldConfig.

Returns
vecChildren of the FieldConfig

Definition at line 404 of file AbtractField.cpp.

404 {
405 return p_vecChildren;
406}

References p_vecChildren.

◆ getVecChildren() [2/2]

const std::map< PString, FieldConfig > & FieldConfig::getVecChildren ( ) const

Gets the vecChildren of the FieldConfig.

Returns
vecChildren of the FieldConfig

Definition at line 397 of file AbtractField.cpp.

397 {
398 return p_vecChildren;
399}

References p_vecChildren.

Referenced by FieldParser::addParseFieldArray(), FieldParser::addParseFieldEnum(), FieldParser::addParseFieldValue(), FieldParser::addSubMessage(), FieldParser::addSubMessage(), and phoenix_parseFieldConfig().

+ Here is the caller graph for this function:

◆ initialisationFieldConfig()

void FieldConfig::initialisationFieldConfig ( )
private

Initialisation Function of class FieldConfig.

Definition at line 420 of file AbtractField.cpp.

420 {
421 p_name = "";
422 p_id = 0lu;
423 p_isArray = false;
424}

References p_id, p_isArray, and p_name.

Referenced by FieldConfig().

+ Here is the caller graph for this function:

◆ operator=()

FieldConfig & FieldConfig::operator= ( const FieldConfig & other)

Operator = of class FieldConfig.

Parameters
other: FieldConfig we want ot copy
Returns
copied class FieldConfig

Definition at line 298 of file AbtractField.cpp.

298 {
299 copyFieldConfig(other);
300 return *this;
301}

References copyFieldConfig(), and FieldConfig().

+ Here is the call graph for this function:

◆ setId()

void FieldConfig::setId ( size_t id)

Sets the id of the FieldConfig.

Parameters
id: id of the FieldConfig

Definition at line 313 of file AbtractField.cpp.

313 {
314 p_id = id;
315}

References p_id.

Referenced by phoenix_createField().

+ Here is the caller graph for this function:

◆ setIsArray()

void FieldConfig::setIsArray ( bool isArray)

Sets the isArray of the FieldConfig.

Parameters
isArray: isArray of the FieldConfig

Definition at line 327 of file AbtractField.cpp.

327 {
328 p_isArray = isArray;
329}

References p_isArray.

Referenced by phoenix_createField().

+ Here is the caller graph for this function:

◆ setName()

void FieldConfig::setName ( const PString & name)

Sets the name of the FieldConfig.

Parameters
name: name of the FieldConfig

Definition at line 306 of file AbtractField.cpp.

306 {
307 p_name = name;
308}

References p_name.

Referenced by phoenix_createField().

+ Here is the caller graph for this function:

◆ setType()

void FieldConfig::setType ( const FieldType::FieldType & type)

Sets the type of the FieldConfig.

Parameters
type: type of the FieldConfig

Definition at line 320 of file AbtractField.cpp.

320 {
321 p_type = type;
322}

References p_type.

Referenced by phoenix_createField().

+ Here is the caller graph for this function:

◆ setVecChildren()

void FieldConfig::setVecChildren ( const std::map< PString, FieldConfig > & vecChildren)

Sets the vecChildren of the FieldConfig.

Parameters
vecChildren: vecChildren of the FieldConfig

Definition at line 334 of file AbtractField.cpp.

334 {
335 p_vecChildren = vecChildren;
336}

References p_vecChildren.

Member Data Documentation

◆ p_id

size_t FieldConfig::p_id
private

Id of the field.

Definition at line 107 of file AbtractField.h.

Referenced by copyFieldConfig(), getId(), getId(), initialisationFieldConfig(), and setId().

◆ p_isArray

bool FieldConfig::p_isArray
private

True if the Field contains an array of value, false if not.

Definition at line 111 of file AbtractField.h.

Referenced by copyFieldConfig(), getIsArray(), getIsArray(), initialisationFieldConfig(), and setIsArray().

◆ p_name

PString FieldConfig::p_name
private

Name of the Field.

Definition at line 105 of file AbtractField.h.

Referenced by copyFieldConfig(), getName(), getName(), initialisationFieldConfig(), and setName().

◆ p_type

FieldType::FieldType FieldConfig::p_type
private

Type of the Field.

Definition at line 109 of file AbtractField.h.

Referenced by copyFieldConfig(), getType(), getType(), and setType().

◆ p_vecChildren

std::map<PString, FieldConfig> FieldConfig::p_vecChildren
private

Vector of children of the FieldConfig.

Definition at line 113 of file AbtractField.h.

Referenced by copyFieldConfig(), getVecChildren(), getVecChildren(), and setVecChildren().


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