1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/target/TargetImpl.h
12 #ifndef ZYPP_TARGET_TARGETIMPL_H
13 #define ZYPP_TARGET_TARGETIMPL_H
17 #include "zypp/base/ReferenceCounted.h"
18 #include "zypp/base/NonCopyable.h"
19 #include "zypp/base/PtrTypes.h"
20 #include "zypp/ResStore.h"
22 #include "zypp/Pathname.h"
23 #include "zypp/media/MediaAccess.h"
24 #include "zypp/Target.h"
25 #include "zypp/target/rpm/RpmDb.h"
27 ///////////////////////////////////////////////////////////////////
29 { /////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////
32 { /////////////////////////////////////////////////////////////////
34 DEFINE_PTR_TYPE(TargetImpl);
36 ///////////////////////////////////////////////////////////////////
38 // CLASS NAME : TargetImpl
40 /** Base class for concrete Target implementations.
42 * Constructed by \ref TargetFactory. Public access via \ref Target
45 class TargetImpl : public base::ReferenceCounted, private base::NonCopyable
47 friend std::ostream & operator<<( std::ostream & str, const TargetImpl & obj );
51 TargetImpl(const Pathname & root_r = "/");
53 virtual ~TargetImpl();
55 /** Null implementation */
56 static TargetImpl_Ptr nullimpl();
60 /** All resolvables in the target. */
61 const ResStore & resolvables();
63 /** Comomit changes in the pool */
64 #warning Add support for multiple medias - eg. limit only to CD1
65 void commit(ResPool pool_r);
67 /** Overload to realize stream output. */
68 virtual std::ostream & dumpOn( std::ostream & str ) const
69 { return str << "TargetImpl"; }
71 /** The RPM database */
75 /** All resolvables provided by the target. */
77 /** Path to the target */
82 /** Null implementation */
83 static TargetImpl_Ptr _nullimpl;
85 ///////////////////////////////////////////////////////////////////
87 /** \relates TargetImpl Stream output */
88 inline std::ostream & operator<<( std::ostream & str, const TargetImpl & obj )
89 { return obj.dumpOn( str ); }
91 /////////////////////////////////////////////////////////////////
93 ///////////////////////////////////////////////////////////////////
94 /////////////////////////////////////////////////////////////////
96 ///////////////////////////////////////////////////////////////////
97 #endif // ZYPP_TARGET_TARGETIMPL_H