Luiza  v03-01
Public Member Functions | Protected Member Functions | List of all members
luiza::Parser Class Reference

#include <Parser.h>

Inheritance diagram for luiza::Parser:
luiza::IParser

Public Member Functions

StringParameters * getParameters (const std::string &sectionName) const
 
void setCmdLineParameters (const CommandLineParametersMap &cmdlineparams)
 
void parse ()
 

Protected Member Functions

int readNextValidLine (std::string &str, std::istream &stream)
 

Detailed Description

Simple parser class for Marlin. Creates Parameter objects for all sections in a steering file defined by enclosing
.begin SectionName
.end
Parameters are defined for every line that doesn't start with #. The first string is the name of the parameter (key) the rest of the line is interpreted as the list of values separated by whitespace. Values from multiple lines starting with the same name/key are appended to the corresponding list.

Author
F. Gaede, DESY
Version
Id
Parser.h,v 1.3 2005-10-11 12:56:28 gaede Exp

Member Function Documentation

StringParameters * luiza::Parser::getParameters ( const std::string &  sectionName) const
virtual

Return the StringParameters defined for this section of the steering file

Implements luiza::IParser.

void luiza::Parser::parse ( )
virtual

Parse the input file

Implements luiza::IParser.

References readNextValidLine().

int luiza::Parser::readNextValidLine ( std::string &  str,
std::istream &  stream 
)
protected

Helper method that reads the next line from a stream that is not empty or starts with a '#'

Referenced by parse().

void luiza::Parser::setCmdLineParameters ( const CommandLineParametersMap &  cmdlineparams)
inlinevirtual

set command line parameters

Implements luiza::IParser.


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