--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/parser/IniDict.cc
+ *
+*/
+#include <iostream>
+//#include "zypp/base/Logger.h"
+#include <map>
+#include <string>
+#include "zypp/parser/IniDict.h"
+
+using namespace std;
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace parser
+ { /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : IniDict
+ //
+ ///////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : IniDict::IniDict
+ // METHOD TYPE : Ctor
+ //
+ IniDict::IniDict( const InputStream &is )
+ {
+ parse(is);
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : IniDict::~IniDict
+ // METHOD TYPE : Dtor
+ //
+ IniDict::~IniDict()
+ {}
+
+ void IniDict::consume( const std::string §ion )
+ {
+ // do nothing for now.
+ }
+
+ void IniDict::consume( const std::string §ion, const std::string &key, const std::string &value )
+ {
+ _dict[section][key] = value;
+ }
+
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : operator<<
+ ** FUNCTION TYPE : std::ostream &
+ */
+ std::ostream & operator<<( std::ostream & str, const IniDict & obj )
+ {
+ return str;
+ }
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace parser
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/parser/IniDict.h
+ *
+*/
+#ifndef ZYPP_PARSER_INIDICT_H
+#define ZYPP_PARSER_INIDICT_H
+
+#include <iosfwd>
+#include <map>
+#include <string>
+
+#include "zypp/base/PtrTypes.h"
+#include "zypp/base/InputStream.h"
+#include "zypp/parser/IniParser.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace parser
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : IniDict
+ //
+ /**
+ *
+ */
+ class IniDict : public IniParser
+ {
+ friend std::ostream & operator<<( std::ostream & str, const IniDict & obj );
+ public:
+ /** Default ctor */
+ IniDict( const InputStream &is );
+ /** Dtor */
+ ~IniDict();
+
+ public:
+
+ /** Called when a section is found. */
+ virtual void consume( const std::string §ion );
+ /** Called when a key value is found. */
+ virtual void consume( const std::string §ion, const std::string &key, const std::string &value );
+
+ private:
+ std::map<std::string, std::map<std::string, std::string> > _dict;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates IniDict Stream output */
+ std::ostream & operator<<( std::ostream & str, const IniDict & obj );
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace parser
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_PARSER_INIDICT_H