it_bus_pdk/context_base.h

00001 #ifndef _IT_BUS_CONTEXT_BASE_H_
00002 #define _IT_BUS_CONTEXT_BASE_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 #include <it_bus/api_defines.h>
00007 
00008 namespace IT_Bus
00009 {
00010     class IT_CONTEXT_ATTRIBUTE_API Context
00011     {
00012       public:    
00013         virtual ~Context();
00014 
00015       protected:
00016         Context();
00017 
00018       private:
00019         // private and unimplemented to prevent copying
00020         Context(const Context&);
00021         void operator=(const Context&);
00022     };
00023 
00024     template<class T>
00025     class ContextT : public Context
00026     {
00027       public:
00028         ContextT(
00029             T& context
00030         ) :
00031             m_context(context)
00032         {
00033             // complete
00034         }
00035 
00036         T&
00037         get_data()
00038         {
00039             return m_context;
00040         }
00041 
00042       private:
00043         T& m_context;
00044     };
00045 }
00046 
00047 #endif  

Generated on Thu Sep 7 11:39:32 2006 for Artix by  doxygen 1.4.7