Changeset 115 for trunk/ORBit2-2.14.0/src
- Timestamp:
- Nov 26, 2006, 3:23:22 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-stubs.c
r92 r115 59 59 } 60 60 61 static 62 void VoyagerWriteParamsForParentCall(IDL_tree curif, InheritedOutputInfo *ioi) 63 { 64 IDL_tree curitem; 65 char* overridenMethodName; 66 67 if(curif == ioi->realif) 68 return; 69 70 overridenMethodName=ioi->chrOverridenMethodName; 71 72 for(curitem = IDL_INTERFACE(curif).body; curitem; curitem = IDL_LIST(curitem).next) { 73 IDL_tree curop = IDL_LIST(curitem).data; 74 75 switch(IDL_NODE_TYPE(curop)) { 76 case IDLN_OP_DCL: 77 { 78 /* Check if the current method (introduced by some parent) is the one to be 79 overriden. */ 80 if(!strcmp(overridenMethodName, IDL_IDENT(IDL_OP_DCL(curop).ident).str)){ 81 IDL_tree sub; 82 83 for (sub = IDL_OP_DCL (curop).parameter_dcls; sub; sub = IDL_LIST (sub).next) { 84 IDL_tree parm = IDL_LIST (sub).data; 85 fprintf (ioi->of, "%s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str); 86 } 87 } 88 break; 89 } 90 default: 91 break; 92 } 93 } 94 } 61 95 62 96 void … … 70 104 char * id2; 71 105 char * ptr; 72 106 IDL_tree tmptree; 107 73 108 g_assert (IDL_NODE_TYPE(op) == IDLN_OP_DCL); 74 109 … … 86 121 id, id2); 87 122 88 g_free(id2);89 90 91 123 fprintf (of, "("); 92 93 fprintf (of, "nomSelf, ", id); 94 95 g_free (id); 96 124 fprintf (of, "nomSelf, "); 125 126 127 tmptree = IDL_get_parent_node(op, IDLN_INTERFACE, NULL); 128 129 if(IDL_INTERFACE(tmptree).inheritance_spec) { 130 InheritedOutputInfo ioi; 131 132 ioi.of = of; 133 ioi.realif = tmptree; 134 ioi.chrOverridenMethodName=id2; 135 IDL_tree_traverse_parents(IDL_INTERFACE(tmptree).inheritance_spec, (GFunc)VoyagerWriteParamsForParentCall, &ioi); 136 } 137 138 #if 0 97 139 for (sub = IDL_OP_DCL (op).parameter_dcls; sub; sub = IDL_LIST (sub).next) { 98 140 IDL_tree parm = IDL_LIST (sub).data; … … 101 143 fprintf (of, " %s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str); 102 144 } 103 145 #endif 146 g_free(id2); 147 g_free (id); 104 148 fprintf (of, " ev);\n"); 105 149 } … … 181 225 fprintf (of, "}\n"); 182 226 #else 227 /* This is Voyager stuff... */ 183 228 if(strstr(opname, NOM_INSTANCEVAR_STRING)==NULL && 184 229 strstr(opname, NOM_OVERRIDE_STRING)==NULL) … … 230 275 231 276 fprintf (of, "#endif\n"); 232 // fprintf(of, "/* %s_%s_parent_resolved()*/\n",233 // realid, IDL_IDENT(IDL_OP_DCL(curop).ident).str);234 235 277 #if 0 236 278 /* Inherited */
Note:
See TracChangeset
for help on using the changeset viewer.
