PatternExpander.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_UI_PATTERNEXPANDER_H
00013 #define ZYPP_UI_PATTERNEXPANDER_H
00014 
00015 #include <iosfwd>
00016 #include <map>
00017 
00018 #include "zypp/base/PtrTypes.h"
00019 #include "zypp/base/NonCopyable.h"
00020 #include "zypp/base/DefaultIntegral.h"
00021 #include "zypp/base/Iterator.h"
00022 
00023 #include "zypp/Pattern.h"
00024 
00026 namespace zypp
00027 { 
00028 
00029   class ResPool;
00030 
00032   namespace ui
00033   { 
00034 
00036     //
00037     //  CLASS NAME : PatternExpander
00038     //
00045     class PatternExpander : private base::NonCopyable
00046     {
00047     private:
00048       class Impl;
00049       typedef std::map<Pattern::constPtr,
00050                        DefaultIntegral<bool, false> > PatternMap;
00051 
00052     public:
00053       typedef PatternMap::size_type size_type;
00054       typedef PatternMap::key_type  value_type;
00055       typedef MapKVIteratorTraits<PatternMap>::Key_const_iterator const_iterator;
00056 
00057     public:
00059       PatternExpander( const ResPool & pool_r );
00060 
00061     public:
00066       size_type expand( const ResObject::constPtr & obj_r )
00067       { return expand( asKind<Pattern>(obj_r) ); }
00068 
00069       size_type expand( const Pattern::constPtr & pat_r );
00071 
00074       size_type size() const;
00075 
00076       bool empty() const;
00077 
00078       const_iterator begin() const;
00079 
00080       const_iterator end() const;
00082 
00083     private:
00085       RW_pointer<Impl> _pimpl;
00086     };
00088 
00090   } // namespace ui
00093 } // namespace zypp
00095 #endif // ZYPP_UI_PATTERNEXPANDER_H

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