00001
00002 #ifndef __TaskContext_hh__
00003 #define __TaskContext_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_TaskContext
00011 #endif
00012 #ifndef USE_core_stub_in_nt_dll
00013 # define USE_core_stub_in_nt_dll_NOT_DEFINED_TaskContext
00014 #endif
00015 #ifndef USE_dyn_stub_in_nt_dll
00016 # define USE_dyn_stub_in_nt_dll_NOT_DEFINED_TaskContext
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 #ifndef __Service_hh_EXTERNAL_GUARD__
00034 #define __Service_hh_EXTERNAL_GUARD__
00035 #include "ServiceC.h"
00036 #endif
00037 #ifndef __ServiceRequester_hh_EXTERNAL_GUARD__
00038 #define __ServiceRequester_hh_EXTERNAL_GUARD__
00039 #include "ServiceRequesterC.h"
00040 #endif
00041
00042
00043
00044 #ifdef USE_stub_in_nt_dll
00045 # ifndef USE_core_stub_in_nt_dll
00046 # define USE_core_stub_in_nt_dll
00047 # endif
00048 # ifndef USE_dyn_stub_in_nt_dll
00049 # define USE_dyn_stub_in_nt_dll
00050 # endif
00051 #endif
00052
00053 #ifdef _core_attr
00054 # error "A local CPP macro _core_attr has already been defined."
00055 #else
00056 # ifdef USE_core_stub_in_nt_dll
00057 # define _core_attr _OMNIORB_NTDLL_IMPORT
00058 # else
00059 # define _core_attr
00060 # endif
00061 #endif
00062
00063 #ifdef _dyn_attr
00064 # error "A local CPP macro _dyn_attr has already been defined."
00065 #else
00066 # ifdef USE_dyn_stub_in_nt_dll
00067 # define _dyn_attr _OMNIORB_NTDLL_IMPORT
00068 # else
00069 # define _dyn_attr
00070 # endif
00071 #endif
00072
00073
00074
00075
00076
00077 _CORBA_MODULE RTT
00078
00079 _CORBA_MODULE_BEG
00080
00081 _CORBA_MODULE corba
00082
00083 _CORBA_MODULE_BEG
00084
00085 enum CTaskState { CInit, CPreOperational, CFatalError, CException, CStopped, CRunning, CRunTimeError };
00086 typedef CTaskState& CTaskState_out;
00087
00088 _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_CTaskState;
00089
00090 #ifndef __RTT_mcorba_mCTaskContext__
00091 #define __RTT_mcorba_mCTaskContext__
00092
00093 class CTaskContext;
00094 class _objref_CTaskContext;
00095 class _impl_CTaskContext;
00096
00097 typedef _objref_CTaskContext* CTaskContext_ptr;
00098 typedef CTaskContext_ptr CTaskContextRef;
00099
00100 class CTaskContext_Helper {
00101 public:
00102 typedef CTaskContext_ptr _ptr_type;
00103
00104 static _ptr_type _nil();
00105 static _CORBA_Boolean is_nil(_ptr_type);
00106 static void release(_ptr_type);
00107 static void duplicate(_ptr_type);
00108 static void marshalObjRef(_ptr_type, cdrStream&);
00109 static _ptr_type unmarshalObjRef(cdrStream&);
00110 };
00111
00112 typedef _CORBA_ObjRef_Var<_objref_CTaskContext, CTaskContext_Helper> CTaskContext_var;
00113 typedef _CORBA_ObjRef_OUT_arg<_objref_CTaskContext,CTaskContext_Helper > CTaskContext_out;
00114
00115 #endif
00116
00117
00118 class CTaskContext {
00119 public:
00120
00121 typedef CTaskContext_ptr _ptr_type;
00122 typedef CTaskContext_var _var_type;
00123
00124 static _ptr_type _duplicate(_ptr_type);
00125 static _ptr_type _narrow(::CORBA::Object_ptr);
00126 static _ptr_type _unchecked_narrow(::CORBA::Object_ptr);
00127
00128 static _ptr_type _nil();
00129
00130 static inline void _marshalObjRef(_ptr_type, cdrStream&);
00131
00132 static inline _ptr_type _unmarshalObjRef(cdrStream& s) {
00133 omniObjRef* o = omniObjRef::_unMarshal(_PD_repoId,s);
00134 if (o)
00135 return (_ptr_type) o->_ptrToObjRef(_PD_repoId);
00136 else
00137 return _nil();
00138 }
00139
00140 static _core_attr const char* _PD_repoId;
00141
00142
00143 static _dyn_attr const ::CORBA::TypeCode_ptr _tc_CPeerNames;
00144
00145 class CPeerNames_var;
00146
00147 class CPeerNames : public _CORBA_Unbounded_Sequence_String {
00148 public:
00149 typedef CPeerNames_var _var_type;
00150 inline CPeerNames() {}
00151 inline CPeerNames(const CPeerNames& _s)
00152 : _CORBA_Unbounded_Sequence_String(_s) {}
00153
00154 inline CPeerNames(_CORBA_ULong _max)
00155 : _CORBA_Unbounded_Sequence_String(_max) {}
00156 inline CPeerNames(_CORBA_ULong _max, _CORBA_ULong _len, char** _val, _CORBA_Boolean _rel=0)
00157 : _CORBA_Unbounded_Sequence_String(_max, _len, _val, _rel) {}
00158
00159
00160
00161 inline CPeerNames& operator = (const CPeerNames& _s) {
00162 _CORBA_Unbounded_Sequence_String::operator=(_s);
00163 return *this;
00164 }
00165 };
00166
00167 class CPeerNames_out;
00168
00169 class CPeerNames_var {
00170 public:
00171 inline CPeerNames_var() : _pd_seq(0) {}
00172 inline CPeerNames_var(CPeerNames* _s) : _pd_seq(_s) {}
00173 inline CPeerNames_var(const CPeerNames_var& _s) {
00174 if( _s._pd_seq ) _pd_seq = new CPeerNames(*_s._pd_seq);
00175 else _pd_seq = 0;
00176 }
00177 inline ~CPeerNames_var() { if( _pd_seq ) delete _pd_seq; }
00178
00179 inline CPeerNames_var& operator = (CPeerNames* _s) {
00180 if( _pd_seq ) delete _pd_seq;
00181 _pd_seq = _s;
00182 return *this;
00183 }
00184 inline CPeerNames_var& operator = (const CPeerNames_var& _s) {
00185 if( _s._pd_seq ) {
00186 if( !_pd_seq ) _pd_seq = new CPeerNames;
00187 *_pd_seq = *_s._pd_seq;
00188 } else if( _pd_seq ) {
00189 delete _pd_seq;
00190 _pd_seq = 0;
00191 }
00192 return *this;
00193 }
00194 inline _CORBA_String_element operator [] (_CORBA_ULong _s) {
00195 return (*_pd_seq)[_s];
00196 }
00197
00198
00199
00200 inline CPeerNames* operator -> () { return _pd_seq; }
00201 inline const CPeerNames* operator -> () const { return _pd_seq; }
00202 #if defined(__GNUG__)
00203 inline operator CPeerNames& () const { return *_pd_seq; }
00204 #else
00205 inline operator const CPeerNames& () const { return *_pd_seq; }
00206 inline operator CPeerNames& () { return *_pd_seq; }
00207 #endif
00208
00209 inline const CPeerNames& in() const { return *_pd_seq; }
00210 inline CPeerNames& inout() { return *_pd_seq; }
00211 inline CPeerNames*& out() {
00212 if( _pd_seq ) { delete _pd_seq; _pd_seq = 0; }
00213 return _pd_seq;
00214 }
00215 inline CPeerNames* _retn() { CPeerNames* tmp = _pd_seq; _pd_seq = 0; return tmp; }
00216
00217 friend class CPeerNames_out;
00218
00219 private:
00220 CPeerNames* _pd_seq;
00221 };
00222
00223 class CPeerNames_out {
00224 public:
00225 inline CPeerNames_out(CPeerNames*& _s) : _data(_s) { _data = 0; }
00226 inline CPeerNames_out(CPeerNames_var& _s)
00227 : _data(_s._pd_seq) { _s = (CPeerNames*) 0; }
00228 inline CPeerNames_out(const CPeerNames_out& _s) : _data(_s._data) {}
00229 inline CPeerNames_out& operator = (const CPeerNames_out& _s) {
00230 _data = _s._data;
00231 return *this;
00232 }
00233 inline CPeerNames_out& operator = (CPeerNames* _s) {
00234 _data = _s;
00235 return *this;
00236 }
00237 inline operator CPeerNames*&() { return _data; }
00238 inline CPeerNames*& ptr() { return _data; }
00239 inline CPeerNames* operator->() { return _data; }
00240
00241 inline _CORBA_String_element operator [] (_CORBA_ULong _i) {
00242 return (*_data)[_i];
00243 }
00244
00245
00246
00247 CPeerNames*& _data;
00248
00249 private:
00250 CPeerNames_out();
00251 CPeerNames_out& operator=(const CPeerNames_var&);
00252 };
00253
00254
00255 };
00256
00257 class _objref_CTaskContext :
00258 public virtual ::CORBA::Object,
00259 public virtual omniObjRef
00260 {
00261 public:
00262 char* getName();
00263 char* getDescription();
00264 CTaskState getTaskState();
00265 ::CORBA::Boolean configure();
00266 ::CORBA::Boolean start();
00267 ::CORBA::Boolean activate();
00268 ::CORBA::Boolean stop();
00269 ::CORBA::Boolean resetException();
00270 ::CORBA::Boolean cleanup();
00271 ::CORBA::Boolean isActive();
00272 ::CORBA::Boolean isRunning();
00273 ::CORBA::Boolean isConfigured();
00274 ::CORBA::Boolean inFatalError();
00275 ::CORBA::Boolean inRunTimeError();
00276 CDataFlowInterface_ptr ports();
00277 CService_ptr getProvider(const char* service_name);
00278 CServiceRequester_ptr getRequester(const char* service_name);
00279 CTaskContext::CPeerNames* getPeerList();
00280 CTaskContext_ptr getPeer(const char* name);
00281 ::CORBA::Boolean hasPeer(const char* name);
00282 ::CORBA::Boolean addPeer(CTaskContext_ptr p, const char* peer_alias);
00283 ::CORBA::Boolean removePeer(const char* name);
00284 ::CORBA::Boolean connectPeers(CTaskContext_ptr p);
00285 ::CORBA::Boolean disconnectPeers(const char* name);
00286 ::CORBA::Boolean connectPorts(CTaskContext_ptr p);
00287 ::CORBA::Boolean connectServices(CTaskContext_ptr p);
00288
00289 inline _objref_CTaskContext() { _PR_setobj(0); }
00290 _objref_CTaskContext(omniIOR*, omniIdentity*);
00291
00292 protected:
00293 virtual ~_objref_CTaskContext();
00294
00295
00296 private:
00297 virtual void* _ptrToObjRef(const char*);
00298
00299 _objref_CTaskContext(const _objref_CTaskContext&);
00300 _objref_CTaskContext& operator = (const _objref_CTaskContext&);
00301
00302
00303 friend class CTaskContext;
00304 };
00305
00306 class _pof_CTaskContext : public _OMNI_NS(proxyObjectFactory) {
00307 public:
00308 inline _pof_CTaskContext() : _OMNI_NS(proxyObjectFactory)(CTaskContext::_PD_repoId) {}
00309 virtual ~_pof_CTaskContext();
00310
00311 virtual omniObjRef* newObjRef(omniIOR*,omniIdentity*);
00312 virtual _CORBA_Boolean is_a(const char*) const;
00313 };
00314
00315 class _impl_CTaskContext :
00316 public virtual omniServant
00317 {
00318 public:
00319 virtual ~_impl_CTaskContext();
00320
00321 virtual char* getName() = 0;
00322 virtual char* getDescription() = 0;
00323 virtual CTaskState getTaskState() = 0;
00324 virtual ::CORBA::Boolean configure() = 0;
00325 virtual ::CORBA::Boolean start() = 0;
00326 virtual ::CORBA::Boolean activate() = 0;
00327 virtual ::CORBA::Boolean stop() = 0;
00328 virtual ::CORBA::Boolean resetException() = 0;
00329 virtual ::CORBA::Boolean cleanup() = 0;
00330 virtual ::CORBA::Boolean isActive() = 0;
00331 virtual ::CORBA::Boolean isRunning() = 0;
00332 virtual ::CORBA::Boolean isConfigured() = 0;
00333 virtual ::CORBA::Boolean inFatalError() = 0;
00334 virtual ::CORBA::Boolean inRunTimeError() = 0;
00335 virtual CDataFlowInterface_ptr ports() = 0;
00336 virtual CService_ptr getProvider(const char* service_name) = 0;
00337 virtual CServiceRequester_ptr getRequester(const char* service_name) = 0;
00338 virtual CTaskContext::CPeerNames* getPeerList() = 0;
00339 virtual CTaskContext_ptr getPeer(const char* name) = 0;
00340 virtual ::CORBA::Boolean hasPeer(const char* name) = 0;
00341 virtual ::CORBA::Boolean addPeer(CTaskContext_ptr p, const char* peer_alias) = 0;
00342 virtual ::CORBA::Boolean removePeer(const char* name) = 0;
00343 virtual ::CORBA::Boolean connectPeers(CTaskContext_ptr p) = 0;
00344 virtual ::CORBA::Boolean disconnectPeers(const char* name) = 0;
00345 virtual ::CORBA::Boolean connectPorts(CTaskContext_ptr p) = 0;
00346 virtual ::CORBA::Boolean connectServices(CTaskContext_ptr p) = 0;
00347
00348 public:
00349 virtual _CORBA_Boolean _dispatch(omniCallHandle&);
00350
00351 private:
00352 virtual void* _ptrToInterface(const char*);
00353 virtual const char* _mostDerivedRepoId();
00354
00355 };
00356
00357
00358 _CORBA_MODULE_VAR _dyn_attr const ::CORBA::TypeCode_ptr _tc_CTaskContext;
00359
00360 _CORBA_MODULE_END
00361
00362 _CORBA_MODULE_END
00363
00364
00365
00366 _CORBA_MODULE POA_RTT
00367 _CORBA_MODULE_BEG
00368
00369 _CORBA_MODULE corba
00370 _CORBA_MODULE_BEG
00371
00372 class CTaskContext :
00373 public virtual RTT::corba::_impl_CTaskContext,
00374 public virtual ::PortableServer::ServantBase
00375 {
00376 public:
00377 virtual ~CTaskContext();
00378
00379 inline ::RTT::corba::CTaskContext_ptr _this() {
00380 return (::RTT::corba::CTaskContext_ptr) _do_this(::RTT::corba::CTaskContext::_PD_repoId);
00381 }
00382 };
00383
00384 _CORBA_MODULE_END
00385
00386 _CORBA_MODULE_END
00387
00388
00389
00390 _CORBA_MODULE OBV_RTT
00391 _CORBA_MODULE_BEG
00392
00393 _CORBA_MODULE corba
00394 _CORBA_MODULE_BEG
00395
00396 _CORBA_MODULE_END
00397
00398 _CORBA_MODULE_END
00399
00400
00401
00402
00403
00404 #undef _core_attr
00405 #undef _dyn_attr
00406
00407 inline void operator >>=(RTT::corba::CTaskState _e, cdrStream& s) {
00408 ::operator>>=((::CORBA::ULong)_e, s);
00409 }
00410
00411 inline void operator <<= (RTT::corba::CTaskState& _e, cdrStream& s) {
00412 ::CORBA::ULong _0RL_e;
00413 ::operator<<=(_0RL_e,s);
00414 if (_0RL_e <= RTT::corba::CRunTimeError) {
00415 _e = (RTT::corba::CTaskState) _0RL_e;
00416 }
00417 else {
00418 OMNIORB_THROW(MARSHAL,_OMNI_NS(MARSHAL_InvalidEnumValue),
00419 (::CORBA::CompletionStatus)s.completion());
00420 }
00421 }
00422
00423 void operator<<=(::CORBA::Any& _a, RTT::corba::CTaskState _s);
00424 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, RTT::corba::CTaskState& _s);
00425
00426 void operator<<=(::CORBA::Any& _a, const RTT::corba::CTaskContext::CPeerNames& _s);
00427 void operator<<=(::CORBA::Any& _a, RTT::corba::CTaskContext::CPeerNames* _sp);
00428 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, RTT::corba::CTaskContext::CPeerNames*& _sp);
00429 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, const RTT::corba::CTaskContext::CPeerNames*& _sp);
00430
00431 void operator<<=(::CORBA::Any& _a, RTT::corba::CTaskContext_ptr _s);
00432 void operator<<=(::CORBA::Any& _a, RTT::corba::CTaskContext_ptr* _s);
00433 _CORBA_Boolean operator>>=(const ::CORBA::Any& _a, RTT::corba::CTaskContext_ptr& _s);
00434
00435
00436
00437 inline void
00438 RTT::corba::CTaskContext::_marshalObjRef(::RTT::corba::CTaskContext_ptr obj, cdrStream& s) {
00439 omniObjRef::_marshal(obj->_PR_getobj(),s);
00440 }
00441
00442
00443
00444
00445 #ifdef USE_stub_in_nt_dll_NOT_DEFINED_TaskContext
00446 # undef USE_stub_in_nt_dll
00447 # undef USE_stub_in_nt_dll_NOT_DEFINED_TaskContext
00448 #endif
00449 #ifdef USE_core_stub_in_nt_dll_NOT_DEFINED_TaskContext
00450 # undef USE_core_stub_in_nt_dll
00451 # undef USE_core_stub_in_nt_dll_NOT_DEFINED_TaskContext
00452 #endif
00453 #ifdef USE_dyn_stub_in_nt_dll_NOT_DEFINED_TaskContext
00454 # undef USE_dyn_stub_in_nt_dll
00455 # undef USE_dyn_stub_in_nt_dll_NOT_DEFINED_TaskContext
00456 #endif
00457
00458 #endif // __TaskContext_hh__
00459