Interface generator internal representation of a field as parsed from the XML template file.
More...
#include <interfaces/generator/field.h>
Interface generator internal representation of a field as parsed from the XML template file.
Definition at line 31 of file field.h.
◆ InterfaceField()
Constructor.
- Parameters
-
enum_constants | enumeration constants that are available and which can be used as value type. |
Definition at line 40 of file field.cpp.
◆ getAccessType()
std::string InterfaceField::getAccessType |
( |
| ) |
const |
Get type as used for accessor methods of class.
- Returns
- accessor type
Definition at line 83 of file field.cpp.
◆ getComment()
std::string InterfaceField::getComment |
( |
| ) |
const |
Get comment of field.
- Returns
- comment of field.
Definition at line 73 of file field.cpp.
◆ getDefaultValue()
std::string InterfaceField::getDefaultValue |
( |
| ) |
const |
Get default value.
- Returns
- default value
Definition at line 193 of file field.cpp.
◆ getEnumConstant()
Get specific enum constant.
- Parameters
-
name | type name of enum constant |
- Returns
- const reference on enum constant
- Exceptions
-
Exception | thrown if no enum constant of the given name could be found |
Definition at line 215 of file field.cpp.
◆ getEnumConstants()
Get vector of enum constants.
- Returns
- const reference to vector of interface enum constants.
Definition at line 203 of file field.cpp.
◆ getFlags()
std::vector< std::string > InterfaceField::getFlags |
( |
| ) |
const |
Get flags.
- Returns
- flags.
Definition at line 234 of file field.cpp.
◆ getLength()
std::string InterfaceField::getLength |
( |
| ) |
const |
Get field length.
- Returns
- field length
Definition at line 160 of file field.cpp.
◆ getLengthValue()
unsigned int InterfaceField::getLengthValue |
( |
| ) |
const |
Get length value.
This gives the length of the value as a uint instead of a string which is sufficient for the generation of the interface but may not be sufficient for more elaborated usage.
- Returns
- length of the value
Definition at line 173 of file field.cpp.
◆ getName()
std::string InterfaceField::getName |
( |
void |
| ) |
const |
◆ getPlainAccessType()
std::string InterfaceField::getPlainAccessType |
( |
| ) |
const |
Get non-array accessor type.
- Returns
- accessor type
Definition at line 113 of file field.cpp.
◆ getStructType()
std::string InterfaceField::getStructType |
( |
| ) |
const |
Get type used to formulate struct.
- Returns
- struct type
Definition at line 131 of file field.cpp.
◆ getType()
std::string InterfaceField::getType |
( |
| ) |
const |
Get type of field.
- Returns
- type of field.
Definition at line 63 of file field.cpp.
◆ getValidFor()
std::string InterfaceField::getValidFor |
( |
| ) |
const |
Get valid for time.
- Returns
- valid for time
Definition at line 183 of file field.cpp.
◆ isEnumType()
bool InterfaceField::isEnumType |
( |
| ) |
const |
Check if type is an enum type.
- Returns
- true if the type of this field is an enum type, false otherwise
Definition at line 151 of file field.cpp.
◆ operator<()
Check order of two elements.
The overall order is like the following:
- unsigned int
- int
- unsigned long int
- long int
- float
- double
- bool
- byte
- char *
- Parameters
-
- Returns
- true, if current instance is small than f, false otherwise
Definition at line 425 of file field.cpp.
◆ setAttribute()
void InterfaceField::setAttribute |
( |
const std::string & |
attr_name, |
|
|
const std::string & |
attr_value |
|
) |
| |
◆ setComment()
void InterfaceField::setComment |
( |
const std::string & |
comment | ) |
|
◆ setDefaultValue()
void InterfaceField::setDefaultValue |
( |
const std::string & |
default_value | ) |
|
Set default value.
- Parameters
-
default_value | new default value |
Definition at line 304 of file field.cpp.
Referenced by setAttribute().
◆ setFlags()
void InterfaceField::setFlags |
( |
const std::vector< std::string > & |
flags | ) |
|
Set flags.
- Parameters
-
Definition at line 314 of file field.cpp.
◆ setLength()
void InterfaceField::setLength |
( |
const std::string & |
length | ) |
|
Set length of field.
- Parameters
-
length | set length of field. |
Definition at line 283 of file field.cpp.
Referenced by setAttribute().
◆ setName()
void InterfaceField::setName |
( |
const std::string & |
name | ) |
|
◆ setType()
void InterfaceField::setType |
( |
const std::string & |
type | ) |
|
◆ setValidFor()
void InterfaceField::setValidFor |
( |
const std::string & |
validfor | ) |
|
◆ valid()
void InterfaceField::valid |
( |
| ) |
|
The documentation for this class was generated from the following files: