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(); }
88 target::rpm::RpmDb & Target::rpmDb()
89 { return _pimpl->rpm(); }
91 Pathname Target::root() const
92 { return _pimpl->root(); }
94 bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
95 { return _pimpl->providesFile (name_str, path_str); }
97 std::string Target::whoOwnsFile (const std::string & path_str) const
98 { return _pimpl->whoOwnsFile (path_str); }
100 std::ostream & Target::dumpOn( std::ostream & str ) const
101 { return _pimpl->dumpOn( str ); }
103 Date Target::timestamp() const
104 { return _pimpl->timestamp(); }
106 Product::constPtr Target::baseProduct() const
107 { return _pimpl->baseProduct(); }
109 LocaleSet Target::requestedLocales() const
110 { return _pimpl->requestedLocales(); }
111 LocaleSet Target::requestedLocales( const Pathname & root_r )
112 { return target::TargetImpl::requestedLocales( root_r ); }
114 std::string Target::targetDistribution() const
115 { return _pimpl->targetDistribution(); }
116 std::string Target::targetDistribution( const Pathname & root_r )
117 { return target::TargetImpl::targetDistribution( root_r ); }
119 std::string Target::targetDistributionRelease() const
120 { return _pimpl->targetDistributionRelease(); }
121 std::string Target::targetDistributionRelease( const Pathname & root_r )
122 { return target::TargetImpl::targetDistributionRelease( root_r ); }
124 std::string Target::targetDistributionFlavor() const
125 { return _pimpl->targetDistributionFlavor(); }
126 std::string Target::targetDistributionFlavor( const Pathname & root_r )
127 { return target::TargetImpl::targetDistributionFlavor( root_r ); }
129 Target::DistributionLabel Target::distributionLabel() const
130 { return _pimpl->distributionLabel(); }
131 Target::DistributionLabel Target::distributionLabel( const Pathname & root_r )
132 { return target::TargetImpl::distributionLabel( root_r ); }
134 std::string Target::distributionVersion() const
135 { return _pimpl->distributionVersion(); }
136 std::string Target::distributionVersion( const Pathname & root_r )
137 { return target::TargetImpl::distributionVersion( root_r ); }
139 std::string Target::distributionFlavor() const
140 { return _pimpl->distributionFlavor(); }
141 std::string Target::distributionFlavor( const Pathname & root_r )
142 { return target::TargetImpl::distributionFlavor( root_r ); }
144 std::string Target::anonymousUniqueId() const
145 { return _pimpl->anonymousUniqueId(); }
146 std::string Target::anonymousUniqueId( const Pathname & root_r )
147 { return target::TargetImpl::anonymousUniqueId( root_r ); }
149 /////////////////////////////////////////////////////////////////
151 ///////////////////////////////////////////////////////////////////