00001 #ifndef _IT_BUS_TYPE_LIST_T_H_
00002 #define _IT_BUS_TYPE_LIST_T_H_
00003
00004
00005
00006
00007 #include <it_bus/type_list.h>
00008 #include <it_bus/min_max_list_t.h>
00009
00010 namespace IT_Reflect
00011 {
00012 template <class ListT, class T>
00013 class TypeListImplT;
00014 }
00015
00016 namespace IT_Bus
00017 {
00018 template<typename T>
00019 class TypeListT : public MinMaxListT<T>, public virtual TypeList
00020 {
00021 public:
00022 typedef IT_Reflect::TypeListImplT<TypeListT<T>, T>
00023 IT_ReflectionType;
00024
00025 TypeListT(
00026 const size_t min_occurs,
00027 const size_t max_occurs,
00028 const size_t list_size
00029 ) : MinMaxListT<T>(min_occurs, max_occurs, list_size)
00030 {
00031 }
00032
00033 TypeListT(
00034 const T & elem,
00035 const size_t min_occurs,
00036 const size_t max_occurs,
00037 const size_t list_size
00038 ) : MinMaxListT<T>(elem, min_occurs, max_occurs, list_size)
00039 {
00040 }
00041
00045 virtual void
00046 read_type(
00047 size_t pos,
00048 ComplexTypeReader & reader
00049 ) throw((DeserializationException))
00050 {
00051 MinMaxListT<T>::read_list_member(pos, QName::EMPTY_QNAME, reader);
00052 }
00053
00057 virtual void
00058 write_type(
00059 size_t pos,
00060 ComplexTypeWriter & writer
00061 ) const throw((SerializationException))
00062 {
00063 MinMaxListT<T>::write_list_member(pos, QName::EMPTY_QNAME, writer);
00064 }
00065
00066 size_t
00067 get_min_occurs() const
00068 {
00069 return MinMaxListT<T>::get_min_occurs();
00070 }
00071
00072 size_t
00073 get_max_occurs() const
00074 {
00075 return MinMaxListT<T>::get_max_occurs();
00076 }
00077
00078 void
00079 set_size(
00080 size_t new_size
00081 )
00082 {
00083 MinMaxListT<T>::set_size(new_size);
00084 }
00085
00086 size_t
00087 get_size() const
00088 {
00089 return MinMaxListT<T>::get_size();
00090 }
00091
00092 TypeListT&
00093 operator=(
00094 const IT_Vector<T> & rhs
00095 )
00096 {
00097 MinMaxListT<T>::operator=(rhs);
00098 return *this;
00099 }
00100
00101 TypeListT&
00102 operator=(
00103 const TypeListT & rhs
00104 )
00105 {
00106 *this = IT_DYNAMIC_CAST(const MinMaxListT<T>&, rhs);
00107 return *this;
00108 }
00109
00110 virtual AnyType&
00111 copy(
00112 const AnyType& rhs
00113 )
00114 {
00115 *this = IT_DYNAMIC_CAST(const TypeListT&, rhs);
00116 return *this;
00117 }
00118 };
00119 }
00120
00121 #endif