ResObjectImplIf.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_DETAIL_RESOBJECTIMPLIF_H
00013 #define ZYPP_DETAIL_RESOBJECTIMPLIF_H
00014 
00015 #include <list>
00016 #include <string>
00017 
00018 #include "zypp/base/Deprecated.h"
00019 #include "zypp/detail/ResImplTraits.h"
00020 #include "zypp/detail/ResObjectFactory.h"
00021 #include "zypp/Repository.h"
00022 #include "zypp/Locale.h"
00023 #include "zypp/ByteCount.h"
00024 #include "zypp/Date.h"
00025 #include "zypp/TranslatedText.h"
00026 
00027 #include "zypp/NeedAType.h" // volatile include propagating type drafts
00028 
00029 // will be defined =0 later
00030 #define PURE_VIRTUAL
00031 
00033 namespace zypp
00034 { 
00035 
00036   class Resolvable;
00037   class Repository;
00038   class DiskUsage;
00039 
00041   namespace detail
00042   { 
00043 
00045     //
00046     //  CLASS NAME : ResObjectImplIf
00047     //
00055     class ResObjectImplIf : public base::ReferenceCounted, private base::NonCopyable
00056     {
00057     public:
00064       virtual TranslatedText summary() const PURE_VIRTUAL;
00065 
00067       virtual TranslatedText description() const PURE_VIRTUAL;
00068 
00070       virtual TranslatedText insnotify() const PURE_VIRTUAL;
00071 
00073       virtual TranslatedText delnotify() const PURE_VIRTUAL;
00074 
00076       virtual TranslatedText licenseToConfirm() const PURE_VIRTUAL;
00077 
00079       virtual Vendor vendor() const PURE_VIRTUAL;
00080 
00082       virtual ByteCount size() const PURE_VIRTUAL;
00083 
00085       virtual ByteCount downloadSize() const PURE_VIRTUAL;
00086 
00088       virtual Repository repository() const PURE_VIRTUAL;
00089 
00094       virtual unsigned mediaNr() const PURE_VIRTUAL;
00095 
00097       virtual bool installOnly() const PURE_VIRTUAL;
00098 
00100       virtual Date buildtime() const;
00101 
00103       virtual Date installtime() const;
00104 
00110       virtual const DiskUsage & diskusage() const;
00112 
00113     public:
00115       ResObjectImplIf()
00116       : _backRef( 0 )
00117       {}
00119       virtual ~ResObjectImplIf() = 0;
00120 
00121     public:
00123       bool hasBackRef() const
00124       { return _backRef; }
00125 
00127       const Resolvable *const self() const
00128       { return _backRef; }
00129 
00130     private:
00132       template<class _Res>
00133         friend class _resobjectfactory_detail::ResImplConnect;
00135       Resolvable * _backRef;
00136     };
00138 
00139     /* Implementation of pure virtual dtor is required! */
00140     inline ResObjectImplIf::~ResObjectImplIf()
00141     {}
00142 
00144   } // namespace detail
00147 } // namespace zypp
00149 #endif // ZYPP_DETAIL_RESOBJECTIMPLIF_H

Generated on Tue Sep 25 19:23:01 2007 for libzypp by  doxygen 1.5.3