1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Target.cc
16 #include "zypp/Target.h"
17 #include "zypp/target/TargetImpl.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
25 IMPL_PTR_TYPE(Target);
27 ///////////////////////////////////////////////////////////////////
29 // METHOD NAME : Target::Target
32 Target::Target( const Pathname & root, bool doRebuild_r )
33 : _pimpl( new Impl(root,doRebuild_r) )
37 ///////////////////////////////////////////////////////////////////
39 // METHOD NAME : Target::Target
42 Target::Target( const Impl_Ptr & impl_r )
48 Target_Ptr Target::_nullimpl;
50 /** Null implementation */
51 Target_Ptr Target::nullimpl()
55 _nullimpl = new Target(target::TargetImpl::nullimpl());
60 std::ostream & operator<<( std::ostream & str, const Target::DistributionLabel & obj )
62 str << "summary=" << obj.summary << endl;
63 str << "shortName=" << obj.shortName << endl;
67 ///////////////////////////////////////////////////////////////////
69 // Forward to TargetImpl:
71 ///////////////////////////////////////////////////////////////////
73 void Target::buildCache()
74 { _pimpl->buildCache(); }
76 void Target::cleanCache()
77 { _pimpl->clearCache(); }
85 target::rpm::RpmDb & Target::rpmDb()
86 { return _pimpl->rpm(); }
88 Pathname Target::root() const
89 { return _pimpl->root(); }
91 bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
92 { return _pimpl->providesFile (name_str, path_str); }
94 std::string Target::whoOwnsFile (const std::string & path_str) const
95 { return _pimpl->whoOwnsFile (path_str); }
97 std::ostream & Target::dumpOn( std::ostream & str ) const
98 { return _pimpl->dumpOn( str ); }
100 Date Target::timestamp() const
101 { return _pimpl->timestamp(); }
103 Product::constPtr Target::baseProduct() const
104 { return _pimpl->baseProduct(); }
106 LocaleSet Target::requestedLocales() const
107 { return _pimpl->requestedLocales(); }
108 LocaleSet Target::requestedLocales( const Pathname & root_r )
109 { return target::TargetImpl::requestedLocales( root_r ); }
111 std::string Target::targetDistribution() const
112 { return _pimpl->targetDistribution(); }
113 std::string Target::targetDistribution( const Pathname & root_r )
114 { return target::TargetImpl::targetDistribution( root_r ); }
116 std::string Target::targetDistributionRelease() const
117 { return _pimpl->targetDistributionRelease(); }
118 std::string Target::targetDistributionRelease( const Pathname & root_r )
119 { return target::TargetImpl::targetDistributionRelease( root_r ); }
121 Target::DistributionLabel Target::distributionLabel() const
122 { return _pimpl->distributionLabel(); }
123 Target::DistributionLabel Target::distributionLabel( const Pathname & root_r )
124 { return target::TargetImpl::distributionLabel( root_r ); }
126 std::string Target::distributionVersion() const
127 { return _pimpl->distributionVersion(); }
128 std::string Target::distributionVersion( const Pathname & root_r )
129 { return target::TargetImpl::distributionVersion( root_r ); }
131 std::string Target::distributionFlavor() const
132 { return _pimpl->distributionFlavor(); }
133 std::string Target::distributionFlavor( const Pathname & root_r )
134 { return target::TargetImpl::distributionFlavor( root_r ); }
136 std::string Target::anonymousUniqueId() const
137 { return _pimpl->anonymousUniqueId(); }
138 std::string Target::anonymousUniqueId( const Pathname & root_r )
139 { return target::TargetImpl::anonymousUniqueId( root_r ); }
141 /////////////////////////////////////////////////////////////////
143 ///////////////////////////////////////////////////////////////////