Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __GEOM_LIST_I_H__
00024 #define __GEOM_LIST_I_H__
00025
00026
00027 #include <SALOMEconfig.h>
00028 #include CORBA_SERVER_HEADER(GEOM_Superv)
00029
00030 #include "GEOM_Gen_i.hh"
00031 #include "utilities.h"
00032
00033 template <class Type>
00034 class GEOM_List_i :
00035 public virtual POA_GEOM::GEOM_List,
00036 public virtual PortableServer::RefCountServantBase
00037 {
00038 public:
00039 GEOM_List_i();
00040 GEOM_List_i(const Type& theListToCopy);
00041 ~GEOM_List_i();
00042
00043 const Type& GetList();
00044
00045 template <class ElemType>
00046 void AddObject(ElemType theObject);
00047
00048 private:
00049 Type myGOList;
00050 };
00051
00052
00053
00054
00055 template <class Type>
00056 GEOM_List_i<Type>::GEOM_List_i()
00057 {
00058 MESSAGE("GEOM_List_i::GEOM_List_i");
00059
00060 myGOList.length(0);
00061 }
00062
00063
00064
00065
00066 template <class Type>
00067 GEOM_List_i<Type>::GEOM_List_i(const Type& theListToCopy)
00068 {
00069 int aLength = theListToCopy.length();
00070 myGOList.length(aLength);
00071 for (int i = 0; i < aLength; i++)
00072 myGOList[i] = theListToCopy[i];
00073 }
00074
00075
00076
00077
00078 template <class Type>
00079 GEOM_List_i<Type>::~GEOM_List_i()
00080 {
00081 MESSAGE("GEOM_List_i::~GEOM_List_i");
00082 }
00083
00084
00085
00086
00087 template <class Type>
00088 const Type& GEOM_List_i<Type>::GetList()
00089 {
00090 MESSAGE("GEOM_List_i::GetList()");
00091 return myGOList;
00092 }
00093
00094
00095
00096
00097 template <class Type>
00098 template <class ElemType>
00099 void GEOM_List_i<Type>::AddObject(ElemType theObject)
00100 {
00101 MESSAGE("GEOM_List_i::AddObject(...)");
00102 int aLength = myGOList.length();
00103 myGOList.length(aLength+1);
00104 myGOList[aLength] = theObject;
00105 }
00106
00107 #endif