87 "Cannot have variableAgg@name empty! Scope=" +
_parser->getScopeString());
91 if (!
_parser->isScopeAggregation())
95 "Got a variableAgg element not as a direct child of an aggregation! elt=" +
toString() +
96 " at scope=" +
_parser->getScopeString() );
122 "VariableAggElement::getParentAggregation(): "
123 "Expected current top of stack was AggregationElement*, but it wasn't! Logic error!");
130 VariableAggElement::getValidAttributes()
132 vector<string> validAttrs;
133 validAttrs.reserve(1);
134 validAttrs.push_back(
"name");
virtual void setAttributes(const XMLAttributeMap &attrs)
Set the attributes of this from the map.
virtual bool validateAttributes(const XMLAttributeMap &attrs, const vector< string > &validAttrs, vector< string > *pInvalidAttrs=0, bool printInvalid=true, bool throwOnError=true)
Check that the given attributes are all in the valid set, otherwise fill in *pInvalidAttrs with the p...
virtual const string & getTypeName() const
Return the type of the element, which should be: the same as ConcreteClassName::getTypeName() ...
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
void setVariableAggElement()
Should only be used by the VariableAggElement class to let us know it added the vars.
virtual void handleBegin()
Handle a begin on this element.
const string getValueForLocalNameOrDefault(const string &localname, const string &defVal="") const
If there is an attribute with localname, return its value, else return default.
static const vector< string > _sValidAttributes
#define NCML_ASSERT_MSG(cond, msg)
virtual void handleEnd()
Handle the closing of this element.
int getParseLineNumber() const
Get the line of the NCML file the parser is currently parsing.
static std::string printAttributeIfNotEmpty(const std::string &attrName, const std::string &attrValue)
Helper for subclasses implementing toString().
#define THROW_NCML_PARSE_ERROR(parseLine, msg)
Base class for NcML element concrete classes.
virtual ~VariableAggElement()
virtual VariableAggElement * clone() const
Make and return a copy of this.
AggregationElement & getParentAggregation() const
Get our parent aggregation off the parser stack.
void addAggregationVariable(const string &name)
Set the variable with name as an aggregation variable for this aggregation.
Element for the
element child of an .
virtual string toString() const
Return a string describing the element.
static const string _sTypeName