1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Target.h
17 #include "zypp/base/PtrTypes.h"
19 #include "zypp/ResStore.h"
20 #include "zypp/Pathname.h"
21 #include "zypp/target/TargetImpl.h"
23 ///////////////////////////////////////////////////////////////////
25 { /////////////////////////////////////////////////////////////////
34 DEFINE_PTR_TYPE(Target);
36 ///////////////////////////////////////////////////////////////////
38 // CLASS NAME : Target
42 class Target : public base::ReferenceCounted, public base::NonCopyable
45 typedef target::TargetImpl Impl;
46 typedef intrusive_ptr<Impl> Impl_Ptr;
50 /** All resolvables provided by the target. */
51 const ResStore & resolvables();
52 /** Null implementation */
53 static Target_Ptr nullimpl();
54 /** Refference to the RPM database */
55 target::rpm::RpmDb & rpmDb();
59 Target( const Pathname & root = "/" );
62 Target( const Impl_Ptr & impl_r );
65 friend std::ostream & operator<<( std::ostream & str, const Target & obj );
67 std::ostream & dumpOn( std::ostream & str ) const;
70 /** Pointer to implementation */
71 RW_pointer<Impl,rw_pointer::Intrusive<Impl> > _pimpl;
73 static Target_Ptr _nullimpl;
77 ///////////////////////////////////////////////////////////////////
79 /** \relates Target Stream output. */
80 inline std::ostream & operator<<( std::ostream & str, const Target & obj )
81 { return obj.dumpOn( str ); }
84 /////////////////////////////////////////////////////////////////
86 ///////////////////////////////////////////////////////////////////
87 #endif // ZYPP_TARGET_H