Go to the documentation of this file.00001 #ifndef _baciCORBAMem_H_
00002 #define _baciCORBAMem_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 template<class O, class I=O>
00029 class CORBAMem {
00030 public:
00031 static O addToArry(I&v){ return v; }
00032 static O retn(I&v){ return v; }
00033 #ifndef XXXMAKE_VXWORKS
00034
00035 #else
00036
00037 #endif //MAKE_VXWORKS
00038 };
00039
00040 template<class O, class I>
00041 class CORBAMem <O*, I>{
00042 public:
00043 static O* retn(I& v){ return new O(v);}
00044 static O addToArry(I& v){ return v;}
00045 };
00046
00047 template<>
00048 class CORBAMem <char*, ACE_CString>{
00049 public:
00050 static char* retn(ACE_CString& v){ return CORBA::string_dup(v.c_str()); }
00051 static char* addToArry(ACE_CString& v){ return CORBA::string_dup(v.c_str()); }
00052 };
00053
00054 #if 0
00055 template<class O, class I>
00056 O CORBAMem<O, I>::retn(I& v)
00057 {
00058 return v;
00059 }
00060
00061
00062
00063
00064 template<class O, class I>
00065 O CORBAMem<O*, I>::toHistory(I& v)
00066 {
00067 return v;
00068 }
00069
00070 template<class O, class I>
00071 O* CORBAMem<O*, I>::retn(I& v)
00072 {
00073 return new O(v);
00074 }
00075
00076
00077
00078
00079
00080
00081 #endif //MAKE_VXWORKS
00082
00083 #endif