44 isDefault(rhs.isDefault)
74 return base !=
nullptr;
155 int step = name.length() + image.length() + 2;
159 *gmsg <<
',' <<
endl <<
" ";
164 *gmsg << name << (
isExpression() ?
":=" :
"=") << image;
virtual const std::string & getHelp() const
Return help string.
void parseComponent(Statement &stat, bool eval, int index)
Parse array component.
const std::string & getHelp() const
Return the help string.
void print(int &len) const
Print attribute.
Abstract base class for attribute parsers.
void setReadOnly(bool)
Set read-only flag.
const std::string & getType() const
Return the attribute type.
virtual const std::string & getType() const =0
Return attribute type.
void set(AttributeBase *newBase)
Define new value.
bool isReadOnly() const
Test for read only.
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
std::string getImage() const
Convert to string.
virtual AttributeBase * getDefault() const
Return default value.
AttributeHandler & getHandler() const
Return a reference to the parser.
void setReadOnly(bool)
Set or reset read-only flag.
bool isReadOnly() const
Return read-only flag.
bool isDeferred() const
Return defer flag.
Pointer< AttributeHandler > handler
const std::string & getName() const
Return the attribute name.
void setDeferred(bool)
Set or reset defer flag.
std::string getImage() const
Return printable representation.
Inform & endl(Inform &inf)
Pointer< AttributeBase > base
virtual const std::string & getName() const
Return attribute name.
Interface for statements.
bool isExpression() const
Test for expression.
const Attribute & operator=(const Attribute &)
Attribute()
Default constructor.
Abstract base class for attribute values of different types.
bool isDeferred() const
Return [b]deferred[/b] flag.
void parse(Statement &stat, bool eval)
Parse attribute.
virtual void parse(Attribute &a, Statement &s, bool eval) const =0
Parse new value.
void setDeferred(bool)
Set read-only flag.
bool isBaseAllocated() const
void setDefault()
Assign default value.
virtual bool isExpression() const
Test for expression.
AttributeBase & getBase() const
Return reference to polymorphic value.
virtual void print(std::ostream &) const =0
Print value.
virtual void parseComponent(Attribute &a, Statement &s, bool eval, int i) const
Parse component value.
A representation of an Object attribute.