44 isDefault(rhs.isDefault)
74 return base !=
nullptr;
155 int step =
name.length() + image.length() + 2;
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
Inform & endl(Inform &inf)
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.
virtual bool isExpression() const
Test for expression.
std::string getImage() const
Convert to string.
virtual void print(std::ostream &) const =0
Print value.
Abstract base class for attribute parsers.
void setDeferred(bool)
Set or reset defer flag.
virtual AttributeBase * getDefault() const
Return default value.
bool isDeferred() const
Return defer flag.
void setReadOnly(bool)
Set or reset read-only flag.
virtual const std::string & getType() const =0
Return attribute type.
virtual const std::string & getName() const
Return attribute name.
virtual const std::string & getHelp() const
Return help string.
virtual void parseComponent(Attribute &a, Statement &s, bool eval, int i) const
Parse component value.
bool isReadOnly() const
Return read-only flag.
virtual void parse(Attribute &a, Statement &s, bool eval) const =0
Parse new value.
Interface for statements.