class DataValueNode : public ASTnode

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

Inheritance:


Public Classes

enum ValType
ValType - the type of value this is
NON
not quoted
DOUBLE
double-quotes
SINGLE
single-quotes
SEMICOLON
semicolon-delimited
FRAMECODE
framecode (puts a dollar sign in front)

Public Methods

DataValueNode ( bool link, DataValueNode © )
Copy with parallel link
DataValueNode ( DataValueNode © )
Copy constructor.
DataValueNode (const char *str, ValType type )
DataValueNode (const string &str, ValType type )
DataValueNode (const char *str)
virtual bool isOfType ( ASTtype T )
ValType myDelimType ( void ) const
Returns the type of the DataValueNode - indicating what kind of string delimiter it has
virtual int myLongestStr ( void )
Returns the length of the longest string in this object
string myName () const
virtual ASTnode::ASTtype myType (void)
string myValue ( void ) const
Returns the string value of this node
virtual bool operator< (const string &str)
virtual bool operator< (const char *str)
virtual bool operator<= (const char *str)
virtual bool operator<= (const string &str)
virtual bool operator== (const string &str)
For comparing values as strings
virtual bool operator== (const char *str)
virtual bool operator> (const char *str)
virtual bool operator> (const string &str)
virtual bool operator>= (const string &str)
virtual bool operator>= (const char *str)
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
virtual void Unparse (int indent)
virtual void Unparse (int indent, int presize, int postsize)
This function is public for reasons of technical difficulty

Public


void setValue ( const string &newVal )
void setValue ( const char *newVal )

Changes the value of this string

Protected Fields

string myStrVal

Inherited from ASTnode:

Public Classes

enum ASTtype
ASTNODE
BLOCKNODE
DATABLOCKNODE
DATAFILENODE
DATAHEADINGNODE
DATAITEMNODE
DATALISTNODE
DATALOOPNAMELISTNODE
DATALOOPDEFLISTNODE
DEPRECIATED - Do not use:
DATALOOPNODE
DATALOOPVALLISTNODE
DATANAMENODE
DATANODE
DATAVALUENODE
GLOBALBLOCKNODE
GLOBALHEADINGNODE
HEADINGNODE
LOOPROWNODE
ITERNODE
DEPRECIATED - Do not use:
LOOPNAMELISTNODE
LOOPDEFLISTNODE
DEPRECIATED - Do not use:
LOOPTABLENODE
LOOPITER
DEPRECIATED - Do not use:
LOOPVALLISTNODE
DEPRECIATED - Do not use:
SAVEFRAMELISTNODE
SAVEFRAMENODE
SAVEHEADINGNODE
STARLISTNODE
STARFILENODE

Public Methods

virtual void copyFrom( const ASTnode ©FromMe )
virtual ASTnode* myParent(void)
bool NotVirtualIsOfType( ASTtype T )
virtual bool removeChild( ASTnode *child )
virtual bool removeMe( void )
virtual List <ASTnode*> * searchByTag( char *searchFor)
virtual List <ASTnode*> * searchByTag( string &searchFor)
virtual List <ASTnode*> * searchForType( ASTtype type, int delim = -1)
virtual void setParent( ASTnode *p )
virtual size_t sizeOfMe(void)
virtual bool unlinkChild( ASTnode *child )
virtual bool unlinkMe( void )

Documentation

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

NON
not quoted

DOUBLE
double-quotes

SINGLE
single-quotes

SEMICOLON
semicolon-delimited

FRAMECODE
framecode (puts a dollar sign in front)

virtual ASTnode::ASTtype myType(void)

virtual bool isOfType( ASTtype T )

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

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

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

void setValue( const string &newVal )

void setValue( const char *newVal )

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 *

DataValueNode(const char *str)

DataValueNode(const string &str, ValType type )

DataValueNode(const char *str, ValType type )

DataValueNode( DataValueNode © )
Copy constructor.

DataValueNode( bool link, DataValueNode © )
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.

string myName() const

virtual void Unparse(int indent)

virtual 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).

virtual 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.)

virtual bool operator== (const char *str)

virtual bool operator< (const string &str)

virtual bool operator> (const string &str)

virtual bool operator<=(const string &str)

virtual bool operator>=(const string &str)

virtual bool operator< (const char *str)

virtual bool operator> (const char *str)

virtual bool operator<=(const char *str)

virtual bool operator>=(const char *str)

string myStrVal

virtual 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.)


This class has no child classes.

alphabetic index hierarchy of classes


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

generated by doc++