CCAFFEINE
0.8.8
|
00001 /* 00002 * File: ccaffeine_ports_PortTranslator_IOR.h 00003 * Symbol: ccaffeine.ports.PortTranslator-v0.3 00004 * Symbol Type: class 00005 * Babel Version: 1.4.0 00006 * Description: Intermediate Object Representation for ccaffeine.ports.PortTranslator 00007 * 00008 * WARNING: Automatically generated; changes will be lost 00009 * 00010 */ 00011 00012 #ifndef included_ccaffeine_ports_PortTranslator_IOR_h 00013 #define included_ccaffeine_ports_PortTranslator_IOR_h 00014 00015 #ifndef included_sidl_header_h 00016 #include "sidl_header.h" 00017 #endif 00018 struct sidl_rmi_InstanceHandle__object; 00019 #ifndef included_gov_cca_Port_IOR_h 00020 #include "gov_cca_Port_IOR.h" 00021 #endif 00022 #ifndef included_sidl_BaseClass_IOR_h 00023 #include "sidl_BaseClass_IOR.h" 00024 #endif 00025 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif 00029 00030 /* 00031 * Symbol "ccaffeine.ports.PortTranslator" (version 0.3) 00032 * 00033 * Foreign ports (i.e. Ports of a different (non)cca binding) are 00034 * wrapped by Ccaffeine in this class. If a foreign port is 00035 * connected to a Babel component, an instance of 00036 * ccaffeine::PortTranslator is wrapped around it. Moreover, if a 00037 * PortTranslator is exported through the addProvidesPort method on 00038 * Services, the contained port will be automatically delt with as 00039 * if the component belonged to the exported port's religion. 00040 * Several methods are provided on PortTranslator that will allow 00041 * access to the other Religions. The methods return the foreign 00042 * port as a void and this is castable to exactly the indicated 00043 * Port type, and nothing else. Further cast is required to get the 00044 * base Port type to a particular Port in the foreign 00045 * Religion. Example: 00046 * 00047 * PortTranslator pt = getPort("my_classic_parameter_port"); 00048 * classic::gov::cca::Port port = 00049 * static_cast < classic::gov::cca::Port > (pt.getClassicPort()); 00050 * if(port == NULL) { 00051 * perror("Hey this is not a Classic Port"); 00052 * } 00053 * ParameterPort pp = 00054 * dynamic_cast< ParameterPort > (port); 00055 * if(pp == NULL) { 00056 * perror("Hey this is not a ParameterPort"); 00057 * } 00058 * // use the pp now as you would in Classic Religion ... 00059 * 00060 * Note that the following shortcut will yield unexpected results 00061 * and does not conform to the C++ standard: 00062 * 00063 * // This is a REALLY BAD IDEA, DO NOT DO THIS: 00064 * PortTranslator pt = getPort("my_classic_parameter_port"); 00065 * ParameterPort pp = (ParameterPort) (pt.getClassicPort()); 00066 * 00067 * SEE ALSO: 00068 * The principal use of this port has been to get at classic 00069 * parameter ports. Those users should instead consider using the 00070 * babel-native ParameterPort or the BasicParameterPort 00071 * defined in the specification. This will make their component 00072 * code much cleaner and less ccaffeine-cruft dependent. 00073 */ 00074 00075 struct ccaffeine_ports_PortTranslator__array; 00076 struct ccaffeine_ports_PortTranslator__object; 00077 struct ccaffeine_ports_PortTranslator__sepv; 00078 00079 /* 00080 * Forward references for external classes and interfaces. 00081 */ 00082 00083 struct sidl_BaseException__array; 00084 struct sidl_BaseException__object; 00085 struct sidl_BaseInterface__array; 00086 struct sidl_BaseInterface__object; 00087 struct sidl_ClassInfo__array; 00088 struct sidl_ClassInfo__object; 00089 struct sidl_RuntimeException__array; 00090 struct sidl_RuntimeException__object; 00091 struct sidl_rmi_Call__array; 00092 struct sidl_rmi_Call__object; 00093 struct sidl_rmi_Return__array; 00094 struct sidl_rmi_Return__object; 00095 00096 /* 00097 * Declare the static method entry point vector. 00098 */ 00099 00100 struct ccaffeine_ports_PortTranslator__sepv { 00101 /* Implicit builtin methods */ 00102 /* 0 */ 00103 /* 1 */ 00104 /* 2 */ 00105 /* 3 */ 00106 /* 4 */ 00107 /* 5 */ 00108 /* 6 */ 00109 void (*f__set_hooks_static)( 00110 /* in */ sidl_bool enable, 00111 /* out */ struct sidl_BaseInterface__object **_ex); 00112 /* 7 */ 00113 void (*f__set_contracts_static)( 00114 /* in */ sidl_bool enable, 00115 /* in */ const char* enfFilename, 00116 /* in */ sidl_bool resetCounters, 00117 /* out */ struct sidl_BaseInterface__object **_ex); 00118 /* 8 */ 00119 void (*f__dump_stats_static)( 00120 /* in */ const char* filename, 00121 /* in */ const char* prefix, 00122 /* out */ struct sidl_BaseInterface__object **_ex); 00123 /* 9 */ 00124 /* 10 */ 00125 /* 11 */ 00126 /* 12 */ 00127 /* Methods introduced in sidl.BaseInterface-v0.9.17 */ 00128 /* Methods introduced in sidl.BaseClass-v0.9.17 */ 00129 /* Methods introduced in gov.cca.Port-v0.8.5 */ 00130 /* Methods introduced in ccaffeine.ports.PortTranslator-v0.3 */ 00131 struct ccaffeine_ports_PortTranslator__object* (*f_createFromClassic)( 00132 /* in */ void* classic_Port_ptr, 00133 /* out */ struct sidl_BaseInterface__object **_ex); 00134 struct ccaffeine_ports_PortTranslator__object* (*f_createFromRaw)( 00135 /* in */ void* ccafeopq_Port_ptr, 00136 /* out */ struct sidl_BaseInterface__object **_ex); 00137 }; 00138 00139 /* 00140 * Declare the method entry point vector. 00141 */ 00142 00143 struct ccaffeine_ports_PortTranslator__epv { 00144 /* Implicit builtin methods */ 00145 /* 0 */ 00146 void* (*f__cast)( 00147 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00148 /* in */ const char* name, 00149 /* out */ struct sidl_BaseInterface__object **_ex); 00150 /* 1 */ 00151 void (*f__delete)( 00152 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00153 /* out */ struct sidl_BaseInterface__object **_ex); 00154 /* 2 */ 00155 void (*f__exec)( 00156 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00157 /* in */ const char* methodName, 00158 /* in */ struct sidl_rmi_Call__object* inArgs, 00159 /* in */ struct sidl_rmi_Return__object* outArgs, 00160 /* out */ struct sidl_BaseInterface__object **_ex); 00161 /* 3 */ 00162 char* (*f__getURL)( 00163 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00164 /* out */ struct sidl_BaseInterface__object **_ex); 00165 /* 4 */ 00166 void (*f__raddRef)( 00167 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00168 /* out */ struct sidl_BaseInterface__object **_ex); 00169 /* 5 */ 00170 sidl_bool (*f__isRemote)( 00171 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00172 /* out */ struct sidl_BaseInterface__object **_ex); 00173 /* 6 */ 00174 void (*f__set_hooks)( 00175 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00176 /* in */ sidl_bool enable, 00177 /* out */ struct sidl_BaseInterface__object **_ex); 00178 /* 7 */ 00179 void (*f__set_contracts)( 00180 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00181 /* in */ sidl_bool enable, 00182 /* in */ const char* enfFilename, 00183 /* in */ sidl_bool resetCounters, 00184 /* out */ struct sidl_BaseInterface__object **_ex); 00185 /* 8 */ 00186 void (*f__dump_stats)( 00187 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00188 /* in */ const char* filename, 00189 /* in */ const char* prefix, 00190 /* out */ struct sidl_BaseInterface__object **_ex); 00191 /* 9 */ 00192 void (*f__ctor)( 00193 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00194 /* out */ struct sidl_BaseInterface__object **_ex); 00195 /* 10 */ 00196 void (*f__ctor2)( 00197 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00198 /* in */ void* private_data, 00199 /* out */ struct sidl_BaseInterface__object **_ex); 00200 /* 11 */ 00201 void (*f__dtor)( 00202 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00203 /* out */ struct sidl_BaseInterface__object **_ex); 00204 /* 12 */ 00205 void (*f__load)( 00206 /* out */ struct sidl_BaseInterface__object **_ex); 00207 /* Methods introduced in sidl.BaseInterface-v0.9.17 */ 00208 void (*f_addRef)( 00209 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00210 /* out */ struct sidl_BaseInterface__object **_ex); 00211 void (*f_deleteRef)( 00212 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00213 /* out */ struct sidl_BaseInterface__object **_ex); 00214 sidl_bool (*f_isSame)( 00215 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00216 /* in */ struct sidl_BaseInterface__object* iobj, 00217 /* out */ struct sidl_BaseInterface__object **_ex); 00218 sidl_bool (*f_isType)( 00219 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00220 /* in */ const char* name, 00221 /* out */ struct sidl_BaseInterface__object **_ex); 00222 struct sidl_ClassInfo__object* (*f_getClassInfo)( 00223 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00224 /* out */ struct sidl_BaseInterface__object **_ex); 00225 /* Methods introduced in sidl.BaseClass-v0.9.17 */ 00226 /* Methods introduced in gov.cca.Port-v0.8.5 */ 00227 /* Methods introduced in ccaffeine.ports.PortTranslator-v0.3 */ 00228 void (*f_initialize)( 00229 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00230 /* in */ void* opaquePort, 00231 /* out */ struct sidl_BaseInterface__object **_ex); 00232 void* (*f_getClassicPort)( 00233 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00234 /* out */ struct sidl_BaseInterface__object **_ex); 00235 void* (*f_getChasmPort)( 00236 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00237 /* out */ struct sidl_BaseInterface__object **_ex); 00238 void* (*f_getRawPort)( 00239 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00240 /* out */ struct sidl_BaseInterface__object **_ex); 00241 }; 00242 00243 /* 00244 * Declare the method pre hooks entry point vector. 00245 */ 00246 00247 struct ccaffeine_ports_PortTranslator__pre_epv { 00248 void (*f_initialize_pre)( 00249 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00250 /* in */ void* opaquePort, 00251 /* out */ struct sidl_BaseInterface__object **_ex); 00252 void (*f_getClassicPort_pre)( 00253 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00254 /* out */ struct sidl_BaseInterface__object **_ex); 00255 void (*f_getChasmPort_pre)( 00256 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00257 /* out */ struct sidl_BaseInterface__object **_ex); 00258 void (*f_getRawPort_pre)( 00259 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00260 /* out */ struct sidl_BaseInterface__object **_ex); 00261 }; 00262 00263 /* 00264 * Declare the method post hooks entry point vector. 00265 */ 00266 00267 struct ccaffeine_ports_PortTranslator__post_epv { 00268 void (*f_initialize_post)( 00269 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00270 /* in */ void* opaquePort, 00271 /* out */ struct sidl_BaseInterface__object **_ex); 00272 void (*f_getClassicPort_post)( 00273 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00274 /* in */ void* _retval, 00275 /* out */ struct sidl_BaseInterface__object **_ex); 00276 void (*f_getChasmPort_post)( 00277 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00278 /* in */ void* _retval, 00279 /* out */ struct sidl_BaseInterface__object **_ex); 00280 void (*f_getRawPort_post)( 00281 /* in */ struct ccaffeine_ports_PortTranslator__object* self, 00282 /* in */ void* _retval, 00283 /* out */ struct sidl_BaseInterface__object **_ex); 00284 }; 00285 00286 /* 00287 * Declare the static method pre hooks entry point vector. 00288 */ 00289 00290 struct ccaffeine_ports_PortTranslator__pre_sepv { 00291 void (*f_createFromClassic_pre)( 00292 /* in */ void* classic_Port_ptr, 00293 /* out */ struct sidl_BaseInterface__object **_ex); 00294 void (*f_createFromRaw_pre)( 00295 /* in */ void* ccafeopq_Port_ptr, 00296 /* out */ struct sidl_BaseInterface__object **_ex); 00297 }; 00298 00299 /* 00300 * Declare the static method post hooks entry point vector. 00301 */ 00302 00303 struct ccaffeine_ports_PortTranslator__post_sepv { 00304 void (*f_createFromClassic_post)( 00305 /* in */ void* classic_Port_ptr, 00306 /* in */ struct ccaffeine_ports_PortTranslator__object* _retval, 00307 /* out */ struct sidl_BaseInterface__object **_ex); 00308 void (*f_createFromRaw_post)( 00309 /* in */ void* ccafeopq_Port_ptr, 00310 /* in */ struct ccaffeine_ports_PortTranslator__object* _retval, 00311 /* out */ struct sidl_BaseInterface__object **_ex); 00312 }; 00313 00314 /* 00315 * Define the controls and statistics structure. 00316 */ 00317 00318 00319 struct ccaffeine_ports_PortTranslator__cstats { 00320 sidl_bool use_hooks; 00321 }; 00322 00323 /* 00324 * Define the class object structure. 00325 */ 00326 00327 struct ccaffeine_ports_PortTranslator__object { 00328 struct sidl_BaseClass__object d_sidl_baseclass; 00329 struct gov_cca_Port__object d_gov_cca_port; 00330 struct ccaffeine_ports_PortTranslator__epv* d_epv; 00331 struct ccaffeine_ports_PortTranslator__cstats d_cstats; 00332 void* d_data; 00333 }; 00334 00335 struct ccaffeine_ports_PortTranslator__external { 00336 struct ccaffeine_ports_PortTranslator__object* 00337 (*createObject)(void* ddata, struct sidl_BaseInterface__object **_ex); 00338 00339 struct ccaffeine_ports_PortTranslator__sepv* 00340 (*getStaticEPV)(void); 00341 struct sidl_BaseClass__epv*(*getSuperEPV)(void); 00342 int d_ior_major_version; 00343 int d_ior_minor_version; 00344 }; 00345 00346 /* 00347 * This function returns a pointer to a static structure of 00348 * pointers to function entry points. Its purpose is to provide 00349 * one-stop shopping for loading DLLs. 00350 */ 00351 00352 const struct ccaffeine_ports_PortTranslator__external* 00353 ccaffeine_ports_PortTranslator__externals(void); 00354 00355 extern struct ccaffeine_ports_PortTranslator__object* 00356 ccaffeine_ports_PortTranslator__createObject(void* ddata,struct 00357 sidl_BaseInterface__object ** _ex); 00358 00359 extern struct ccaffeine_ports_PortTranslator__sepv* 00360 ccaffeine_ports_PortTranslator__getStaticEPV(void); 00361 00362 00363 extern struct ccaffeine_ports_PortTranslator__sepv* 00364 ccaffeine_ports_PortTranslator__getTypeStaticEPV(int type); 00365 00366 extern void ccaffeine_ports_PortTranslator__init( 00367 struct ccaffeine_ports_PortTranslator__object* self, void* ddata, struct 00368 sidl_BaseInterface__object ** _ex); 00369 00370 extern void ccaffeine_ports_PortTranslator__getEPVs( 00371 struct sidl_BaseInterface__epv **s_arg_epv__sidl_baseinterface, 00372 struct sidl_BaseClass__epv **s_arg_epv__sidl_baseclass, 00373 struct gov_cca_Port__epv **s_arg_epv__gov_cca_port, 00374 struct gov_cca_Port__epv **s_arg_epv_hooks__gov_cca_port, 00375 struct ccaffeine_ports_PortTranslator__epv 00376 **s_arg_epv__ccaffeine_ports_porttranslator, 00377 struct ccaffeine_ports_PortTranslator__epv 00378 **s_arg_epv_hooks__ccaffeine_ports_porttranslator); 00379 00380 extern void ccaffeine_ports_PortTranslator__fini( 00381 struct ccaffeine_ports_PortTranslator__object* self, struct 00382 sidl_BaseInterface__object ** _ex); 00383 00384 extern void ccaffeine_ports_PortTranslator__IOR_version(int32_t *major, int32_t 00385 *minor); 00386 00387 /* 00388 * Define static structure options. 00389 */ 00390 00391 static const int s_SEPV_CCAFFEINE_PORTS_PORTTRANSLATOR_BASE = 0; 00392 static const int s_SEPV_CCAFFEINE_PORTS_PORTTRANSLATOR_CONTRACTS = 1; 00393 static const int s_SEPV_CCAFFEINE_PORTS_PORTTRANSLATOR_HOOKS = 2; 00394 00395 struct sidl_BaseInterface__object* 00396 skel_ccaffeine_ports_PortTranslator_fconnect_sidl_BaseInterface(const char* 00397 url, sidl_bool ar, struct sidl_BaseInterface__object * *_ex); 00398 struct ccaffeine_ports_PortTranslator__remote{ 00399 int d_refcount; 00400 struct sidl_rmi_InstanceHandle__object *d_ih; 00401 }; 00402 00403 #ifdef __cplusplus 00404 } 00405 #endif 00406 #endif