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/detail/ResImplTraits.h"
00019 #include "zypp/detail/ResObjectFactory.h"
00020 
00021 #include "zypp/Locale.h"
00022 #include "zypp/ByteCount.h"
00023 #include "zypp/Date.h"
00024 #include "zypp/TranslatedText.h"
00025 
00026 #include "zypp/NeedAType.h" // volatile include propagating type drafts
00027 
00028 // will be defined =0 later
00029 #define PURE_VIRTUAL
00030 
00032 namespace zypp
00033 { 
00034 
00035   class Resolvable;
00036   class Source_Ref;
00037 
00039   namespace detail
00040   { 
00041 
00043     //
00044     //  CLASS NAME : ResObjectImplIf
00045     //
00053     class ResObjectImplIf : public base::ReferenceCounted, private base::NonCopyable
00054     {
00055     public:
00062       virtual TranslatedText summary() const PURE_VIRTUAL;
00063 
00065       virtual TranslatedText description() const PURE_VIRTUAL;
00066 
00068       virtual TranslatedText insnotify() const PURE_VIRTUAL;
00069 
00071       virtual TranslatedText delnotify() const PURE_VIRTUAL;
00072 
00074       virtual TranslatedText licenseToConfirm() const PURE_VIRTUAL;
00075 
00077       virtual Vendor vendor() const PURE_VIRTUAL;
00078 
00080       virtual ByteCount size() const PURE_VIRTUAL;
00081 
00083       virtual ByteCount archivesize() const PURE_VIRTUAL;
00084 
00086       virtual Source_Ref source() const PURE_VIRTUAL;
00087 
00092       virtual unsigned sourceMediaNr() const PURE_VIRTUAL;
00093 
00095       virtual bool installOnly() const PURE_VIRTUAL;
00096 
00098       virtual Date buildtime() const;
00099 
00101       virtual Date installtime() const;
00102 
00104       virtual ZmdId zmdid() const PURE_VIRTUAL;
00106 
00107     public:
00109       ResObjectImplIf()
00110       : _backRef( 0 )
00111       {}
00113       virtual ~ResObjectImplIf() = 0;
00114 
00115     public:
00117       bool hasBackRef() const
00118       { return _backRef; }
00119 
00121       const Resolvable *const self() const
00122       { return _backRef; }
00123 
00124     private:
00126       template<class _Res>
00127         friend class _resobjectfactory_detail::ResImplConnect;
00129       Resolvable * _backRef;
00130     };
00132 
00133     /* Implementation of pure virtual dtor is required! */
00134     inline ResObjectImplIf::~ResObjectImplIf()
00135     {}
00136 
00138   } // namespace detail
00141 } // namespace zypp
00143 #endif // ZYPP_DETAIL_RESOBJECTIMPLIF_H

Generated on Thu Jul 6 00:07:20 2006 for zypp by  doxygen 1.4.6