class DataItemNode

Holds a single tag name / tag value pair

Inheritance:


Public Methods

[more]virtual void Unparse (int indent, int padsize)
[more]virtual void Unparse (int indent)
[more]virtual bool isOfType ( ASTtype T )
[more]DataValueNode::ValType myDelimType (void) const
Returns the delimiter type of the value of this Data Item
[more]virtual int myLongestStr ( void ) const
Returns the length of the longest string in this object.
[more]virtual string myName () const
Return the name of the tag in this item
[more]virtual ASTnode::ASTtype myType (void)
[more]string myValue () const
Return the value of this item
[more]virtual ASTlist<DataValueNode *> * returnLoopValues (const string & tagName)
Dummy do-nothing function needed to handle the fact that this is derived from DataNode, which defines this function as virtual
[more]virtual List<ASTnode*> * searchByTag ( string &searchFor )
Included for orthogonality with ASTnode.
[more]virtual List<ASTnode*> * searchByTagValue ( string &tag, string &value )
Included for orthogonality with ASTnode.
[more]virtual List<ASTnode*> * searchForType ( ASTtype type, int delim = -1 )
Included for orthogonality with ASTnode.
[more]void setDelimType ( DataValueNode::ValType )
Sets the delimiter type of the value of this Data Item
[more]virtual bool unlinkChild ( ASTnode* child )
unlinks the given ASTnode from this ASTnode, assuming that the given ASTnode is a child of this ASTnode.
[more]virtual ~DataItemNode ()
Destructor

Public Members

[more]


Inherited from DataNode:


Inherited from ASTnode:

Public Methods

obool NotVirtualIsOfType( ASTtype T )
ovirtual void copyFrom( const ASTnode &copyFromMe )
ovirtual ASTnode* myParent(void)
ovirtual bool removeChild( ASTnode* child )
ovirtual bool removeMe( void )
ovirtual void setParent( ASTnode* p )
ovirtual bool unlinkMe( void )

Public Members

oenum ASTtype

Protected Methods

ovoid printIndent(int indent)


Inherited from ASTnodeWithPosBits:


Documentation

Holds a single tag name / tag value pair
ovirtual ASTnode::ASTtype myType(void)

ovirtual bool isOfType( ASTtype T )

ovirtual ~DataItemNode()
Destructor

ovirtual string myName() const
Return the name of the tag in this item

ostring myValue() const
Return the value of this item

ovirtual ASTlist<DataValueNode *> * returnLoopValues(const string & tagName)
Dummy do-nothing function needed to handle the fact that this is derived from DataNode, which defines this function as virtual

ovirtual void Unparse(int indent)

ovirtual void Unparse(int indent, int padsize)

oDataValueNode::ValType myDelimType(void) const
Returns the delimiter type of the value of this Data Item

ovoid setDelimType( DataValueNode::ValType )
Sets the delimiter type of the value of this Data Item

o

ovoid setName( const string &name )

ovoid setName( const char* name )

o Both these functions set the name of the tag.
Both these functions set the name of the tag. You should provide the leading undescore.

ovoid setValue( const string &val )

ovoid setValue( const char* val )

o Sets the string value of this node.
Sets the string value of this node. Do not use delimiters, instead use setDelimType to chose the delimiter style. just use the raw string here.

o DataItemNode(DataNameNode* name, DataValueNode* value)
Make a new item given the name and value. Note that these pointers refer to memory that you are "giving" to the node (don't delete them afterward, and don't pass addresses to stack variables - only addresses to heap variables.)

o DataItemNode(const string & name, const string & value)
Make a new item given the name and value as strings. The delimiter type will be chosen heuristicly as one that is legal for the value given.

o DataItemNode(const string & name, const string & value, DataValueNode::ValType type)
Make a new item given the name and value and delimiter type. Note that no checking is done to ensure that the delimiter type given is appropriate for the value given. (It is possible to make a value with spaces and tell it to be nonquoted, for example.)

o DataItemNode(DataItemNode & D)
Copy Constructor.

o DataItemNode( bool link, DataItemNode & D)
Copy with parallel link. Set "link" to true to create a copy with a parallel link, or set it to false to create a copy without a parallel link. See the external documentation for more details on parallel copies.

ovirtual List<ASTnode*> * searchByTag( string &searchFor )
Included for orthogonality with ASTnode. Not really very useful at this scope.

This search is case-insensitive. The names of things, according to the STAR specification, are supposed to be case-insensitive. This is being applied not only to tag names but also to saveframe names and datablock names.

ovirtual List<ASTnode*> * searchForType( ASTtype type, int delim = -1 )
Included for orthogonality with ASTnode. Not really very useful at this scope.

ovirtual List<ASTnode*> * searchByTagValue( string &tag, string &value )
Included for orthogonality with ASTnode. Not really very useful at this scope.

This search is case-insensitive. The names of things, according to the STAR specification, are supposed to be case-insensitive. This is being applied not only to tag names but also to saveframe names and datablock names.

(However, the values are case-sensitive. A search for a tag of _t1 is identical to a search for a tag of _T1, but a search for a value of "V1" is different from a search for a value of "v1".)

ovirtual bool unlinkChild( ASTnode* child )
unlinks the given ASTnode from this ASTnode, assuming that the given ASTnode is a child of this ASTnode. Does NOT call the destructor of the child node!! Use this function to remove the child from this ASTnode but not free it's space. RETURNS: true if the child was unlinked. false if the given ASTnode was not even in this class anywhere, and therefore nothing was done. This function MUST be overridden for each subclass of ASTnode.

ovirtual int myLongestStr( void ) const
Returns the length of the longest string in this object. Used by Unparse() at various levels of the AST tree. (In this case, it just returns the length of the tagname, not the data value)


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


Starlib is a creation of BioMagResBank: bmrb.wisc.edu starlib banner