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