CMS 3D CMS Logo

IgDatum.h

Go to the documentation of this file.
00001 #ifndef IGUANA_FRAMEWORK_IG_DATUM_H
00002 # define IGUANA_FRAMEWORK_IG_DATUM_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Framework/interface/config.h"
00007 # include <string>
00008 
00009 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00010 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00011 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00012 
00013 template <class T> class IGUANA_FRAMEWORK_API IgSimpleDatum;
00014 
00015 typedef IgSimpleDatum<std::string>      IgStringDatum;
00016 typedef IgSimpleDatum<bool>             IgBoolDatum;
00017 typedef IgSimpleDatum<long>             IgIntDatum;
00018 typedef IgSimpleDatum<double>           IgRealDatum;
00019 
00020 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00021 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00022 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00023 
00024 class IGUANA_FRAMEWORK_API IgDatum
00025 {
00026 public:
00027     virtual ~IgDatum (void);
00028 };
00029 
00030 template <class T>
00031 class IGUANA_FRAMEWORK_API IgSimpleDatum : public IgDatum
00032 {
00033 public:
00034     explicit IgSimpleDatum (const T &value);
00035     // implicit copy constructor
00036     // implicit assignment operator
00037     // implicit destructor
00038 
00039     const T &           value (void) const;
00040     void                value (const T &newval);
00041 
00042 private:
00043     T                   m_value;
00044 };
00045 
00046 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00047 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00048 
00049 template <class T>
00050 inline
00051 IgSimpleDatum<T>::IgSimpleDatum (const T &value)
00052     : m_value (value)
00053 {}
00054 
00055 template <class T>
00056 inline const T &
00057 IgSimpleDatum<T>::value (void) const
00058 {
00059     return m_value;
00060 }
00061 
00062 template <class T>
00063 inline void
00064 IgSimpleDatum<T>::value (const T &newval)
00065 {
00066     m_value = newval;
00067 }
00068 
00069 #endif // IGUANA_FRAMEWORK_IG_DATUM_H

Generated on Tue Jun 9 17:38:14 2009 for CMSSW by  doxygen 1.5.4