00001
00002 #ifndef __Service_hh__
00003 #define __Service_hh__
00004
00005 #ifndef __CORBA_H_EXTERNAL_GUARD__
00006 #include <omniORB4/CORBA.h>
00007 #endif
00008
00009 #ifndef USE_stub_in_nt_dll
00010 # define USE_stub_in_nt_dll_NOT_DEFINED_Service
00011 #endif
00012 #ifndef USE_core_stub_in_nt_dll
00013 # define USE_core_stub_in_nt_dll_NOT_DEFINED_Service
00014 #endif
00015 #ifndef USE_dyn_stub_in_nt_dll
00016 # define USE_dyn_stub_in_nt_dll_NOT_DEFINED_Service
00017 #endif
00018
00019
00020
00021 #ifndef __ConfigurationInterface_hh_EXTERNAL_GUARD__
00022 #define __ConfigurationInterface_hh_EXTERNAL_GUARD__
00023 #include "ConfigurationInterfaceC.h"
00024 #endif
00025 #ifndef __OperationInterface_hh_EXTERNAL_GUARD__
00026 #define __OperationInterface_hh_EXTERNAL_GUARD__
00027 #include "OperationInterfaceC.h"
00028 #endif
00029 #ifndef __DataFlow_hh_EXTERNAL_GUARD__
00030 #define __DataFlow_hh_EXTERNAL_GUARD__
00031 #include "DataFlowC.h"
00032 #endif
00033
00034
00035
00036 #ifdef USE_stub_in_nt_dll
00037 # ifndef USE_core_stub_in_nt_dll
00038 # define USE_core_stub_in_nt_dll
00039 # endif
00040 # ifndef USE_dyn_stub_in_nt_dll
00041 # define USE_dyn_stub_in_nt_dll
00042 # endif
00043 #endif
00044
00045 #ifdef _core_attr
00046 # error "A local CPP macro _core_attr has already been defined."
00047 #else
00048 # ifdef USE_core_stub_in_nt_dll
00049 # define _core_attr _OMNIORB_NTDLL_IMPORT
00050 # else
00051 # define _core_attr
00052 # endif
00053 #endif
00054
00055 #ifdef _dyn_attr
00056 # error "A local CPP macro _dyn_attr has already been defined."
00057 #else
00058 # ifdef USE_dyn_stub_in_nt_dll
00059 # define _dyn_attr _OMNIORB_NTDLL_IMPORT
00060 # else
00061 # define _dyn_attr
00062 # endif
00063 #endif
00064
00065
00066
00067
00068
00069 _CORBA_MODULE RTT
00070
00071 _CORBA_MODULE_BEG
00072
00073 _CORBA_MODULE corba
00074
00075 _CORBA_MODULE_BEG
00076
00077 #ifndef __RTT_mcorba_mCService__
00078 #define __RTT_mcorba_mCService__
00079
00080 class CService;
00081 class _objref_CService;
00082 class _impl_CService;
00083
00084 typedef _objref_CService* CService_ptr;
00085 typedef CService_ptr CServiceRef;
00086
00087 class CService_Helper {
00088 public:
00089 typedef CService_ptr _ptr_type;
00090
00091 static _ptr_type _nil();
00092 static _CORBA_Boolean is_nil(_ptr_type);
00093 static void release(_ptr_type);
00094 static void duplicate(_ptr_type);
00095 static void marshalObjRef(_ptr_type, cdrStream&);
00096 static _ptr_type unmarshalObjRef(cdrStream&);
00097 };
00098
00099 typedef _CORBA_ObjRef_Var<_objref_CService, CService_Helper> CService_var;
00100 typedef _CORBA_ObjRef_OUT_arg<_objref_CService,CService_Helper > CService_out;
00101
00102 #endif
00103
00104
00105 class CService {
00106 public:
00107
00108 typedef CService_ptr _ptr_type;
00109 typedef CService_var _var_type;
00110
00111 static _ptr_type _duplicate(_ptr_type);
00112 static _ptr_type _narrow(::CORBA::Object_ptr);
00113 static _ptr_type _unchecked_narrow(::CORBA::Object_ptr);
00114
00115 static _ptr_type _nil();
00116
00117 static inline void _marshalObjRef(_ptr_type, cdrStream&);
00118
00119 static inline _ptr_type _unmarshalObjRef(cdrStream& s) {
00120 omniObjRef* o = omniObjRef::_unMarshal(_PD_repoId,s);
00121 if (o)
00122 return (_ptr_type) o->_ptrToObjRef(_PD_repoId);
00123 else
00124 return _nil();
00125 }
00126
00127 static _core_attr const char* _PD_repoId;
00128
00129
00130 static _dyn_attr const ::CORBA::TypeCode_ptr _tc_CProviderNames;
00131
00132 class CProviderNames_var;
00133
00134 class CProviderNames : public _CORBA_Unbounded_Sequence_String {
00135 public:
00136 typedef CProviderNames_var _var_type;
00137 inline CProviderNames() {}
00138 inline CProviderNames(const CProviderNames& _s)
00139 : _CORBA_Unbounded_Sequence_String(_s) {}
00140
00141 inline CProviderNames(_CORBA_ULong _max)
00142 : _CORBA_Unbounded_Sequence_String(_max) {}
00143 inline CProviderNames(_CORBA_ULong _max, _CORBA_ULong _len, char** _val, _CORBA_Boolean _rel=0)
00144 : _CORBA_Unbounded_Sequence_String(_max, _len, _val, _rel) {}
00145
00146
00147
00148 inline CProviderNames& operator = (const CProviderNames& _s) {
00149 _CORBA_Unbounded_Sequence_String::operator=(_s);
00150 return *this;
00151 }
00152 };
00153
00154 class CProviderNames_out;
00155
00156 class CProviderNames_var {
00157 public:
00158 inline CProviderNames_var() : _pd_seq(0) {}
00159 inline CProviderNames_var(CProviderNames* _s) : _pd_seq(_s) {}
00160 inline CProviderNames_var(const CProviderNames_var& _s) {
00161 if( _s._pd_seq ) _pd_seq = new CProviderNames(*_s._pd_seq);
00162 else _pd_seq = 0;
00163 }
00164 inline ~CProviderNames_var() { if( _pd_seq ) delete _pd_seq; }
00165
00166 inline CProviderNames_var& operator = (CProviderNames* _s) {
00167 if( _pd_seq ) delete _pd_seq;
00168 _pd_seq = _s;
00169 return *this;
00170 }
00171 inline CProviderNames_var& operator = (const CProviderNames_var& _s) {
00172 if( _s._pd_seq ) {
00173 if( !_pd_seq ) _pd_seq = new CProviderNames;
00174 *_pd_seq = *_s._pd_seq;
00175 } else if( _pd_seq ) {
00176 delete _pd_seq;
00177 _pd_seq = 0;
00178 }
00179 return *this;
00180 }
00181 inline _CORBA_String_element operator [] (_CORBA_ULong _s) {
00182 return (*_pd_seq)[_s];
00183 }
00184
00185
00186
00187 inline CProviderNames* operator -> () { return _pd_seq; }
00188 inline const CProviderNames* operator -> () const { return _pd_seq; }
00189 #if defined(__GNUG__)
00190 inline operator CProviderNames& () const { return *_pd_seq; }
00191 #else
00192 inline operator const CProviderNames& () const { return *_pd_seq; }
00193 inline operator CProviderNames& () { return *_pd_seq; }
00194 #endif
00195
00196 inline const CProviderNames& in() const { return *_pd_seq; }
00197 inline CProviderNames& inout() { return *_pd_seq; }
00198 inline CProviderNames*& out() {
00199 if( _pd_seq ) { delete _pd_seq; _pd_seq = 0; }
00200 return _pd_seq;
00201 }
00202 inline CProviderNames* _retn() { CProviderNames* tmp = _pd_seq; _pd_seq = 0; return tmp; }
00203
00204 friend class CProviderNames_out;
00205
00206 private:
00207 CProviderNames* _pd_seq;
00208 };
00209
00210 class CProviderNames_out {
00211 public:
00212 inline CProviderNames_out(CProviderNames*& _s) : _data(_s) { _data = 0; }
00213 inline CProviderNames_out(CProviderNames_var& _s)
00214 : _data(_s._pd_seq) { _s = (CProviderNames*) 0; }
00215 inline CProviderNames_out(const CProviderNames_out& _s) : _data(_s._data) {}
00216 inline CProviderNames_out& operator = (const CProviderNames_out& _s) {
00217 _data = _s._data;
00218 return *this;
00219 }
00220 inline CProviderNames_out& operator = (CProviderNames* _s) {
00221 _data = _s;
00222 return *this;
00223 }
00224 inline operator CProviderNames*&() { return _data; }
00225 inline CProviderNames*& ptr() { return _data; }
00226 inline CProviderNames* operator->() { return _data; }
00227
00228 inline _CORBA_String_element operator [] (_CORBA_ULong _i) {
00229 return (*_data)[_i];
00230 }
00231
00232
00233
00234 CProviderNames*& _data;
00235
00236 private:
00237 CProviderNames_out();
00238 CProviderNames_out& operator=(const CProviderNames_var&);
00239 };
00240
00241
00242 };
00243
00244 class _objref_CService :
00245 public virtual _objref_COperationInterface,
00246 public virtual _objref_CConfigurationInterface,
00247 public virtual _objref_CDataFlowInterface
00248 {
00249 public:
00250 char* getName();
00251 char* getServiceDescription();
00252 CService::CProviderNames* getProviderNames();
00253 CService_ptr getService(const char* name);
00254 ::CORBA::Boolean hasService(const char* name);
00255
00256 inline _objref_CService() { _PR_setobj(0); }
00257 _objref_CService(omniIOR*, omniIdentity*);
00258
00259 protected:
00260 virtual ~_objref_CService();
00261
00262
00263 private:
00264 virtual void* _ptrToObjRef(const char*);
00265
00266 _objref_CService(const _objref_CService&);
00267 _objref_CService& operator = (const _objref_CService&);
00268
00269
00270 friend class CService;
00271 };
00272
00273 class _pof_CService : public _OMNI_NS(proxyObjectFactory) {
00274 public:
00275 inline _pof_CService() : _OMNI_NS(proxyObjectFactory)(CService::_PD_repoId) {}
00276 virtual ~_pof_CService();
00277
00278 virtual omniObjRef* newObjRef(omniIOR*,omniIdentity*);
00279 virtual _CORBA_Boolean is_a(const char*) const;
00280 };
00281
00282 class _impl_CService :
00283 public virtual _impl_COperationInterface,
00284 public virtual _impl_CConfigurationInterface,
00285 public virtual _impl_CDataFlowInterface
00286 {
00287 public:
00288 virtual ~_impl_CService();
00289
00290 virtual char* getName() = 0;
00291 virtual char* getServiceDescription() = 0;
00292 virtual CService::CProviderNames* getProviderNames() = 0;
00293 virtual CService_ptr getService(const char* name) = 0;
00294 virtual ::CORBA::Boolean hasService(const char* name) = 0;
00295
00296 public:
00297 virtual _CORBA_Boolean _dispatch(omniCallHandle&);
00298
00299 private:
00300 virtual void* _ptrToInterface(const char*);
00301 virtual const char* _mostDerivedRepoId();
00302
00303 };
00304
00305
00306 _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_CService;
00307
00308 _CORBA_MODULE_END
00309
00310 _CORBA_MODULE_END
00311
00312
00313
00314 _CORBA_MODULE POA_RTT
00315 _CORBA_MODULE_BEG
00316
00317 _CORBA_MODULE corba
00318 _CORBA_MODULE_BEG
00319
00320 class CService :
00321 public virtual RTT::corba::_impl_CService,
00322 public virtual COperationInterface,
00323 public virtual CConfigurationInterface,
00324 public virtual CDataFlowInterface
00325 {
00326 public:
00327 virtual ~CService();
00328
00329 inline ::RTT::corba::CService_ptr _this() {
00330 return (::RTT::corba::CService_ptr) _do_this(::RTT::corba::CService::_PD_repoId);
00331 }
00332 };
00333
00334 _CORBA_MODULE_END
00335
00336 _CORBA_MODULE_END
00337
00338
00339
00340 _CORBA_MODULE OBV_RTT
00341 _CORBA_MODULE_BEG
00342
00343 _CORBA_MODULE corba
00344 _CORBA_MODULE_BEG
00345
00346 _CORBA_MODULE_END
00347
00348 _CORBA_MODULE_END
00349
00350
00351
00352
00353
00354 #undef _core_attr
00355 #undef _dyn_attr
00356
00357 void operator<<=(::CORBA::Any& _a, const RTT::corba::CService::CProviderNames& _s);
00358 void operator<<=(::CORBA::Any& _a, RTT::corba::CService::CProviderNames* _sp);
00359 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, RTT::corba::CService::CProviderNames*& _sp);
00360 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const RTT::corba::CService::CProviderNames*& _sp);
00361
00362 void operator<<=(::CORBA::Any& _a, RTT::corba::CService_ptr _s);
00363 void operator<<=(::CORBA::Any& _a, RTT::corba::CService_ptr* _s);
00364 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, RTT::corba::CService_ptr& _s);
00365
00366
00367
00368 inline void
00369 RTT::corba::CService::_marshalObjRef(::RTT::corba::CService_ptr obj, cdrStream& s) {
00370 omniObjRef::_marshal(obj->_PR_getobj(),s);
00371 }
00372
00373
00374
00375
00376 #ifdef USE_stub_in_nt_dll_NOT_DEFINED_Service
00377 # undef USE_stub_in_nt_dll
00378 # undef USE_stub_in_nt_dll_NOT_DEFINED_Service
00379 #endif
00380 #ifdef USE_core_stub_in_nt_dll_NOT_DEFINED_Service
00381 # undef USE_core_stub_in_nt_dll
00382 # undef USE_core_stub_in_nt_dll_NOT_DEFINED_Service
00383 #endif
00384 #ifdef USE_dyn_stub_in_nt_dll_NOT_DEFINED_Service
00385 # undef USE_dyn_stub_in_nt_dll
00386 # undef USE_dyn_stub_in_nt_dll_NOT_DEFINED_Service
00387 #endif
00388
00389 #endif // __Service_hh__
00390