Changeset 117 for trunk/ORBit2-2.14.0/src
- Timestamp:
- Nov 26, 2006, 6:26:53 PM (19 years ago)
- Location:
- trunk/ORBit2-2.14.0/src/idl-compiler
- Files:
-
- 2 edited
-
orbit-idl-c-skelimpl.c (modified) (3 diffs)
-
orbit-idl-c-stubs.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-skelimpl.c
r114 r117 241 241 } 242 242 #endif 243 244 245 /* 246 This function is called for each parent to check if the current parent introduced the 247 overriden method. If yes, the parameter info is taken from this parent and put into the 248 file. 249 */ 250 static 251 void VoyagerDoWriteParamsForOverridenMethod(IDL_tree curif, InheritedOutputInfo *ioi) 252 { 253 IDL_tree curitem; 254 char* overridenMethodName; 255 256 if(curif == ioi->realif) 257 return; 258 259 overridenMethodName=ioi->chrOverridenMethodName; 260 261 for(curitem = IDL_INTERFACE(curif).body; curitem; curitem = IDL_LIST(curitem).next) { 262 IDL_tree curop = IDL_LIST(curitem).data; 263 264 switch(IDL_NODE_TYPE(curop)) { 265 case IDLN_OP_DCL: 266 { 267 /* Check if the current method (introduced by some parent) is the one to be 268 overriden. */ 269 if(!strcmp(overridenMethodName, IDL_IDENT(IDL_OP_DCL(curop).ident).str)){ 270 IDL_tree sub; 271 272 g_assert (IDL_NODE_TYPE(curop) == IDLN_OP_DCL); 273 274 /* Write the params including the typespec */ 275 for (sub = IDL_OP_DCL (curop).parameter_dcls; sub; sub = IDL_LIST (sub).next) { 276 IDL_tree parm = IDL_LIST (sub).data; 277 278 orbit_cbe_write_param_typespec (ioi->of, parm); 279 280 fprintf (ioi->of, " %s,\n", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str); 281 } 282 } 283 break; 284 } 285 default: 286 break; 287 } 288 } 289 } 290 291 /* 292 Overriden methods are introduced by some parent class. This function gets the parent node and 293 climbs down the list of classes to find the one introducing the method. A support function called 294 for every node while traversing actually writes the info. 295 */ 296 static void 297 VoyagerWriteParamsForOverridenMethod(FILE *of, 298 IDL_tree op, 299 const char *nom_prefix, 300 gboolean for_epv) 301 { 302 char * id2; 303 char * ptr; 304 IDL_tree tmptree; 305 306 g_assert (IDL_NODE_TYPE(op) == IDLN_OP_DCL); 307 308 id2=g_strdup(IDL_IDENT (IDL_OP_DCL (op).ident).str); 309 if((ptr=strstr(id2, NOM_OVERRIDE_STRING))!=NULL) 310 *ptr='\0'; 311 312 tmptree = IDL_get_parent_node(op, IDLN_INTERFACE, NULL); 313 314 if(IDL_INTERFACE(tmptree).inheritance_spec) { 315 InheritedOutputInfo ioi; 316 317 ioi.of = of; 318 ioi.realif = tmptree; 319 ioi.chrOverridenMethodName=id2; 320 IDL_tree_traverse_parents(IDL_INTERFACE(tmptree).inheritance_spec, (GFunc)VoyagerDoWriteParamsForOverridenMethod, &ioi); 321 } 322 g_free(id2); 323 } 243 324 244 325 static void … … 740 821 fprintf(ski->of, "/* Params should end here ... */\n"); 741 822 op = ski->tree; 823 VoyagerWriteParamsForOverridenMethod(ski->of, 824 op, 825 "", 826 FALSE); 827 742 828 for(curitem = IDL_OP_DCL(ski->tree).parameter_dcls; 743 829 curitem; curitem = IDL_LIST(curitem).next) { … … 838 924 fprintf(ski->of, "ev)"); 839 925 fprintf(ski->of, ")\n"); 840 #if 0841 fprintf(ski->of, "static char* nomFullIdString_%s_%s = nomMNFullDef_%s_%s;\n",842 id2, gstr->str,843 id2, gstr->str);844 #endif845 926 } 846 927 else{ -
trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-stubs.c
r116 r117 95 95 } 96 96 97 void97 static void 98 98 VoyagerWriteProtoForParentCall (FILE *of, 99 99 IDL_tree op, … … 141 141 } 142 142 143 /* 144 This function is called for each parent to check if the current parent introduced the 145 overriden method. If yes, the parameter info is taken from this parent and put into the 146 file. 147 */ 143 148 static 144 149 void VoyagerDoWriteParamsForOverridenMethod(IDL_tree curif, InheritedOutputInfo2 *ioi) … … 196 201 } 197 202 198 void VoyagerWriteParamsForOverridenMethod(FILE *of, 203 /* 204 Overriden methods are introduced by some parent class. This function gets the parent node and 205 climbs down the list of classes to find the one introducing the method. A support function called 206 for every node while traversing actually writes the info. 207 */ 208 static void 209 VoyagerWriteParamsForOverridenMethod(FILE *of, 199 210 IDL_tree op, 200 211 const char *nom_prefix,
Note:
See TracChangeset
for help on using the changeset viewer.
