#include <OB/CORBA.h>
#include "HxServerBase.h"
#include "HxBaseTieRefCount.h"
Go to the source code of this file.
Functions | |
HxImageSignature | HxConvertImageSig (HxCorba::ImageSignature sig) |
HxCorba::ImageSignature | HxConvertImageSig (HxImageSignature sig) |
HxImageRep::ResultPrecision | HxConvertPrecision (HxCorba::ResultPrecision prec) |
HxGeoIntType | HxConvertGeoIntType (HxCorba::GeoIntType gi) |
HxGeoTransType | HxConvertGeoTransType (HxCorba::GeoTransType gt) |
HxCorba::PixValue | HxConvertValue (HxValue &val) |
HxValue | HxConvertValue (const HxCorba::PixValue &val) |
template<class CorbaT, class HxT> CorbaT | HxConvertEnum (HxT *values, int nValues, HxT val) |
template<class TiedSvtT> TiedSvtT::HxT & | HxGetTiedObject (HxServerBase *srv, typename TiedSvtT::CorbaT *obj, typename TiedSvtT::HxT &empty) |
template<class TiedSvtT> TiedSvtT::HxT & | HxGetTiedObject (HxServerBase *srv, typename TiedSvtT::CorbaT *obj) |
template<class TiedSvtT> TiedSvtT::CorbaT * | HxRegisterTiedServant (HxServerBase *srv, const typename TiedSvtT::HxT &obj) |
template<class TiedSvtT, class SrcListT> TiedSvtT::SeqT * | HxMakeTiedServantsList (HxServerBase *srv, SrcListT &lst) |
template<class CorbaSeqT, class SrcListT> CorbaSeqT * | HxMakeBasicList (HxServerBase *srv, SrcListT &lst) |
template<class CorbaSeqT, class SrcListT> CorbaSeqT * | HxMakeStringList (HxServerBase *srv, SrcListT &lst) |
template<class TiedSvtT, class DstListT> DstListT | HxGetTiedObjectList (HxServerBase *srv, const typename TiedSvtT::SeqT &seq) |
|
|
|
00037 { 00038 return HxConvertEnum<HxCorba::ImageSignature, HxImageSignature>(sigs, sigs_length, sig); 00039 00040 /*int nSigs = 15; 00041 00042 for(int i=0; i<nSigs; i++) 00043 if(sig == sigs[i]) return (HxCorba::ImageSignature)i; 00044 00045 return (HxCorba::ImageSignature)0;*/ 00046 } |
|
00050 { 00051 HxImageRep::ResultPrecision precs[] = { HxImageRep::SOURCE_PREC, 00052 HxImageRep::ARITH_PREC, HxImageRep::SMALL_PREC }; 00053 return precs[prec]; 00054 } |
|
|
|
|
|
|
|
00110 { 00111 HxValue result; 00112 if(val._d() == HxCorba::SI) { 00113 CORBA::Long csi = val.scalarInt(); 00114 result = HxValue(HxScalarInt(csi)); 00115 }else if(val._d() == HxCorba::SD) { 00116 CORBA::Double csd = val.scalarDouble(); 00117 result = HxValue(HxScalarDouble(csd)); 00118 }else if(val._d() == HxCorba::V2I) { 00119 HxCorba::Vec2I cv2i = val.vect2Int(); 00120 result = HxValue(HxVec2Int(cv2i.x, cv2i.y)); 00121 }else if(val._d() == HxCorba::V2D) { 00122 HxCorba::Vec2D cv2d = val.vect2Double(); 00123 result = HxValue(HxVec2Double(cv2d.x, cv2d.y)); 00124 }else if(val._d() == HxCorba::V3I) { 00125 HxCorba::Vec3I cv3i = val.vect3Int(); 00126 result = HxValue(HxVec3Int(cv3i.x, cv3i.y, cv3i.z)); 00127 }else if(val._d() == HxCorba::V3D) { 00128 HxCorba::Vec3D cv3d = val.vect3Double(); 00129 result = HxValue(HxVec3Double(cv3d.x, cv3d.y, cv3d.z)); 00130 }else if(val._d() == HxCorba::CPL) { 00131 HxCorba::Complex ccpl = val.cplx(); 00132 result = HxValue(HxComplex(ccpl.x, ccpl.y)); 00133 } 00134 return result; 00135 } |
|
00042 { 00043 for(int i=0; i<nValues; i++) 00044 if(val == values[i]) return (CorbaT)i; 00045 00046 return (CorbaT)0; 00047 } |
|
00053 { 00054 if(CORBA::is_nil(obj)) return empty; 00055 00056 PortableServer::Servant servant = srv->getServant(obj); 00057 if(servant == NULL) return empty; 00058 00059 typename TiedSvtT::TieT* tie = 00060 dynamic_cast<typename TiedSvtT::TieT*>(servant); 00061 00062 servant->_remove_ref(); 00063 return *(tie->_tied_object()); 00064 } |
|
00069 { 00070 static typename TiedSvtT::HxT temp; 00071 temp = typename TiedSvtT::HxT(); 00072 return HxGetTiedObject<TiedSvtT>(srv, obj, temp); 00073 } |
|
00078 { 00079 TiedSvtT* tied = new TiedSvtT(obj); 00080 00081 // Create tie servant with RefCount capabilities 00082 typename TiedSvtT::TieT* servant = 00083 new HxBaseTieRefCount<typename TiedSvtT::TieT, TiedSvtT>(tied); 00084 CORBA::Object_ptr objPtr = srv->registerServant(servant); 00085 servant->_remove_ref(); 00086 00087 typedef typename TiedSvtT::CorbaT tempT; 00088 return tempT::_narrow(objPtr); 00089 } |
|
00094 { 00095 typename TiedSvtT::SeqT* seq = new typename TiedSvtT::SeqT(); 00096 seq->length(lst.size()); 00097 00098 typename SrcListT::const_iterator it = lst.begin(); 00099 for(int i=0; it != lst.end(); i++, it++) 00100 (*seq)[i] = HxRegisterTiedServant<TiedSvtT>(srv, *it); 00101 00102 return seq; 00103 } |
|
00124 { 00125 CorbaSeqT* seq = new CorbaSeqT(); 00126 seq->length(lst.size()); 00127 00128 typename SrcListT::const_iterator it = lst.begin(); 00129 for(int i=0; it != lst.end(); i++, it++) 00130 (*seq)[i] = *it; 00131 00132 return seq; 00133 } |
|
00138 { 00139 CorbaSeqT* seq = new CorbaSeqT(); 00140 seq->length(lst.size()); 00141 00142 typename SrcListT::const_iterator it = lst.begin(); 00143 for(int i=0; it != lst.end(); i++, it++) 00144 (*seq)[i] = it->c_str(); 00145 00146 return seq; 00147 } |
|
00152 { 00153 DstListT result; 00154 for(int i=0; i<seq.length(); i++) 00155 result += HxGetTiedObject<TiedSvtT>(srv, seq[i]); 00156 00157 return result; 00158 } |