zypp::parser::IniParser Class Reference

Basic SUSEtags parser. More...

#include <IniParser.h>

Inheritance diagram for zypp::parser::IniParser:

NonCopyable zypp::parser::IniDict List of all members.

Public Member Functions

 IniParser ()
 Default ctor.
virtual ~IniParser ()
 Dtor.
void parse (const InputStream &imput_r)
 Parse the stream.
virtual void beginParse ()
 Called when start parsing.
virtual void consume (const std::string &section)
 Called when a section is found.
virtual void consume (const std::string &section, const std::string &key, const std::string &value)
 Called when a key value is found.
virtual void endParse ()
 Called when the parse is done.
const std::string & inputname () const
 Name of the current InputStream.

Private Attributes

std::string _inputname
std::string _current_section
int _line_nr

Detailed Description

Basic SUSEtags parser.

Will replace parser/tagfile/ and parser/taggedfile/ stuff.

Definition at line 37 of file IniParser.h.


Constructor & Destructor Documentation

zypp::parser::IniParser::IniParser  ) 
 

Default ctor.

Definition at line 35 of file IniParser.cc.

zypp::parser::IniParser::~IniParser  )  [virtual]
 

Dtor.

Definition at line 44 of file IniParser.cc.


Member Function Documentation

void zypp::parser::IniParser::parse const InputStream imput_r  ) 
 

Parse the stream.

Exceptions:
ParseException on errors. Invoke consume for each tag. consume might throw other exceptions as well.

Definition at line 64 of file IniParser.cc.

References _current_section, _inputname, beginParse(), consume(), zypp::str::ltrim(), MIL, zypp::InputStream::name(), zypp::iostr::EachLine::next(), zypp::str::rtrim(), and zypp::str::trim().

Referenced by zypp::parser::IniDict::read().

void zypp::parser::IniParser::beginParse  )  [virtual]
 

Called when start parsing.

Definition at line 47 of file IniParser.cc.

Referenced by parse().

void zypp::parser::IniParser::consume const std::string &  section  )  [virtual]
 

Called when a section is found.

Reimplemented in zypp::parser::IniDict.

Definition at line 53 of file IniParser.cc.

Referenced by parse().

void zypp::parser::IniParser::consume const std::string &  section,
const std::string &  key,
const std::string &  value
[virtual]
 

Called when a key value is found.

Reimplemented in zypp::parser::IniDict.

Definition at line 50 of file IniParser.cc.

void zypp::parser::IniParser::endParse  )  [virtual]
 

Called when the parse is done.

Definition at line 56 of file IniParser.cc.

const std::string& zypp::parser::IniParser::inputname  )  const [inline]
 

Name of the current InputStream.

Definition at line 62 of file IniParser.h.

References _inputname.


Member Data Documentation

std::string zypp::parser::IniParser::_inputname [private]
 

Definition at line 68 of file IniParser.h.

Referenced by inputname(), and parse().

std::string zypp::parser::IniParser::_current_section [private]
 

Definition at line 69 of file IniParser.h.

Referenced by parse().

int zypp::parser::IniParser::_line_nr [private]
 

Definition at line 70 of file IniParser.h.


The documentation for this class was generated from the following files:
Generated on Thu Apr 24 02:25:10 2008 for zypp by  doxygen 1.4.6