Changeset 287 for trunk/idl-compiler/h-emitter_c
- Timestamp:
- Apr 1, 2007, 12:52:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/h-emitter_c/h_file_emitter.c
r282 r287 72 72 } 73 73 74 75 static void emitParentHeader(PPARSEINFO pLocalPI, PINTERFACE pif) 76 { 77 FILE* fh=pLocalPI->outFile; 78 PINTERFACE pifParent=getParentInterface(pif); 79 80 /* Include header of parent */ 81 if(pifParent){ 82 fprintf(fh, "/* Include for the parent class */\n"); 83 if(pifParent->chrFileStem) 84 fprintf(fh, "#include \"%s.h\"\n\n", pifParent->chrFileStem); 85 } 74 /** 75 This function writes an #include statement to the header for each found 76 interface. Thus all the interface information is known to the sourcefile 77 using this header. 78 */ 79 static void emitInterfaceIncludes(PPARSEINFO pLocalPI, PINTERFACE pif) 80 { 81 FILE* fh=pLocalPI->outFile; 82 int a; 83 84 for(a=0;a<pLocalPI->pInterfaceArray->len;a++) 85 { 86 PINTERFACE pifAll=g_ptr_array_index(pLocalPI->pInterfaceArray, a); 87 88 fprintf(fh, "/* Include for class %s */\n", pifAll->chrName); 89 if(pifAll->chrFileStem) 90 fprintf(fh, "#include \"%s.h\"\n", pifAll->chrFileStem); 91 } 92 fprintf(fh, "\n"); 86 93 } 87 94 … … 332 339 { 333 340 emitHFileHeader(pLocalPI, pif); 334 emit ParentHeader(pLocalPI, pif);341 emitInterfaceIncludes(pLocalPI, pif); 335 342 emitClassVersion(pLocalPI, pif); 336 343 emitClassDataStructs(pLocalPI, pif);
Note:
See TracChangeset
for help on using the changeset viewer.