Changeset 114 for trunk/ORBit2-2.14.0/src/idl-compiler
- Timestamp:
- Nov 26, 2006, 3:07:22 PM (19 years ago)
- Location:
- trunk/ORBit2-2.14.0/src/idl-compiler
- Files:
-
- 2 edited
-
orbit-idl-c-headers.c (modified) (3 diffs)
-
orbit-idl-c-skelimpl.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-headers.c
r100 r114 39 39 fprintf(ci->fh, "\n/** typedefs **/\n"); 40 40 ch_output_types(tree, rinfo, ci); 41 41 42 #ifdef USE_LIBIDL_CODE 42 43 if ( ci->do_skel_defs ) { 43 44 /* Do all the POA structures, etc. */ 44 45 fprintf(ci->fh, "\n/** POA structures **/\n"); 45 #ifdef USE_LIBIDL_CODE46 46 ch_output_poa(tree, rinfo, ci); 47 #else48 fprintf(ci->fh, " /* POA structures not used in Voyager */\n");49 #endif50 51 47 fprintf(ci->fh, "\n/** skel prototypes **/\n"); 52 #ifdef USE_LIBIDL_CODE53 48 ch_output_skel_protos(tree, rinfo, ci); 54 #else 55 fprintf(ci->fh, " /* skel prototypes not used in Voyager */\n"); 56 #endif 57 } 49 } 50 #endif 51 58 52 fprintf(ci->fh, "\n/** stub prototypes **/\n"); 59 53 fprintf(ci->fh, " /* (%s, %s line %d) */\n", __FILE__, __FUNCTION__, __LINE__); … … 107 101 id = orbit_cbe_get_typespec_str(tree); 108 102 109 fprintf(ci->fh, "\n/** Voyager **/\n");103 fprintf(ci->fh, "\n/** Voyager (%s: %s line %d) **/\n", __FILE__, __FUNCTION__, __LINE__); 110 104 111 105 /* C specific class structure */ … … 125 119 fprintf(ci->fh, "\n/*\n * New macro for %s\n */\n", id); 126 120 fprintf(ci->fh, "#define %sNew() \\\n", id); 127 /* Changed for typesafety */121 /* Changed for typesafetyness */ 128 122 fprintf(ci->fh, " ((%s*)_nomNew((_%s ? _%s : %sNewClass(%s_MajorVersion, %s_MinorVersion)), (void*) 0))\n", 129 123 id, id, id, id, id ,id); -
trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-skelimpl.c
r100 r114 189 189 190 190 static 191 void VoyagerWriteParamsForParentCall(IDL_tree curif, InheritedOutputInfo *ioi) 192 { 193 IDL_tree curitem; 194 char* overridenMethodName; 195 196 if(curif == ioi->realif) 197 return; 198 199 overridenMethodName=ioi->chrOverridenMethodName; 200 201 for(curitem = IDL_INTERFACE(curif).body; curitem; curitem = IDL_LIST(curitem).next) { 202 IDL_tree curop = IDL_LIST(curitem).data; 203 204 switch(IDL_NODE_TYPE(curop)) { 205 case IDLN_OP_DCL: 206 { 207 /* Check if the current method (introduced by some parent) is the one to be 208 overriden. */ 209 if(!strcmp(overridenMethodName, IDL_IDENT(IDL_OP_DCL(curop).ident).str)){ 210 IDL_tree sub; 211 212 for (sub = IDL_OP_DCL (curop).parameter_dcls; sub; sub = IDL_LIST (sub).next) { 213 IDL_tree parm = IDL_LIST (sub).data; 214 fprintf (ioi->of, "%s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str); 215 } 216 } 217 break; 218 } 219 default: 220 break; 221 } 222 } 223 } 224 225 #if 0 226 static 191 227 void VoyagerWriteParamsForParentCall (FILE *of, 192 IDL_tree op)228 IDL_tree op) 193 229 { 194 230 IDL_tree sub; … … 200 236 for (sub = IDL_OP_DCL (op).parameter_dcls; sub; sub = IDL_LIST (sub).next) { 201 237 IDL_tree parm = IDL_LIST (sub).data; 202 fprintf (of, " %s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str);238 fprintf (of, "/**/ %s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str); 203 239 } 204 240 fprintf (of, " ev)"); 205 241 } 242 #endif 206 243 207 244 static void … … 697 734 fprintf(ski->of, " NOMLINK impl_%s_%s(%s *nomSelf,\n", 698 735 id2, IDL_IDENT(IDL_OP_DCL(ski->tree).ident).str, id2); 699 // fprintf(ski->of, " NOMLINK %s(%s *nomSelf,\n", IDL_IDENT(IDL_OP_DCL(ski->tree).ident).str, id2); 700 #endif 701 702 op = ski->tree; 703 for(curitem = IDL_OP_DCL(ski->tree).parameter_dcls; 704 curitem; curitem = IDL_LIST(curitem).next) { 705 subski.tree = IDL_LIST(curitem).data; 706 orbit_cbe_ski_process_piece(&subski); 707 } 736 #endif 737 /* Output the params */ 738 if(bOverriden) 739 { 740 fprintf(ski->of, "/* Params should end here ... */\n"); 741 op = ski->tree; 742 for(curitem = IDL_OP_DCL(ski->tree).parameter_dcls; 743 curitem; curitem = IDL_LIST(curitem).next) { 744 subski.tree = IDL_LIST(curitem).data; 745 orbit_cbe_ski_process_piece(&subski); 746 } 747 } 748 else 749 { 750 op = ski->tree; 751 for(curitem = IDL_OP_DCL(ski->tree).parameter_dcls; 752 curitem; curitem = IDL_LIST(curitem).next) { 753 subski.tree = IDL_LIST(curitem).data; 754 orbit_cbe_ski_process_piece(&subski); 755 } 756 } 708 757 709 758 if(IDL_OP_DCL(op).context_expr) … … 747 796 IDL_tree_traverse_parents(IDL_INTERFACE(tmptree).inheritance_spec, (GFunc)VoyagerOutputIntroducingClass, &ioi); 748 797 } 749 fprintf(ski->of, ":%s\";\n",gstr->str); 798 fprintf(ski->of, ":%s\";\n",gstr->str); /* Output the method name */ 750 799 751 800 fprintf(ski->of, "/* %s, %s line %d */\n", __FILE__, __FUNCTION__, __LINE__); 752 801 fprintf(ski->of, "static nomMethodProc* %s_parent_resolved;\n", id); 753 802 fprintf(ski->of, "#define %s_parent", id); 803 754 804 /* output params for macro */ 755 VoyagerWriteParamsForParentCall (ski->of, ski->tree ); 805 fprintf(ski->of, "(nomSelf, "); 806 if(IDL_INTERFACE(tmptree).inheritance_spec) { 807 InheritedOutputInfo ioi; 808 809 ioi.of = ski->of; 810 ioi.realif = tmptree; 811 ioi.chrOverridenMethodName=gstr->str; 812 IDL_tree_traverse_parents(IDL_INTERFACE(tmptree).inheritance_spec, (GFunc)VoyagerWriteParamsForParentCall, &ioi); 813 } 814 fprintf(ski->of, "ev)"); 756 815 fprintf(ski->of, " \\\n ((("); 757 816 … … 767 826 fprintf(ski->of, ") \\\n %s_parent_resolved)", id); 768 827 /* output params for macro */ 769 VoyagerWriteParamsForParentCall (ski->of, ski->tree ); 828 // VoyagerWriteParamsForParentCall (ski->of, ski->tree ); 829 fprintf(ski->of, "(nomSelf, "); 830 if(IDL_INTERFACE(tmptree).inheritance_spec) { 831 InheritedOutputInfo ioi; 832 833 ioi.of = ski->of; 834 ioi.realif = tmptree; 835 ioi.chrOverridenMethodName=gstr->str; 836 IDL_tree_traverse_parents(IDL_INTERFACE(tmptree).inheritance_spec, (GFunc)VoyagerWriteParamsForParentCall, &ioi); 837 } 838 fprintf(ski->of, "ev)"); 770 839 fprintf(ski->of, ")\n"); 771 840 #if 0
Note:
See TracChangeset
for help on using the changeset viewer.
