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