Gaudi Framework, version v21r7

Home   Generated: 22 Jan 2010

PropertyTypeTraits.h

Go to the documentation of this file.
00001 // $Id: $
00002 // ============================================================================
00003 #ifndef GAUDIKERNEL_PROPTRAITS_H 
00004 #define GAUDIKERNEL_PROPTRAITS_H 1
00005 // ============================================================================
00006 // Include files
00007 // ============================================================================
00008 // STD & STL 
00009 // ============================================================================
00010 #include <algorithm>
00011 // ============================================================================
00012 namespace Gaudi
00013 {
00014   // ==========================================================================
00015   namespace Utils 
00016   {
00017     // ========================================================================
00045     template <class TYPE> 
00046     struct PropertyTypeTraits 
00047     {
00048       // =======================================================================
00049       typedef TYPE        Type  ;
00050       typedef const TYPE& PRef  ;
00051       typedef TYPE*       PVal  ;
00052       typedef const TYPE* CVal  ;
00053       // =======================================================================
00055       static PVal new_ ()                    { return new Type(     ) ; }
00057       static PVal new_ ( const Type& right ) { return new Type(right) ; }
00059       static void dele   ( PVal right , const bool own ) 
00060       { if ( own ) { delete right ; } }
00062       static PVal copy   ( PVal* right , const bool  own ) 
00063       {
00064         if ( !own ) { return right ; }
00065         return new_ ( *right ) ;
00066       }    
00068       static void assign ( Type& v1    ,       PRef  v2  ) { v1 = v2 ; }
00070       static bool less ( const Type& v1 , const Type& v2 )  
00071       { return v1 < v2 ; }
00072       // ======================================================================
00073     } ;
00074     // ========================================================================
00075   } //                                            end of namespace Gaudi::Utils 
00076   // ==========================================================================
00077 } //                                                     end of namespace Gaudi 
00078 // ============================================================================
00079 // The END 
00080 // ============================================================================
00081 #endif // GAUDIKERNEL_PROPTRAITS_H
00082 // ============================================================================

Generated at Fri Jan 22 20:27:45 2010 for Gaudi Framework, version v21r7 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004