42 isDefault(rhs.isDefault)
72 return base !=
nullptr;
153 int step = name.length() + image.length() + 2;
157 *gmsg <<
',' <<
endl <<
" ";
162 *gmsg << name << (
isExpression() ?
":=" :
"=") << image;
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.
virtual void parseComponent(Attribute &a, Statement &s, bool eval, int i) const
Parse component value.
std::string getImage() const
Convert to string.
void setDefault()
Assign default value.
void print(int &len) const
Print attribute.
virtual const std::string & getType() const =0
Return attribute type.
const Attribute & operator=(const Attribute &)
Pointer< AttributeHandler > handler
void setReadOnly(bool)
Set or reset read-only flag.
void setDeferred(bool)
Set or reset defer flag.
const std::string & getHelp() const
Return the help string.
bool isExpression() const
Test for expression.
virtual AttributeBase * getDefault() const
Return default value.
Attribute()
Default constructor.
virtual const std::string & getHelp() const
Return help string.
void parseComponent(Statement &stat, bool eval, int index)
Parse array component.
A representation of an Object attribute.
std::string getImage() const
Return printable representation.
virtual const std::string & getName() const
Return attribute name.
Interface for statements.
Abstract base class for attribute parsers.
bool isDeferred() const
Return defer flag.
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.
virtual bool isExpression() const
Test for expression.
virtual void print(std::ostream &) const =0
Print value.
bool isReadOnly() const
Test for read only.
AttributeHandler & getHandler() const
Return a reference to the parser.
void parse(Statement &stat, bool eval)
Parse attribute.
virtual void parse(Attribute &a, Statement &s, bool eval) const =0
Parse new value.
const std::string & getName() const
Return the attribute name.
AttributeBase & getBase() const
Return reference to polymorphic value.
Inform & endl(Inform &inf)
bool isReadOnly() const
Return read-only flag.