1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp2/RepoStatus.cc
13 //#include "zypp/base/Logger.h"
14 #include "zypp2/RepoStatus.h"
19 ///////////////////////////////////////////////////////////////////
21 { /////////////////////////////////////////////////////////////////
23 ///////////////////////////////////////////////////////////////////
25 // CLASS NAME : RepoStatus::Impl
27 /** RepoStatus implementation. */
28 struct RepoStatus::Impl
36 /** Offer default Impl. */
37 static shared_ptr<Impl> nullimpl()
39 static shared_ptr<Impl> _nullimpl( new Impl );
44 friend Impl * rwcowClone<Impl>( const Impl * rhs );
45 /** clone for RWCOW_pointer */
47 { return new Impl( *this ); }
49 ///////////////////////////////////////////////////////////////////
51 /** \relates RepoStatus::Impl Stream output */
52 inline std::ostream & operator<<( std::ostream & str, const RepoStatus::Impl & obj )
54 return str << "RepoStatus::Impl";
57 ///////////////////////////////////////////////////////////////////
59 // CLASS NAME : RepoStatus
61 ///////////////////////////////////////////////////////////////////
63 ///////////////////////////////////////////////////////////////////
65 // METHOD NAME : RepoStatus::RepoStatus
68 RepoStatus::RepoStatus()
69 : _pimpl( Impl::nullimpl() )
72 ///////////////////////////////////////////////////////////////////
74 // METHOD NAME : RepoStatus::~RepoStatus
77 RepoStatus::~RepoStatus()
80 RepoStatus & RepoStatus::setChecksum( const CheckSum &checksum )
82 _pimpl->checksum = checksum;
86 RepoStatus & RepoStatus::setTimestamp( const Date ×tamp )
88 _pimpl->timestamp = timestamp;
92 CheckSum RepoStatus::checksum() const
93 { return _pimpl->checksum; }
95 Date RepoStatus::timestamp() const
96 { return _pimpl->timestamp; }
98 /******************************************************************
100 ** FUNCTION NAME : operator<<
101 ** FUNCTION TYPE : std::ostream &
103 std::ostream & operator<<( std::ostream & str, const RepoStatus & obj )
105 return str << *obj._pimpl;
108 /////////////////////////////////////////////////////////////////
110 ///////////////////////////////////////////////////////////////////