23#include "Utility/Inform.h"
61 base = std::shared_ptr<AttributeBase>(rhs.
base);
74 return base !=
nullptr;
88 return base->getImage();
113 return base->isExpression();
128 handler->parse(*
this, stat, eval);
134 handler->parseComponent(*
this, stat, eval, index);
140 base = std::shared_ptr<AttributeBase>(newBase);
146 base = std::shared_ptr<AttributeBase>(
handler->getDefault());
155 int step = name.length() + image.length() + 2;
159 *
gmsg <<
',' << endl <<
" ";
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
A representation of an Object attribute.
void setDeferred(bool)
Set read-only flag.
std::shared_ptr< AttributeBase > base
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.
std::shared_ptr< 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.
const Attribute & operator=(const Attribute &)
Abstract base class for attribute values of different types.
virtual void print(std::ostream &) const =0
Print value.
Abstract base class for attribute parsers.
Interface for statements.