PatternFileReader.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_PARSER_SUSETAGS_PATTERNFILEREADER_H
00013 #define ZYPP_PARSER_SUSETAGS_PATTERNFILEREADER_H
00014 
00015 #include <iosfwd>
00016 
00017 #include "zypp/parser/susetags/FileReaderBase.h"
00018 
00020 namespace zypp
00021 { 
00022 
00024   namespace data
00025   { 
00026     class Pattern;
00027     DEFINE_PTR_TYPE(Pattern);
00029   } // namespace data
00031 
00033   namespace parser
00034   { 
00035 
00036     namespace susetags
00037     { 
00038 
00040       //
00041       //        CLASS NAME : PatternFileReader
00042       //
00044       class PatternFileReader : public FileReaderBase
00045       {
00046         public:
00047           typedef function<void(const data::Pattern_Ptr &)> Consumer;
00048 
00049         public:
00051           PatternFileReader();
00053           virtual ~PatternFileReader();
00054 
00055         public:
00057           void setConsumer( const Consumer & fnc_r )
00058           { _consumer = fnc_r; }
00059 
00060         private:
00062           virtual void beginParse();
00064           virtual void consume( const SingleTagPtr & tag_r );
00066           virtual void consume( const MultiTagPtr & tag_r );
00068           virtual void endParse();
00069 
00070         private:
00071           class Impl;
00072           RW_pointer<Impl,rw_pointer::Scoped<Impl> > _pimpl;
00073 
00074           Consumer         _consumer;
00075       };
00077 
00079     } // namespace susetags
00082   } // namespace parser
00085 } // namespace zypp
00087 #endif // ZYPP_PARSER_SUSETAGS_PATTERNFILEREADER_H

Generated on Tue Sep 25 19:23:03 2007 for libzypp by  doxygen 1.5.3