1 #ifndef OPAL_Attribute_HH
2 #define OPAL_Attribute_HH
79 operator bool()
const;
95 const std::string &
getHelp()
const;
99 const std::string &
getName()
const;
103 const std::string &
getType()
const;
154 void print(
int &len)
const;
172 inline Attribute::operator bool()
const {
173 return base !=
nullptr;
182 #endif // OPAL_Attribute_HH
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
bool isBaseAllocated() const
void setReadOnly(bool)
Set read-only flag.
void set(AttributeBase *newBase)
Define new value.
Abstract base class for attribute values of different types.
void setDefault()
Assign default value.
void print(int &len) const
Print attribute.
const Attribute & operator=(const Attribute &)
Pointer< AttributeHandler > handler
const std::string & getHelp() const
Return the help string.
bool isExpression() const
Test for expression.
Attribute()
Default constructor.
void parseComponent(Statement &stat, bool eval, int index)
Parse array component.
A representation of an Object attribute.
std::string getImage() const
Return printable representation.
Interface for statements.
Abstract base class for attribute parsers.
void setDeferred(bool)
Set read-only flag.
bool isDeferred() const
Return [b]deferred[/b] flag.
Pointer< AttributeBase > base
const std::string & getType() const
Return the attribute type.
bool isReadOnly() const
Test for read only.
AttributeHandler & getHandler() const
Return a reference to the parser.
void parse(Statement &stat, bool eval)
Parse attribute.
const std::string & getName() const
Return the attribute name.
AttributeBase & getBase() const
Return reference to polymorphic value.