Fawkes API
Fawkes Development Version
|
Interface generator internal representation of a enum constant as parsed from the XML template file. More...
#include <interfaces/generator/enum_constant.h>
Classes | |
struct | EnumItem |
Enumeration item. More... |
Public Member Functions | |
InterfaceEnumConstant (const std::string &name, const std::string &comment) | |
Constructor. | |
std::string | get_name () |
Get name of enum constant. | |
std::string | get_comment () |
Get comment of enum constant. | |
std::vector< EnumItem > | get_items () |
Get enumeration items. | |
void | add_item (std::string name, std::string comment) |
Add an item without custom value. | |
void | add_item (std::string name, std::string comment, int value) |
Add an item with custom value. |
Interface generator internal representation of a enum constant as parsed from the XML template file.
Definition at line 30 of file enum_constant.h.
InterfaceEnumConstant::InterfaceEnumConstant | ( | const std::string & | name, |
const std::string & | comment | ||
) |
Constructor.
name | name of enumeration constant |
comment | comment of enumeration constant. |
Definition at line 36 of file enum_constant.cpp.
void InterfaceEnumConstant::add_item | ( | std::string | name, |
std::string | comment | ||
) |
Add an item without custom value.
name | name of item |
comment | comment of item. |
Definition at line 81 of file enum_constant.cpp.
Referenced by InterfaceParser::parse().
void InterfaceEnumConstant::add_item | ( | std::string | name, |
std::string | comment, | ||
int | value | ||
) |
Add an item with custom value.
name | name of item |
comment | comment of item. |
value | custom value |
Definition at line 100 of file enum_constant.cpp.
std::string InterfaceEnumConstant::get_comment | ( | ) |
Get comment of enum constant.
Definition at line 59 of file enum_constant.cpp.
std::vector< InterfaceEnumConstant::EnumItem > InterfaceEnumConstant::get_items | ( | ) |
Get enumeration items.
Definition at line 70 of file enum_constant.cpp.
std::string InterfaceEnumConstant::get_name | ( | void | ) |
Get name of enum constant.
Definition at line 49 of file enum_constant.cpp.