it_bus/reflect/occuring_type_impl_t.h

00001 #ifndef _IT_REFLECT_OCCURING_TYPE_IMPL_T_H_
00002 #define _IT_REFLECT_OCCURING_TYPE_IMPL_T_H_
00003 
00004 // @Copyright 2005 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 #include <it_bus/reflect/element_list_impl_base.h>
00007 #include <it_bus/reflect/traits.h>
00008 
00009 namespace IT_Reflect
00010 {
00014     template <class T>
00015     class OccuringTypeImplT :
00016         public virtual ElementListImplBase
00017     {
00018       public:
00019         
00020         typedef IT_Bus::TypeListT<T> ListT;
00021         
00022         OccuringTypeImplT(
00023             const ListT* data
00024         ) throw(());
00025         
00026       protected:
00027 
00028         virtual IT_Bus::MinMaxList&
00029         get_list() const throw(());
00030 
00031         virtual Reflection*
00032         get_reflection(
00033             size_t index
00034         ) const throw((ReflectException));
00035 
00036         virtual IT_Bus::AnyType::Kind
00037         get_list_kind() const throw(());
00038 
00039       private:
00040         ListT* m_type_list;
00041     };
00042 
00043     template <class T>
00044     OccuringTypeImplT<T>::OccuringTypeImplT(
00045         const ListT* data
00046     ) throw(())
00047         :
00048         m_type_list(IT_CONST_CAST(ListT*,data))
00049     {
00050         // Complete
00051     }
00052 
00053     template <class T>
00054     IT_Bus::MinMaxList&
00055     OccuringTypeImplT<T>::get_list(
00056     ) const throw(())
00057     {
00058         return *m_type_list;
00059     }
00060 
00061     template <class T>
00062     Reflection*
00063     OccuringTypeImplT<T>::get_reflection(
00064         size_t index
00065     ) const throw((ReflectException))
00066     {
00067         return Traits<T>::get_reflection((*m_type_list)[index]);
00068     }
00069 
00070     template <class T>
00071     IT_Bus::AnyType::Kind
00072     OccuringTypeImplT<T>::get_list_kind(
00073     ) const throw(())
00074     {
00075         return m_type_list->get_kind();
00076     }
00077 }
00078 
00079 #endif  

Generated on Tue Mar 20 15:27:43 2007 for Artix by  doxygen 1.5.1-p1