class SaveFrameNode : public DataNode

This is a save frame from the STAR file

Inheritance:


Public Methods

StarFileNode::Status AddDataItem (const string & name, const string & value, DataValueNode::ValType type )
DEPRECIATED - use the STL vector operations instead.
void AddItemToSaveFrame (DataNode* S)
DEPRECIATED - use the STL vector operations instead.
StarFileNode::Status AddLoop (const string &tflag = string("tabulate"))
DEPRECIATED - use the STL vector operations instead.
StarFileNode::Status AddLoopDataName (const string & name)
DEPRECIATED - use the STL vector operations instead.
StarFileNode::Status AddLoopDataValue ( const string & value, DataValueNode::ValType type )
DEPRECIATED - use the STL vector operations instead.
void changeName (const string &name)
Set the name of this saveframe
ASTlist <DataNode*> * GiveMyDataList ()
Return the list (STL vector) of the DataItemNodes and DataLoopNodes in this saveframe
virtual bool isOfType ( ASTtype T )
virtual int myLongestStr ( void ) const
Returns the length of the longest string in this object
string myName () const
Return the name of this saveframe. (includes the "save_" prefix
virtual ASTnode::ASTtype myType (void)
virtual ASTlist <DataValueNode *> * returnLoopValues (const string & tagName)
DEPRECIATED - use the STL vector operations instead.
DataNode* ReturnSaveFrameDataNode (string dataItemName)
Given a name of a DataItem, return it (or NULL if it can't be found).
DataNode* ReturnSaveFrameDeepLook ( string dataItemName, int *nest, int *col )
DEPRECIATED - use searchByTag instead @see searchByTag
virtual List <ASTnode*> * searchByTag ( const string &searchFor )
Given a tag name, find the AST object it resides in
virtual List <ASTnode*> * searchByTagValue ( const string &tag, const string &value )
Given a tag name and a value, find the AST object that that particular tag and value pair resides in
virtual List <ASTnode*> * searchForType ( ASTtype type, int delim = -1 )
This method returns a list of all the nodes of the given type that are inside this node, or children of this node, or children of children of this node, etc all the way down to the leaf nodes
virtual bool unlinkChild ( ASTnode *child )
remove the child from this ASTnode but not free it's space.
virtual void Unparse (int indent)
virtual void Unparse (int indent, int padsize )
virtual ~SaveFrameNode ()
Destructor.

Public


virtual const string& getPreComment ( void )
virtual void setPreComment ( const string &cmt )

These functions are used to give some nodes in the AST tree the ability to remember a comment to be pasted into the file in front of that node

SaveFrameNode (const string & name)
Make a new empty save frame with the given name.
SaveFrameNode::SaveFrameNode ( SaveFrameNode &S )
Copy constructor.
SaveFrameNode::SaveFrameNode ( bool link, SaveFrameNode &S )
Copy with parallel link
SaveFrameNode (SaveHeadingNode *h, SaveFrameListNode *l)

Inherited from DataNode:


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 void setParent( ASTnode *p )
virtual bool unlinkMe( void )

Inherited from ASTnodeWithPosBits:


Documentation

This is a save frame from the STAR file

SaveFrameNode(const string & name)
Make a new empty save frame with the given name.

SaveFrameNode::SaveFrameNode( SaveFrameNode &S )
Copy constructor.

SaveFrameNode::SaveFrameNode( bool link, SaveFrameNode &S )
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.

SaveFrameNode(SaveHeadingNode *h, SaveFrameListNode *l)

virtual ~SaveFrameNode()
Destructor.

string myName() const
Return the name of this saveframe. (includes the "save_" prefix

void changeName(const string &name)
Set the name of this saveframe. (Mus inculde the "save_" prefix manually.

virtual const string& getPreComment( void )

virtual void setPreComment( const string &cmt )

These functions are used to give some nodes in the AST tree the ability to remember a comment to be pasted into the file in front of that node. This is useful if you want to insert header comments of some sort into the output produced by Unparse(). As of this writing, no provisions are being made to handle the parsing of comments from the original file and storing them via these functions. The grammar to do that would be rather convoluted. These functions are only intended to be used by programs insterting their own comments after the file has been read.

In the interest of saving memory, the preComment ability only exists at the level of saveframenodes and blocknodes. If you attempt to use these functions at other levels, nothing will happen (the comment will always be empty).

The string must contain the comment characters embedded inside, like so: "# this is a\n# multiline comment.", not like this: "this is a\nmultiline comment." This is so that the caller is allowed to have the comment contain blank lines like this:

# This is an example comment.

# The comment has some blank

# lines in it.
If the Unparse() function were designed to insert the comment characters (#) itself, then such a comment block would be impossible to create.

Note that the comment lines are not syntax-checked in any way, so using these functions it is entirely possible to create invalid STAR files, since these "comments" can really be strings with anything at all in them - so be careful.

To get rid of the preComment if you change your mind, set it to a zero-length string with setPreComment().

DataNode* ReturnSaveFrameDataNode(string dataItemName)
Given a name of a DataItem, return it (or NULL if it can't be found).

ASTlist <DataNode*> * GiveMyDataList()
Return the list (STL vector) of the DataItemNodes and DataLoopNodes in this saveframe. Manipulations such as insert() and erase() on this list will directly insert or delete things from the saveframe itself.

virtual void Unparse(int indent)

virtual void Unparse(int indent, int padsize )

virtual ASTnode::ASTtype myType(void)

virtual bool isOfType( ASTtype T )

virtual ASTlist <DataValueNode *> * returnLoopValues(const string & tagName)
DEPRECIATED - use the STL vector operations instead.

void AddItemToSaveFrame(DataNode* S)
DEPRECIATED - use the STL vector operations instead.

StarFileNode::Status AddDataItem(const string & name, const string & value, DataValueNode::ValType type )
DEPRECIATED - use the STL vector operations instead.

StarFileNode::Status AddLoop(const string &tflag = string("tabulate"))
DEPRECIATED - use the STL vector operations instead.

StarFileNode::Status AddLoopDataName(const string & name)
DEPRECIATED - use the STL vector operations instead.

StarFileNode::Status AddLoopDataValue( const string & value, DataValueNode::ValType type )
DEPRECIATED - use the STL vector operations instead.

DataNode* ReturnSaveFrameDeepLook( string dataItemName, int *nest, int *col )
DEPRECIATED - use searchByTag instead @see searchByTag

virtual List <ASTnode*> * searchByTag( const string &searchFor )
Given a tag name, find the AST object it resides in. It returns a pointer to the lowest level AST object that the tag resides in. The caller of this function needs to use the isOfType() and/or myType() methods to determine what type to cst the object. Returns a NULL if nothing was found.

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.

WARNING: The list returned is allocated in heap space. It is the caller's responsibility to delete the list after it is no longer needed.

Parameters:
searchFor - Look for this string as the tag name.

virtual List <ASTnode*> * searchForType( ASTtype type, int delim = -1 )
This method returns a list of all the nodes of the given type that are inside this node, or children of this node, or children of children of this node, etc all the way down to the leaf nodes
Parameters:
type - the type to search for
delim - the delimiter to search for if searching for DataValueNodes. The default is "dont-care".

virtual List <ASTnode*> * searchByTagValue( const string &tag, const string &value )
Given a tag name and a value, find the AST object that that particular tag and value pair resides in. This is like performing an SQL search: WHERE tag = value.

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

WARNING: The list returned is allocated in heap space. It is the caller's responsibility to delete the list after it is no longer needed.

Parameters:
tag - Look for this tag...
value - ...where it has this value.

virtual bool unlinkChild( ASTnode *child )
remove the child from this ASTnode but not free it's space.

virtual 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 heading of the heading of this saveframe: )


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++