ResTraits.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_RESTRAITS_H
00013 #define ZYPP_RESTRAITS_H
00014 
00015 #include "zypp/base/PtrTypes.h"
00016 #include "zypp/base/KindOf.h"
00017 
00019 namespace zypp
00020 { 
00021 
00022   class Resolvable;
00023   class ResObject;
00024 
00025   class Atom;
00026   class Package;
00027   class SrcPackage;
00028   class Selection;
00029   class Pattern;
00030   class Product;
00031   class Patch;
00032   class Script;
00033   class Message;
00034   class Language;
00035 
00036   class SystemResObject;
00037 
00039   struct ResolvableTraits
00040   {
00041     typedef KindOf<Resolvable>  KindType;
00042   };
00043 
00045   template<typename _Res>
00046     struct ResTraits : public ResolvableTraits
00047     {
00048       typedef intrusive_ptr<_Res>       PtrType;
00049       typedef intrusive_ptr<const _Res> constPtrType;
00050 
00051       static const KindType kind;
00052     };
00053 
00057   template<>
00058     struct ResTraits<Resolvable> : public ResolvableTraits
00059     {
00060       typedef intrusive_ptr<Resolvable>       PtrType;
00061       typedef intrusive_ptr<const Resolvable> constPtrType;
00062     };
00063 
00067   template<>
00068     struct ResTraits<ResObject> : public ResolvableTraits
00069     {
00070       typedef intrusive_ptr<ResObject>       PtrType;
00071       typedef intrusive_ptr<const ResObject> constPtrType;
00072     };
00073 
00075 } // namespace zypp
00077 #endif // ZYPP_RESTRAITS_H

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