Changeset 198 for trunk/ORBit2-2.14.0/src/idl-compiler
- Timestamp:
- Jan 18, 2007, 11:02:48 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-headers.c
r145 r198 4 4 #include <string.h> 5 5 #include <ctype.h> 6 7 /* 8 Voyager implementation notes: 9 10 The name of the explicit metaclass is found in ch_output_const_dcl(). That 11 function is responsible for putting constants into the header file. 12 */ 6 13 7 14 /* ch = C header */ … … 15 22 static void ch_output_voyager(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci); 16 23 static void ch_VoyagerOutputClassDeclaration(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci); 24 25 static GString *gsMetaClassName=NULL; /* Holding an explicit metaclass if any */ 17 26 18 27 void … … 117 126 fprintf(ci->fh, "\n"); 118 127 119 /* fprintf(ci->fh, "#define %s_classObject %sClassData.classObject\n", id, id); */ 120 fprintf(ci->fh, "#define _%s %sClassData.classObject\n", id, id); 128 fprintf(ci->fh, "/* Line %d %s */\n", __LINE__, __FUNCTION__); 129 if(NULL==gsMetaClassName) 130 fprintf(ci->fh, "#define _%s %sClassData.classObject\n", id, id); 131 else 132 fprintf(ci->fh, "#define _%s (%s*)%sClassData.classObject\n", id, gsMetaClassName->str, id); 121 133 /* New() macro */ 122 134 fprintf(ci->fh, "\n/*\n * New macro for %s\n */\n", id); … … 643 655 fprintf(ci->fh, "\n"); 644 656 fprintf(ci->fh, "#endif /* !%s */\n\n", id); 645 657 658 /* Get the name of our explicit metaclass if any */ 659 if(IDLN_STRING==IDL_NODE_TYPE(IDL_CONST_DCL(tree).const_exp)) 660 { 661 /* Our metaclass info is a string */ 662 if(!strcmp(NOM_METACLASS_STRING, IDL_IDENT(ident).str)) 663 { 664 gsMetaClassName=g_string_new(NULL); 665 g_string_printf(gsMetaClassName, "%s", IDL_STRING(IDL_CONST_DCL(tree).const_exp).value); 666 // printf(" %d --- > %s %s (%x)\n", 667 // __LINE__, id, IDL_STRING(IDL_CONST_DCL(ski->tree).const_exp).value, gsMetaClassName[ulCurInterface]); 668 } 669 } 646 670 g_free(id); 647 671 }
Note:
See TracChangeset
for help on using the changeset viewer.
