1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/ZYppFactory.h
12 #ifndef ZYPP_ZYPPFACTORY_H
13 #define ZYPP_ZYPPFACTORY_H
17 #include "zypp/ZYpp.h"
19 ///////////////////////////////////////////////////////////////////
21 { /////////////////////////////////////////////////////////////////
23 ///////////////////////////////////////////////////////////////////
25 // CLASS NAME : ZYppFactory
27 /** ZYpp factory class (Singleton)
31 friend std::ostream & operator<<( std::ostream & str, const ZYppFactory & obj );
35 static ZYppFactory instance();
40 /** \return Pointer to the ZYpp instance. */
41 ZYpp::Ptr getZYpp() const;
47 ///////////////////////////////////////////////////////////////////
49 /** \relates ZYppFactory Stream output */
50 std::ostream & operator<<( std::ostream & str, const ZYppFactory & obj );
52 /** \relates ZYppFactory Convenience to get the Pointer
53 * to the ZYpp instance.
55 inline ZYpp::Ptr getZYpp()
56 { return ZYppFactory::instance().getZYpp(); }
58 /////////////////////////////////////////////////////////////////
60 ///////////////////////////////////////////////////////////////////
61 #endif // ZYPP_ZYPPFACTORY_H