StarParser Class Reference

parser for the STAR file format More...

#include <star_parser.hh>


Public Member Functions

 StarParser (std::istream &istream)
virtual ~StarParser ()
virtual bool OnBeginLoop (const StarLoopDesc &header)
virtual void OnEndLoop ()
virtual void OnDataRow (const StarLoopDesc &header, const std::vector< StringRef > &columns)
virtual void OnDataItem (const StarDataItem &item)
virtual bool OnBeginData (const StringRef &data_name)
virtual void OnEndData ()
void Parse ()
 StarParser (std::istream &istream)
virtual ~StarParser ()
virtual bool OnBeginLoop (const StarLoopDesc &header)
virtual void OnEndLoop ()
virtual void OnDataRow (const StarLoopDesc &header, const std::vector< StringRef > &columns)
virtual void OnDataItem (const StarDataItem &item)
virtual bool OnBeginData (const StringRef &data_name)
virtual void OnEndData ()
void Parse ()

Static Public Member Functions

static bool SplitLine (const StringRef &line, std::vector< StringRef > &parts, bool clear=true)
static bool SplitLine (const StringRef &line, std::vector< StringRef > &parts, bool clear=true)


Detailed Description

parser for the STAR file format

STAR format description

In essence, STAR files are structured text files. A few simple control structures control the interpretation of the content.

Definition at line 96 of file star_parser.hh.


Constructor & Destructor Documentation

StarParser ( std::istream &  istream  ) 

virtual ~StarParser (  )  [inline, virtual]

Definition at line 100 of file star_parser.hh.

StarParser ( std::istream &  istream  ) 

virtual ~StarParser (  )  [inline, virtual]

Definition at line 100 of file star_parser.hh.


Member Function Documentation

virtual bool OnBeginData ( const StringRef data_name  )  [inline, virtual]

invoked when a new data control structure is encountered

Returns:
When true, for each data-item belonging to the data block, OnDataItem() is invoked. For every loop, OnBeginLoop() is called.

Definition at line 125 of file star_parser.hh.

virtual bool OnBeginData ( const StringRef data_name  )  [inline, virtual]

invoked when a new data control structure is encountered

Returns:
When true, for each data-item belonging to the data block, OnDataItem() is invoked. For every loop, OnBeginLoop() is called.

Definition at line 125 of file star_parser.hh.

virtual bool OnBeginLoop ( const StarLoopDesc header  )  [inline, virtual]

called when a loop is encountered

Returns:
When true, for each row in the loop, OnDataRow() is returned. If false, the loop is skipped.

Definition at line 107 of file star_parser.hh.

virtual bool OnBeginLoop ( const StarLoopDesc header  )  [inline, virtual]

called when a loop is encountered

Returns:
When true, for each row in the loop, OnDataRow() is returned. If false, the loop is skipped.

Definition at line 107 of file star_parser.hh.

virtual void OnDataItem ( const StarDataItem item  )  [inline, virtual]

invoked when a data item is encountered

Definition at line 120 of file star_parser.hh.

virtual void OnDataItem ( const StarDataItem item  )  [inline, virtual]

invoked when a data item is encountered

Definition at line 120 of file star_parser.hh.

virtual void OnDataRow ( const StarLoopDesc header,
const std::vector< StringRef > &  columns 
) [inline, virtual]

invoked when a data row in a loop is encountered.

Parameters:
header describes the row format
columns contains the data columns

Definition at line 115 of file star_parser.hh.

virtual void OnDataRow ( const StarLoopDesc header,
const std::vector< StringRef > &  columns 
) [inline, virtual]

invoked when a data row in a loop is encountered.

Parameters:
header describes the row format
columns contains the data columns

Definition at line 115 of file star_parser.hh.

virtual void OnEndData (  )  [inline, virtual]

called when leaving a datasection. Will only be invoked when OnBeginData() returned true.

Definition at line 129 of file star_parser.hh.

virtual void OnEndData (  )  [inline, virtual]

called when leaving a datasection. Will only be invoked when OnBeginData() returned true.

Definition at line 129 of file star_parser.hh.

virtual void OnEndLoop (  )  [inline, virtual]

invoked when leaving a loop

OnEndLoop() is only invoked, when OnBeginLoop() returned true.

Definition at line 111 of file star_parser.hh.

virtual void OnEndLoop (  )  [inline, virtual]

invoked when leaving a loop

OnEndLoop() is only invoked, when OnBeginLoop() returned true.

Definition at line 111 of file star_parser.hh.

void Parse (  ) 

void Parse (  ) 

static bool SplitLine ( const StringRef line,
std::vector< StringRef > &  parts,
bool  clear = true 
) [static]

static bool SplitLine ( const StringRef line,
std::vector< StringRef > &  parts,
bool  clear = true 
) [static]


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

Generated on Fri Jul 2 14:23:07 2010 for OpenStructure by  doxygen 1.5.8