class DataValueNode

This is the type that holds a single string value from the star file, and the delimiter type that is used to quote it

Inheritance:


Public Methods

[more] DataValueNode (const char* str, ValType type )
[more] DataValueNode (const char* str)
[more] DataValueNode ( DataValueNode &copy )
Copy constructor
[more] DataValueNode ( bool link, DataValueNode &copy )
Copy with parallel link.
[more] DataValueNode (const string &str, ValType type )
[more]virtual void Unparse (int indent)
[more]virtual void Unparse (int indent, int presize, int postsize)
This function is public for reasons of technical difficulty.
[more]virtual bool isOfType ( ASTtype T )
[more]ValType myDelimType ( void ) const
Returns the type of the DataValueNode - indicating what kind of string delimiter it has
[more]virtual int myLongestStr ( void )
Returns the length of the longest string in this object.
[more]string myName () const
[more]virtual ASTnode::ASTtype myType (void)
[more]string myValue ( void ) const
Returns the string value of this node.
[more]virtual bool operator< (const char* str)
[more]virtual bool operator< (const string &str)
[more]virtual bool operator<= (const string &str)
[more]virtual bool operator<= (const char* str)
[more]virtual bool operator== (const char* str)
[more]virtual bool operator== (const string &str)
For comparing values as strings.
[more]virtual bool operator> (const string &str)
[more]virtual bool operator> (const char* str)
[more]virtual bool operator>= (const char* str)
[more]virtual bool operator>= (const string &str)
[more]void setDelimType ( ValType setTo )
Sets the type of string value this is, and consequently, what kind of delimiter to use when printing this node out

Public Members

[more]
[more]enum ValType
ValType - the type of value this is

Protected Fields

[more]string myStrVal


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 List<ASTnode*> * searchByTag( char* searchFor)
ovirtual List<ASTnode*> * searchByTag( string &searchFor)
ovirtual List<ASTnode*> * searchForType( ASTtype type, int delim = -1)
ovirtual void setParent( ASTnode* p )
ovirtual bool unlinkChild( ASTnode* child )
ovirtual bool unlinkMe( void )

Public Members

oenum ASTtype

Protected Methods

ovoid printIndent(int indent)


Inherited from ASTnodeWithPosBits:


Documentation

This is the type that holds a single string value from the star file, and the delimiter type that is used to quote it
oenum ValType
ValType - the type of value this is

o NON
not quoted

o DOUBLE
double-quotes

o SINGLE
single-quotes

o SEMICOLON
semicolon-delimited

o FRAMECODE
framecode (puts a dollar sign in front)

ovirtual ASTnode::ASTtype myType(void)

ovirtual bool isOfType( ASTtype T )

oValType myDelimType( void ) const
Returns the type of the DataValueNode - indicating what kind of string delimiter it has

ovoid setDelimType( ValType setTo )
Sets the type of string value this is, and consequently, what kind of delimiter to use when printing this node out

ostring myValue( void ) const
Returns the string value of this node. This is identical to myName(), and is included just for completeness.

o

ovoid setValue( const string &newVal )

ovoid setValue( const char* newVal )

o Changes the value of this string.
Changes the value of this string. *DO NOT* inlcude delimiters when using this function. Use setType() to set the delimiter style instead. For example, to set the value to a framecode (dollar-sign on the front), make two seperate function calls like so:
	*     val->setValue( "new_value" );
	*     val->setType( DataValudeNode::FRAMECODE );
	* 
Do *NOT* do this:
	*     val->setValue( "$new_value" );
	* 
There are two overloaded versions: one for string and one for char *

o DataValueNode(const char* str)

o DataValueNode(const string &str, ValType type )

o DataValueNode(const char* str, ValType type )

o DataValueNode( DataValueNode &copy )
Copy constructor

o DataValueNode( bool link, DataValueNode &copy )
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.

ostring myName() const

ovirtual void Unparse(int indent)

ovirtual void Unparse(int indent, int presize, int postsize)
This function is public for reasons of technical difficulty. You should not need to call it yourself. Instead call the other version of Unparse: Unparse(int).

ovirtual bool operator== (const string &str)
For comparing values as strings. (Gripe to Mr. B. Stroustrup: Why did you make me have to define these operations seperately!? Isn't it enough for me to define "==" and "<", and then the compiler can derive code for the rest of them from just those two? Like so:
    *      a != b   <==>  !( a == b )
    *      a >= b   <==>  !( a < b )
    *      a > b    <==>  !( a < b ) && !( a == b )
    *      ... etc ...
    * 
End Gripe.)

ovirtual bool operator== (const char* str)

ovirtual bool operator< (const string &str)

ovirtual bool operator> (const string &str)

ovirtual bool operator<=(const string &str)

ovirtual bool operator>=(const string &str)

ovirtual bool operator< (const char* str)

ovirtual bool operator> (const char* str)

ovirtual bool operator<=(const char* str)

ovirtual bool operator>=(const char* str)

ostring myStrVal

ovirtual int myLongestStr( void )
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 longest string, plus whatever extra the quotation marks might need.)


Direct child classes:
DVNWithPos

Alphabetic index HTML hierarchy of classes or Java


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