clean more class names
[platform/upstream/libzypp.git] / zypp2 / RepoStatus.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp2/RepoStatus.cc
10  *
11 */
12 #include <iostream>
13 //#include "zypp/base/Logger.h"
14 #include "zypp2/RepoStatus.h"
15
16
17 using std::endl;
18
19 ///////////////////////////////////////////////////////////////////
20 namespace zypp
21 { /////////////////////////////////////////////////////////////////
22
23   ///////////////////////////////////////////////////////////////////
24   //
25   //    CLASS NAME : RepoStatus::Impl
26   //
27   /** RepoStatus implementation. */
28   struct RepoStatus::Impl
29   {
30
31   public:
32     
33     CheckSum checksum;
34     Date timestamp;
35     
36     /** Offer default Impl. */
37     static shared_ptr<Impl> nullimpl()
38     {
39       static shared_ptr<Impl> _nullimpl( new Impl );
40       return _nullimpl;
41     }
42
43   private:
44     friend Impl * rwcowClone<Impl>( const Impl * rhs );
45     /** clone for RWCOW_pointer */
46     Impl * clone() const
47     { return new Impl( *this ); }
48   };
49   ///////////////////////////////////////////////////////////////////
50
51   /** \relates RepoStatus::Impl Stream output */
52   inline std::ostream & operator<<( std::ostream & str, const RepoStatus::Impl & obj )
53   {
54     return str << "RepoStatus::Impl";
55   }
56
57   ///////////////////////////////////////////////////////////////////
58   //
59   //    CLASS NAME : RepoStatus
60   //
61   ///////////////////////////////////////////////////////////////////
62
63   ///////////////////////////////////////////////////////////////////
64   //
65   //    METHOD NAME : RepoStatus::RepoStatus
66   //    METHOD TYPE : Ctor
67   //
68   RepoStatus::RepoStatus()
69   : _pimpl( Impl::nullimpl() )
70   {}
71
72   ///////////////////////////////////////////////////////////////////
73   //
74   //    METHOD NAME : RepoStatus::~RepoStatus
75   //    METHOD TYPE : Dtor
76   //
77   RepoStatus::~RepoStatus()
78   {}
79
80   RepoStatus & RepoStatus::setChecksum( const CheckSum &checksum )
81   {
82     _pimpl->checksum = checksum;
83     return *this;
84   }
85
86   RepoStatus & RepoStatus::setTimestamp( const Date &timestamp )
87   {
88     _pimpl->timestamp = timestamp;
89     return *this;
90   }
91   
92   CheckSum RepoStatus::checksum() const
93   { return _pimpl->checksum; }
94
95   Date RepoStatus::timestamp() const
96   { return _pimpl->timestamp; }
97   
98   /******************************************************************
99   **
100   **    FUNCTION NAME : operator<<
101   **    FUNCTION TYPE : std::ostream &
102   */
103   std::ostream & operator<<( std::ostream & str, const RepoStatus & obj )
104   {
105     return str << *obj._pimpl;
106   }
107
108   /////////////////////////////////////////////////////////////////
109 } // namespace zypp2
110 ///////////////////////////////////////////////////////////////////