23#include <interfaces/generator/checker.h>
24#include <interfaces/generator/constant.h>
25#include <interfaces/generator/exceptions.h>
43 const std::string &type,
44 const std::string &value,
45 const std::string &comment)
59 if (type ==
"string") {
60 this->value = std::string(
"\"") + value +
"\"";
64 this->comment = comment;
91 if (type ==
"string") {
93 }
else if (type ==
"byte") {
95 }
else if (type ==
"float" || type ==
"double" || type ==
"bool") {
static bool validValue(const std::string &type, const std::string &value)
Check value validity for given type.
static bool validName(const std::string &name, const std::set< std::string > &reserved_names)
Check identifiers.
static bool validType(const std::string &type, std::vector< InterfaceEnumConstant > *enum_constants=0)
Decide if a supplied type is correct and in the case of constants if the supplied value matches the f...
InterfaceConstant(const std::string &name, const std::string &type, const std::string &value, const std::string &comment)
Constructor.
std::string getComment()
Get comment of constant.
std::string getType()
Get type of constant.
std::string getValue()
Get value of constant.
std::string getName()
Get name of constant.
Thrown if illegal type is supplied.
Thrown if illegal value is supplied.
Thrown if something is a reserved identifier.