ZYppFactory.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_ZYPPFACTORY_H
00013 #define ZYPP_ZYPPFACTORY_H
00014 
00015 #include <iosfwd>
00016 
00017 #include "zypp/base/Exception.h"
00018 #include "zypp/ZYpp.h"
00019 
00021 namespace zypp
00022 { 
00023 
00024   class ZYppFactoryException : public Exception
00025   {
00026   public:
00027     ZYppFactoryException( const std::string & msg_r );
00028   };
00029 
00031   //
00032   //    CLASS NAME : ZYppFactory
00033   //
00036   class ZYppFactory
00037   {
00038     friend std::ostream & operator<<( std::ostream & str, const ZYppFactory & obj );
00039 
00040   public:
00042     static ZYppFactory instance();
00044     ~ZYppFactory();
00045 
00046   public:
00050     ZYpp::Ptr getZYpp() const;
00051 
00052   private:
00054     ZYppFactory();
00055   };
00057 
00059   std::ostream & operator<<( std::ostream & str, const ZYppFactory & obj );
00060 
00065   inline ZYpp::Ptr getZYpp()
00066   { return ZYppFactory::instance().getZYpp(); }
00067 
00069 } // namespace zypp
00071 #endif // ZYPP_ZYPPFACTORY_H

Generated on Thu Jul 6 00:07:29 2006 for zypp by  doxygen 1.4.6