VAPoR  0.1
Classes | Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
VAPoR::ParamNode Class Reference

An Xml tree. More...

#include <ParamNode.h>

Inheritance diagram for VAPoR::ParamNode:
VAPoR::XmlNode VetsUtil::MyBase

Classes

class  DirtyFlag
 

Public Member Functions

 ParamNode (const string &tag, const map< string, string > &attrs, size_t numChildrenHint=0)
 
 ParamNode (const string &tag, size_t numChildrenHint=0)
 
virtual ParamNodeConstruct (const string &tag, const map< string, string > &attrs, size_t numChildrenHint=0)
 
 ParamNode (const ParamNode &pn)
 
ParamNodeNodeCopy ()
 
ParamNodeShallowCopy ()
 Copy only the ParamNode itself, not any of its children. More...
 
virtual ParamNodedeepCopy ()
 
virtual ~ParamNode ()
 
void SetAllFlags (bool dirty)
 
int SetElementDouble (const string &tag, double value)
 
int SetElementDouble (const string &tag, const vector< double > &values)
 
int SetElementDouble (const vector< string > &tagpath, const vector< double > &values)
 
virtual const vector< double > & GetElementDouble (const vector< string > &tagpath, const vector< double > &defaultVal=XmlNode::_emptyDoubleVec)
 
virtual const vector< double > & GetElementDouble (const string &tag, const vector< double > &defaultVal=XmlNode::_emptyDoubleVec)
 
int SetElementLong (const string &tag, const vector< long > &values)
 
int SetElementLong (const string &tag, long value)
 
int SetElementLong (const vector< string > &tagpath, const vector< long > &values)
 
virtual const vector< long > & GetElementLong (const vector< string > &tagpath, const vector< long > &defaultVal=XmlNode::_emptyLongVec)
 
virtual const vector< long > & GetElementLong (const string &tag, const vector< long > &defaultVal=XmlNode::_emptyLongVec)
 
int SetElementString (const string &tag, const string &value)
 
int SetElementString (const vector< string > &tagpath, const string &value)
 
int SetElementStringVec (const string &tag, const vector< string > &values)
 
int SetElementStringVec (const string &tag, const vector< string > &values, const string blankSub)
 
int SetElementStringVec (const vector< string > &tagpath, const vector< string > &values)
 
virtual const string & GetElementString (const string &tag, const string &defaultVal=XmlNode::_emptyString)
 
virtual const string & GetElementString (const vector< string > &tagpath, const string &defaultVal=XmlNode::_emptyString)
 
virtual void GetElementStringVec (const vector< string > &tagpath, vector< string > &vec, const vector< string > &defaultVal=_emptyStringVec)
 
virtual void GetElementStringVec (const string &tag, vector< string > &vec, const vector< string > &defaultVal=_emptyStringVec)
 
virtual void GetElementStringVec (const string &tag, vector< string > &vec, const string blankSub)
 
int SetFlagDirty (const vector< string > &tagpath)
 
int SetFlagDirty (const string &tag)
 
int AddNode (const string &tag, ParamNode *child)
 
int AddNode (const vector< string > &tagpath, ParamNode *child)
 
int AddRegisteredNode (const string &tag, ParamNode *child, ParamsBase *associate)
 
int AddRegisteredNode (const vector< string > &tagPath, ParamNode *child, ParamsBase *associate)
 
ParamNodeGetChild (size_t index) const
 
ParamNodeGetNode (const vector< string > &tagpath)
 
ParamNodeGetNode (const string &tag) const
 
int ReplaceNode (const vector< string > &tagpath, ParamNode *newNode)
 
int ReplaceNode (const string &tag, ParamNode *newNode)
 
int DeleteNode (const string &tag)
 
int DeleteNode (const vector< string > &tagpath)
 
int RegisterDirtyFlag (const string &tag, ParamNode::DirtyFlag *df)
 
int RegisterDirtyFlag (const vector< string > &tagpath, ParamNode::DirtyFlag *df)
 
int UnRegisterDirtyFlag (const vector< string > &tagpath, const ParamNode::DirtyFlag *df)
 
int UnRegisterDirtyFlag (const string &tag, const ParamNode::DirtyFlag *df)
 
void SetParamsBase (ParamsBase *pBase)
 
ParamsBaseGetParamsBase ()
 
- Public Member Functions inherited from VAPoR::XmlNode
 XmlNode (const string &tag, const map< string, string > &attrs, size_t numChildrenHint=0)
 
 XmlNode (const string &tag, size_t numChildrenHint=0)
 
 XmlNode ()
 
 XmlNode (const XmlNode &node)
 
virtual XmlNodeClone ()
 
virtual ~XmlNode ()
 
string & Tag ()
 
map< string, string > & Attrs ()
 
virtual const vector< long > & GetElementLong (const string &tag) const
 
virtual int HasElementLong (const string &tag) const
 
virtual const vector< double > & GetElementDouble (const string &tag) const
 
virtual int HasElementDouble (const string &tag) const
 
virtual const string & GetElementString (const string &tag) const
 
virtual void GetElementStringVec (const string &tag, vector< string > &vec) const
 
virtual int HasElementString (const string &tag) const
 
virtual void AddChild (XmlNode *child)
 
virtual int GetNumChildren () const
 
virtual XmlNodeNewChild (const string &tag, const map< string, string > &attrs, size_t numChildrenHint=0)
 
virtual int DeleteChild (size_t index)
 
virtual int DeleteChild (const string &tag)
 
virtual void DeleteAll ()
 
virtual void ClearChildren ()
 
virtual int ReplaceChild (XmlNode *childNode, XmlNode *newChild)
 
virtual XmlNodeGetParent ()
 
virtual int HasChild (size_t index)
 
virtual XmlNodeGetChild (const string &tag) const
 
virtual bool & ErrOnMissing ()
 
virtual int HasChild (const string &tag)
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 

Static Public Attributes

static const string _paramsBaseAttr
 
static const string _paramNodeAttr
 
- Static Public Attributes inherited from VAPoR::XmlNode
static vector< long > _emptyLongVec
 
static vector< double > _emptyDoubleVec
 
static vector< string > _emptyStringVec
 
static string _emptyString
 
- Static Public Attributes inherited from VetsUtil::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 

Protected Attributes

map< string, vector< DirtyFlag * > > _dirtyFlags
 
vector< long > longvec
 
vector< double > doublevec
 
ParamsBase_paramsBase
 
- Protected Attributes inherited from VAPoR::XmlNode
map< string, vector< long > > _longmap
 
map< string, vector< double > > _doublemap
 
map< string, string > _stringmap
 
bool _errOnMissing
 

Static Protected Attributes

static const string _typeAttr
 

Additional Inherited Members

- Public Types inherited from VAPoR::XmlNode
enum  ErrCode_T { ERR_DEF = 1, ERR_TNP }
 
- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T )(const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T )(const char *msg)
 
- Static Public Member Functions inherited from VAPoR::XmlNode
static ostream & streamOut (ostream &os, const XmlNode &node)
 
static string replaceAll (const string &sourceString, const char *input, const char *output)
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message. More...
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

Detailed Description

An Xml tree.

Author
John Clyne
Version
$Revision$
Date
$Date$

This class extends the XmlNode class, adding support for dirty flags. The XML hierarchy includes pointers to ParamsBase instances, enabling use of classes embedded in Params instances.

Definition at line 30 of file ParamNode.h.

Constructor & Destructor Documentation

VAPoR::ParamNode::ParamNode ( const string &  tag,
const map< string, string > &  attrs,
size_t  numChildrenHint = 0 
)

Constructor for the ParamNode class.

Create a new ParamNode node

Parameters
[in]tagName of ParamNode node
[in]attrsA list of Xml attribute names and values for this node
[in]numChildrenHintReserve space for the indicated number of children. Children must be created with the NewChild() method
VAPoR::ParamNode::ParamNode ( const string &  tag,
size_t  numChildrenHint = 0 
)
VAPoR::ParamNode::ParamNode ( const ParamNode pn)

Copy constructor for the ParamNode class.

Creates a new ParamNode node from an existing one.

Parameters
[in]pnParamNode instance from which to construct a copy
virtual VAPoR::ParamNode::~ParamNode ( )
virtual

Member Function Documentation

int VAPoR::ParamNode::AddNode ( const string &  tag,
ParamNode child 
)

Add an existing node as a child of the current node. The new child node will be appended to the array of child nodes.

Note
This method differs from the base class method that it overloads in that it prohibits siblings from having duplicate tags.
Parameters
[in]tagis the tag that will identify the new node
[in]childis the ParamNode object to be added as a child
Return values
statusReturn 0 upon success. A negative number is returned if a sibling already exists with the same name.
int VAPoR::ParamNode::AddNode ( const vector< string > &  tagpath,
ParamNode child 
)

Add an existing node as a last child of a path of nodes starting at the current

The new child node will be appended to the array of child nodes of the final node.

Note
This method differs from the base class method that it overloads in that it prohibits siblings from having duplicate tags.
Parameters
[in]tagpathis vector of tags specifying path to the new node
[in]childis the ParamNode object to be added as a child
Return values
statusReturn 0 upon success. A negative number is returned if a sibling already exists with the same name, or if one of the specified nodes in the path sequence does not already exist
int VAPoR::ParamNode::AddRegisteredNode ( const string &  tag,
ParamNode child,
ParamsBase associate 
)

Add an existing node with associated registered ParamsBase class

The new child node will be appended to the array of child nodes of the final node. Use of this method ensures that the ParamsBase class will use the specified child as its root node, and that the child will have a pointer to the ParamsBase* argument as its ParamsBase object

Parameters
[in]tagis the tag that will identify the new node
[in]childis the ParamNode object to be added as a child
[in]associateis the ParamsBase object for which this is the root node
Return values
statusReturn 0 upon success. A negative number is returned if a sibling already exists with the same name, or if one of the specified nodes in the path sequence does not already exist
int VAPoR::ParamNode::AddRegisteredNode ( const vector< string > &  tagPath,
ParamNode child,
ParamsBase associate 
)

Add an existing node with associated registered ParamsBase class Where the node is the final node in a path of ParamNode nodes.

The new child node will be appended to the array of child nodes of the final node. Use of this method ensures that the ParamsBase class will use the specified child as its root node, and that the child will have a pointer to the ParamsBase* argument as its ParamsBase object

Parameters
[in]tagPathis sequence of tags that will identify the new node
[in]childis the ParamNode object to be added as a child
[in]associateis the ParamsBase object for which this is the root node
Return values
statusReturn 0 upon success. A negative number is returned if a sibling already exists with the same name, or if one of the specified nodes in the path sequence does not already exist
virtual ParamNode* VAPoR::ParamNode::Construct ( const string &  tag,
const map< string, string > &  attrs,
size_t  numChildrenHint = 0 
)
inlinevirtual

Construct a new ParamNode node

Parameters
[in]tagName of ParamNode node
[in]attrsA list of Xml attribute names and values for this node
[in]numChildrenHintReserve space for the indicated number of
Return values
nodeNewly constructed ParamNode

Reimplemented from VAPoR::XmlNode.

Definition at line 71 of file ParamNode.h.

virtual ParamNode* VAPoR::ParamNode::deepCopy ( )
virtual

Like copy constructor for the ParamNode class, but in addition to cloning the child nodes in xml hierarchy, also clones the ParamsBase instances that are referenced by child nodes

Creates a new ParamNode node from an existing one.

Return values
nodeParamNode copied from this
int VAPoR::ParamNode::DeleteNode ( const string &  tag)

Delete the indicated child node and all its descendants.

Parameters
[in]tagName of the child node to delete
Return values
statusReturn 0 if successful, -1 if child does not exist.
int VAPoR::ParamNode::DeleteNode ( const vector< string > &  tagpath)

Delete the indicated child node and all its descendants, based on a path to the child

Parameters
[in]tagpathPath to the child node to delete
Return values
statusReturn 0 if successful, -1 if child does not exist.
ParamNode* VAPoR::ParamNode::GetChild ( size_t  index) const
inlinevirtual

Return the indicated child node.

Return the ith child of this node. The first child node is index=0, the last is index=GetNumChildren()-1. Return NULL if the child does not exist.

Parameters
[in]indexIndex of the child. The first child is zero
Return values
childReturns the indicated child, or NULL if the child could does not exist
See also
GetNumChildren()

Reimplemented from VAPoR::XmlNode.

Definition at line 501 of file ParamNode.h.

References VAPoR::XmlNode::GetChild().

virtual const vector<double>& VAPoR::ParamNode::GetElementDouble ( const vector< string > &  tagpath,
const vector< double > &  defaultVal = XmlNode::_emptyDoubleVec 
)
virtual

Get an element's data of type double

Return the character data associated with the Xml element identified by a sequence tagpath from this node. The data is interpreted and returned as a vector of doubles. If the element does not exist an empty vector is returned. If ErrOnMissing() is true an error is generated if the element is missing;

Parameters
[in]tagpathsequence of tags leading to element
[in]defaultVal(optional) default vector<double> to be assigned if specified element does not exist
Return values
vectorVector of doubles associated with the named element
virtual const vector<double>& VAPoR::ParamNode::GetElementDouble ( const string &  tag,
const vector< double > &  defaultVal = XmlNode::_emptyDoubleVec 
)
virtual

Get an Xml element's data of type double

Return the character data associated with the Xml elemented named by tag for this node. The data is interpreted and returned as a vector of doubles. If the element does not exist an empty vector is returned. If ErrOnMissing() is true an error is generated if the element is missing;

Parameters
[in]tagName of element
[in]defaultVal(optional) default vector<double> to be assigned if specified element does not exist
Return values
vectorVector of doubles associated with the named element
virtual const vector<long>& VAPoR::ParamNode::GetElementLong ( const vector< string > &  tagpath,
const vector< long > &  defaultVal = XmlNode::_emptyLongVec 
)
virtual

Get an Xml element's data of type long

Return the character data associated with the XML element reached via a sequence tagpath of nodes from this node. The data is interpreted and returned as a vector of longs. If the element does not exist an empty vector is returned. If ErrOnMissing() is true an error is generated if the element is missing;

Parameters
[in]tagpathSequence of tags to element
[in]defaultVal(optional) vector<long> to be assigned if specified element does not exist.
Return values
vector<long>vector of longs associated with the named elemented
virtual const vector<long>& VAPoR::ParamNode::GetElementLong ( const string &  tag,
const vector< long > &  defaultVal = XmlNode::_emptyLongVec 
)
virtual

Get an Xml element's data of type long

Return the character data associated with the Xml element named by tag for this node. The data is interpreted and returned as a vector of longs. If the element does not exist an empty vector is returned. If ErrOnMissing() is true an error is generated if the element is missing;

Parameters
[in]tagName of element
[in]defaultVal(optional) Vector of longs that will be set if specified element does not exist
Return values
vectorVector of longs associated with the named elemented
virtual const string& VAPoR::ParamNode::GetElementString ( const string &  tag,
const string &  defaultVal = XmlNode::_emptyString 
)
virtual

Set a dirty flag on an element or node at child node of this ParamNode

Parameters
[in]tagpathSequence of names leading to element associated with flag
Return values
statusReturns 0 if successful Get an Xml element's data of type string

Return the character data associated with the Xml elemented named by tag for this node. The data is interpreted and returned as a string. If the element does not exist an empty vector is returned. If ErrOnMissing() is true an error is generated if the element is missing;

Parameters
[in]tagName of element
[in]defaultVal(optional) string to be assigned if specified element does not exist.
Return values
stringThe string associated with the named element
virtual const string& VAPoR::ParamNode::GetElementString ( const vector< string > &  tagpath,
const string &  defaultVal = XmlNode::_emptyString 
)
virtual

Get an element's data of type string

Return the character data associated with the Xml element identified by tagpath for this node. The data is interpreted and returned as a string. If the element does not exist an empty vector is returned. If ErrOnMissing() is true an error is generated if the element is missing;

Parameters
[in]tagpathsequence of tags leading to element
[in]defaultVal(optional) string to be assigned if specified element does not exist.
Return values
stringThe string associated with the named element
virtual void VAPoR::ParamNode::GetElementStringVec ( const vector< string > &  tagpath,
vector< string > &  vec,
const vector< string > &  defaultVal = _emptyStringVec 
)
virtual

Get an element's data of type string vector using a path to node

Builds the string vector data associated with the Xml element identified by a sequence of tags tagpath from this node. The strings in the vector vec must not contain white characters. If the element does not exist an empty vector is returned

Parameters
[in]tagpathSequence of tags
[in]defaultVal(optional) vector<string> to be assigned if specified element does not exist.
[out]vecVector of strings associated with the named element
virtual void VAPoR::ParamNode::GetElementStringVec ( const string &  tag,
vector< string > &  vec,
const vector< string > &  defaultVal = _emptyStringVec 
)
virtual

Get an element's data of type string vector at the current node

Build the string vector data associated with the Xml element identified by a tag at this node. The strings in the vector vec must not contain white characters. If the element does not exist an empty vector is returned

Parameters
[in]tagNode tag
[in]defaultVal(optional) vector<string> to be assigned if specified element does not exist.
[out]vecVector of strings associated with the named element
virtual void VAPoR::ParamNode::GetElementStringVec ( const string &  tag,
vector< string > &  vec,
const string  blankSub 
)
virtual

Get an element's data of type string vector at the current node

Build the string vector data associated with the Xml element identified by a tag at this node. The strings in the vector vec will have blanks wherever the string "blankSub" is found in a string. If the element does not exist an empty vector is returned

Parameters
[in]tagNode tag
[in]blankSubstring used for blank substitution, must not contain blanks.
[out]vecVector of strings associated with the named element
ParamNode* VAPoR::ParamNode::GetNode ( const vector< string > &  tagpath)

Return the indicated child node based on a sequence of tags

Return the indicated tagged child node. Return NULL if the child does not exist.

Parameters
[in]tagpathSequence of nodes to specified child
Return values
childReturns the indicated child, or NULL if the child could does not exist
ParamNode* VAPoR::ParamNode::GetNode ( const string &  tag) const
inline

Return the indicated child node.

Return the indicated tagged child node. Return NULL if the child does not exist.

Parameters
[in]tagName of the child node to return
Return values
childReturns the indicated child, or NULL if the child could does not exist

Definition at line 521 of file ParamNode.h.

References VAPoR::XmlNode::GetChild().

ParamsBase* VAPoR::ParamNode::GetParamsBase ( )
inline

Get the ParamsBase node for which this is the root

The ParamsBase node is NULL unless this node is associated with a registered ParamsBase object.

Return values
Pointerto the ParamsBase node for which this is the root node
See also
SetParamsBase()

Definition at line 648 of file ParamNode.h.

ParamNode* VAPoR::ParamNode::NodeCopy ( )

Method that clones the ParamNode structure, using buildNode to construct the ParamNodes associated with registered ParamsBase instances in the ParamNode hierarchy

int VAPoR::ParamNode::RegisterDirtyFlag ( const string &  tag,
ParamNode::DirtyFlag df 
)

Register a dirty flag with a named parameter

This method stores a pointer to the DirtyFlag df with the parameter named by tag. The ParamNode::DirtyFlag::Set() method will be invoked whenever the associated parameter is modified.

Note
It is possible to register dirty flags for parameters that do not exist. In which case they will not be set until the parameter is defined.
Parameters
[in]tagName of ParamNode node
[in]dfA pointer to a dirty flag
Return values
statusReturn 0 if successful, -1 on failure
See also
RegisterDirtyFlag()
int VAPoR::ParamNode::RegisterDirtyFlag ( const vector< string > &  tagpath,
ParamNode::DirtyFlag df 
)

Register a dirty flag with a named parameter, indicating a sequence of nodes in the XML hierarchy leading to the specific node with the dirty flag.

This method stores a pointer to the DirtyFlag df with the parameter named by tag. The ParamNode::DirtyFlag::Set() method will be invoked whenever the associated parameter is modified.

Note
It is possible to register dirty flags for parameters that do not exist. In which case they will not be set until the parameter is defined.
Parameters
[in]tagpathNames of tags in path leading to the node
[in]dfA pointer to a dirty flag
Return values
statusReturns 0 if successful, -1 on failure
See also
RegisterDirtyFlag()
int VAPoR::ParamNode::ReplaceNode ( const vector< string > &  tagpath,
ParamNode newNode 
)

Replace the indicated child node based on a sequence of tags

Parameters
[in]tagpathSequence of nodes to specified child
[in]newNodeParamNode to install
Return values
statusReturns -1, if the child does not exist
int VAPoR::ParamNode::ReplaceNode ( const string &  tag,
ParamNode newNode 
)

Replace the indicated child node.

If child has a paramsBase instance, it is deleted.

Parameters
[in]tagName of the child node to replace
[in]newNodeParamNode to install
Return values
statusReturns 0 if successful
void VAPoR::ParamNode::SetAllFlags ( bool  dirty)

Set all the flags dirty (or clean)

This method is useful if it is necessary to force all clients to refresh their state, e.g. if the ParamNode has been cloned from another node.

int VAPoR::ParamNode::SetElementDouble ( const string &  tag,
double  value 
)

Set a single ParamNode parameter of type double

This method defines and sets a parameter of type double. The parameter data to be associated with tag is the single double specified by value

Parameters
[in]tagName of the element to define/set
[in]valuedouble
Return values
statusReturns 0 if successful
int VAPoR::ParamNode::SetElementDouble ( const string &  tag,
const vector< double > &  values 
)
virtual

Set an ParamNode parameter of type double

This method defines and sets a parameter of type double. The parameter data data to be associated with tag is the array of double specified by values

Parameters
[in]tagName of the element to define/set
[in]valuesVector of doubles
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetElementDouble ( const vector< string > &  tagpath,
const vector< double > &  values 
)
virtual

Set an ParamNode parameter of type double This method defines and sets a parameter of type double. The parameter data data to be associated with tagpath is the array of double specified by values

Parameters
[in]tagpathNames of the nodes leading to the element to be set
[in]valuesVector of doubles
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetElementLong ( const string &  tag,
const vector< long > &  values 
)
virtual

Set an Xml element of type long This method defines and sets an Xml element. The Xml character data to be associated with this element is the array of longs specified by values

Parameters
[in]tagName of the element to define/set
[in]valuesVector of longs to be converted to character data
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetElementLong ( const string &  tag,
long  value 
)

Set a single ParamNode parameter of type long

This method defines and sets a parameter of type long. The paramter data data to be associated with tag is the single long specified by value

Parameters
[in]tagName of the element to define/set
[in]valuelong
Return values
statusReturns 0 if successful
int VAPoR::ParamNode::SetElementLong ( const vector< string > &  tagpath,
const vector< long > &  values 
)
virtual

Set an ParamNode parameter of type long This method defines and sets a parameter of type long. The parameter data data to be associated with tagpath is the array of longs specified by values

Parameters
[in]tagpathNames of nodes leading to the value to be set
[in]valuesVector of longs
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetElementString ( const string &  tag,
const string &  value 
)
virtual

Set a single ParamNode parameter of type string

This method defines and sets a parameter of type string. The parameter data data to be associated with tag is the single string specified by value

Parameters
[in]tagName of the element to define/set
[in]valuestring
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetElementString ( const vector< string > &  tagpath,
const string &  value 
)

Set a single ParamNode parameter of type string This method defines and sets a parameter of type string. The parameter data data to be associated with tagpath is the single string specified by value

Parameters
[in]tagpathsequence of tags leading to specified element.
[in]valuestring
Return values
statusReturns 0 if successful
int VAPoR::ParamNode::SetElementStringVec ( const string &  tag,
const vector< string > &  values 
)
virtual

Set an ParamNode parameter of type string vector

This method defines and sets a parameter of type string vector. The parameter data to be associated with tag is the array of strings specified by values The strings in the vector values must be nonempty and must not contain white characters.

Parameters
[in]tagName(Tag) of the element to define/set
[in]valuesVector of strings
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetElementStringVec ( const string &  tag,
const vector< string > &  values,
const string  blankSub 
)

Set an ParamNode parameter of type string vector

This method defines and sets a parameter of type string vector. The parameter data to be associated with tag is the array of strings specified by values The strings in the vector values may contain blanks, these will be replaced by the string blankSub. The strings must be non-null.

Parameters
[in]tagName(Tag) of the element to define/set
[in]valuesVector of strings
[in]blankSubstring (not containing blanks) that will replace embedded blanks.
Return values
statusReturns 0 if successful
int VAPoR::ParamNode::SetElementStringVec ( const vector< string > &  tagpath,
const vector< string > &  values 
)
virtual

Set a ParamNode parameter of type string This method defines and sets a parameter of type string vector. The parameter data data to be associated with tagpath is the array of strings specified by values The strings in the vector values must not contain white characters and must not be null.

Parameters
[in]tagpathNames of nodes leading to value to be set
[in]valuesVector of strings
Return values
statusReturns 0 if successful

Reimplemented from VAPoR::XmlNode.

int VAPoR::ParamNode::SetFlagDirty ( const vector< string > &  tagpath)

Set an ParamNode parameter of type long

This method defines and sets a parameter of type long. The parameter data data to be associated with tag is the array of longs specified by values

Parameters
[in]tagName of the element to define/set
[in]valuesVector of longs
Return values
statusReturns 0 if successful
int VAPoR::ParamNode::SetFlagDirty ( const string &  tag)

Set a dirty flag on a basic element at a ParamNode

Parameters
[in]tagName of the element associated with flag
Return values
statusReturns 0 if successful
void VAPoR::ParamNode::SetParamsBase ( ParamsBase pBase)
inline

Set a ParamsBase node for which this is the root

The ParamsBase node is NULL unless this node is associated with a registered ParamsBase object.

Parameters
[in]pBasePointer to the ParamsBase node for which this is the root node
See also
GetParamsBase()

Definition at line 638 of file ParamNode.h.

ParamNode* VAPoR::ParamNode::ShallowCopy ( )

Copy only the ParamNode itself, not any of its children.

int VAPoR::ParamNode::UnRegisterDirtyFlag ( const vector< string > &  tagpath,
const ParamNode::DirtyFlag df 
)

Unregister a dirty flag associated with the named parameter

This method unregisters the DirtyFlag df associated with the parameter named by tag, previously registered with RegisterDirtyFlag(). It is imperative that DirtyFlags pointers are unregistered if the objects they refer to are invalidated (deleted).

Parameters
[in]tagpathNames of tags, leading to node
[in]dfA pointer to a dirty flag
Return values
statusReturn 0 if successful, -1 on failure
See also
UnRegisterDirtyFlag()
int VAPoR::ParamNode::UnRegisterDirtyFlag ( const string &  tag,
const ParamNode::DirtyFlag df 
)

Unregister a dirty flag associated with the named parameter,

This method unregisters the DirtyFlag df associated with the parameter named by tagpath, previously registered with RegisterDirtyFlag(). It is imperative that DirtyFlags pointers are unregistered if the objects they refer to are invalidated (deleted).

Parameters
[in]tagName of ParamNode node
[in]dfA pointer to a dirty flag
Return values
statusReturn 0 if successful, -1 on failure
See also
UnRegisterDirtyFlag()

Member Data Documentation

map<string, vector <DirtyFlag *> > VAPoR::ParamNode::_dirtyFlags
protected

Definition at line 654 of file ParamNode.h.

const string VAPoR::ParamNode::_paramNodeAttr
static

Definition at line 651 of file ParamNode.h.

ParamsBase* VAPoR::ParamNode::_paramsBase
protected

Definition at line 661 of file ParamNode.h.

const string VAPoR::ParamNode::_paramsBaseAttr
static

Definition at line 650 of file ParamNode.h.

const string VAPoR::ParamNode::_typeAttr
staticprotected

Definition at line 655 of file ParamNode.h.

vector<double> VAPoR::ParamNode::doublevec
protected

Definition at line 659 of file ParamNode.h.

vector<long> VAPoR::ParamNode::longvec
protected

Definition at line 658 of file ParamNode.h.


The documentation for this class was generated from the following file: