23 #ifndef _INTERFACES_GENERATOR_FIELD_H_
24 #define _INTERFACES_GENERATOR_FIELD_H_
26 #include <interfaces/generator/enum_constant.h>
35 InterfaceField(std::vector<InterfaceEnumConstant> *enum_constants = NULL);
38 void setName(
const std::string &name);
39 void setType(
const std::string &type);
41 void setLength(
const std::string &length);
42 void setFlags(
const std::vector<std::string> &flags);
46 void setAttribute(
const std::string &attr_name,
const std::string &attr_value);
48 void valid(
const std::set<std::string> &reserved_names);
59 std::vector<std::string>
getFlags()
const;
69 void tokenize(
const std::string & str,
70 std::vector<std::string> &tokens,
71 const std::string & delimiters =
" ");
79 unsigned int length_value;
81 std::string default_value;
82 std::vector<std::string> flags;
83 std::vector<InterfaceEnumConstant> *enum_constants;
Interface generator internal representation of a enum constant as parsed from the XML template file.
Interface generator internal representation of a field as parsed from the XML template file.
const std::vector< InterfaceEnumConstant > * getEnumConstants() const
Get vector of enum constants.
void setAttribute(const std::string &attr_name, const std::string &attr_value)
Set attribute.
std::string getName() const
Get name of field.
std::string getValidFor() const
Get valid for time.
void setLength(const std::string &length)
Set length of field.
std::string getDefaultValue() const
Get default value.
void setDefaultValue(const std::string &default_value)
Set default value.
bool isEnumType() const
Check if type is an enum type.
bool operator<(const InterfaceField &f) const
Check order of two elements.
void setName(const std::string &name)
Set name of field.
std::vector< std::string > getFlags() const
Get flags.
void valid(const std::set< std::string > &reserved_names)
Assert validity.
std::string getPlainAccessType() const
Get non-array accessor type.
std::string getType() const
Get type of field.
const InterfaceEnumConstant & getEnumConstant(const std::string &name) const
Get specific enum constant.
void setComment(const std::string &comment)
Set comment of field.
std::string getComment() const
Get comment of field.
std::string getStructType() const
Get type used to formulate struct.
void setValidFor(const std::string &validfor)
Set valid for time.
std::string getAccessType() const
Get type as used for accessor methods of class.
void setFlags(const std::vector< std::string > &flags)
Set flags.
std::string getMaxIdx() const
Get maximum index (length - 1)
unsigned int getLengthValue() const
Get length value.
std::string getLength() const
Get field length.
void setType(const std::string &type)
Set type of field.
InterfaceField(std::vector< InterfaceEnumConstant > *enum_constants=NULL)
Constructor.