29 #ifndef __NCML_MODULE__VALUESELEMENT_H__
30 #define __NCML_MODULE__VALUESELEMENT_H__
49 class VariableElement;
77 bool shouldAutoGenerateValues()
const {
return ((!_start.empty()) && (!_increment.empty())); }
84 void validateStartAndIncrementForVariableTypeOrThrow(libdap::BaseType& var)
const;
96 void setVariableValuesFromTokens(
NCMLParser& p, libdap::BaseType& var);
105 void setScalarVariableValuesFromTokens(
NCMLParser& p, libdap::BaseType& var);
120 void setVectorVariableValuesFromTokens(
NCMLParser& p, libdap::BaseType& var);
132 template <
typename DAPType>
void generateAndSetVectorValues(
NCMLParser& p, libdap::Array* pArray);
139 void autogenerateAndSetVariableValues(
NCMLParser& p, libdap::BaseType& var);
150 template <
class DAPType,
typename ValueType>
void setScalarValue(libdap::BaseType& var,
const string& valueAsToken);
162 template <
typename DAPType>
void setVectorValues(libdap::Array* pArray,
const std::vector<string>& valueTokens);
165 void parseAndSetCharValue(libdap::BaseType& var,
const string& valueAsToken);
171 void parseAndSetCharValueArray(
NCMLParser& p, libdap::Array* pVecVar,
const std::vector<string>& tokens);
177 std::string getNCMLTypeForVariable(
NCMLParser& p)
const;
183 void setGotValuesOnOurVariableElement(
NCMLParser& p);
188 void dealWithEmptyStringValues();
190 static vector<string> getValidAttributes();
201 std::string _accumulated_content;
203 std::vector<string> _tokens;
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
static class NCMLUtil overview
virtual void setAttributes(const XMLAttributeMap &attrs)
Set the attributes of this from the map.
virtual const string & getTypeName() const
Return the type of the element, which should be: the same as ConcreteClassName::getTypeName() ...
static const string _sTypeName
Base class for NcML element concrete classes.
virtual string toString() const
Return a string describing the element.
virtual void handleBegin()
Handle a begin on this element.
Concrete class for NcML element.
virtual ValuesElement * clone() const
Make and return a copy of this.
static const vector< string > _sValidAttributes
virtual void handleContent(const string &content)
Handle the characters content for the element.
virtual void handleEnd()
Handle the closing of this element.