Changeset 280 for trunk/idl-compiler/h-emitter_c
- Timestamp:
- Mar 30, 2007, 10:31:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/h-emitter_c/h_file_emitter.c
r278 r280 80 80 /* Include header of parent */ 81 81 if(pifParent){ 82 char* chrTemp=strlwr(g_strdup(pifParent->chrName));83 82 fprintf(fh, "/* Include for the parent class */\n"); 84 fprintf(fh, "#include \"%s.h\"\n\n", chrTemp);85 g_free(chrTemp);83 if(pifParent->chrFileStem) 84 fprintf(fh, "#include \"%s.h\"\n\n", pifParent->chrFileStem); 86 85 } 87 86 } … … 110 109 fprintf(fh, " nomMToken %s;\n", pm->chrName); 111 110 } 112 fprintf(fh, "}%sClassData \n\n", pif->chrName);111 fprintf(fh, "}%sClassData;\n\n", pif->chrName); 113 112 114 113 fprintf(fh, "NOMEXTERN struct %sCClassDataStructure {\n", pif->chrName); … … 124 123 FILE* fh=pLocalPI->outFile; 125 124 126 fprintf(fh, "/* This function is used to check if a given object is valid and the\n"); 127 fprintf(fh, " object supports the method */\n"); 128 fprintf(fh, "NOMEXTERN gboolean NOMLINK nomCheckObjectPtr(NOMObject *nomSelf, NOMClass* nomClass, gchar* chrMethodName, CORBA_Environment *ev);\n\n"); 125 if(strcmp(pif->chrName , "NOMObject")) 126 { 127 fprintf(fh, "/* This function is used to check if a given object is valid and the\n"); 128 fprintf(fh, " object supports the method */\n"); 129 fprintf(fh, "NOMEXTERN gboolean NOMLINK nomCheckObjectPtr(NOMObject *nomSelf, NOMClass* nomClass, gchar* chrMethodName, CORBA_Environment *ev);\n\n"); 130 } 131 else 132 { 133 fprintf(fh, "/* This function is used to check if the given object is valid and a NOMObject */\n"); 134 fprintf(fh, "NOMEXTERN gboolean NOMLINK nomCheckNOMObjectPtr(NOMObject *nomSelf, NOMClass* nomClass, gchar* chrMethodName, CORBA_Environment *ev);\n\n"); 135 } 129 136 } 130 137 … … 157 164 emitMethodParams(pLocalPI, pif, pm->pParamArray); 158 165 159 fprintf(fh, " C orba_Environment *ev);\n");160 fprintf(fh, "typedef nomTP_%s_%s *nomTD_%s_%s \n", pif->chrName, pm->chrName,166 fprintf(fh, " CORBA_Environment *ev);\n"); 167 fprintf(fh, "typedef nomTP_%s_%s *nomTD_%s_%s;\n", pif->chrName, pm->chrName, 161 168 pif->chrName, pm->chrName); 162 169 fprintf(fh, "/* define the name for this method */\n"); … … 173 180 /* Do parameters */ 174 181 emitMethodParams(pLocalPI, pif, pm->pParamArray); 175 fprintf(fh, " C orba_Environment *ev);\n");182 fprintf(fh, " CORBA_Environment *ev);\n"); 176 183 177 184 fprintf(fh, "#define %s_%s(nomSelf,", pif->chrName, pm->chrName); … … 193 200 emitMethodParamsNoTypes(pLocalPI, pif, pm->pParamArray); 194 201 fprintf(fh, " ev) \\\n"); 195 fprintf(fh, " (nomCheckObjectPtr((NOMObject*)nomSelf, %sClassData.classObject,",pif->chrName); 202 if(strcmp(pif->chrName , "NOMObject")) 203 fprintf(fh, " (nomCheckObjectPtr((NOMObject*)nomSelf, %sClassData.classObject,",pif->chrName); 204 else 205 fprintf(fh, " (nomCheckNOMObjectPtr(nomSelf, %sClassData.classObject,",pif->chrName); 196 206 fprintf(fh, "\"%s_%s\", ev) ? \\\n", pif->chrName, pm->chrName); 197 207 … … 200 210 /* Do parameters */ 201 211 emitMethodParamsNoTypes(pLocalPI, pif, pm->pParamArray); 202 fprintf(fh, " ev)) : (gpointer) NULL)\n"); 212 fprintf(fh, " ev)) : (%s", pm->mpReturn.chrType); 213 for(b=0;b<pm->mpReturn.uiStar;b++) 214 fprintf(fh, "*"); 215 fprintf(fh, ") NULL)\n"); 203 216 fprintf(fh, "#endif\n"); 204 217 fprintf(fh, "#else /* NOM_NO_PARAM_CHECK */\n"); … … 285 298 chrTemp=g_strconcat(pif->chrFileStem, ".h", NULL); 286 299 287 printInterface(pif);300 //printInterface(pif); 288 301 if((pLocalPI->outFile=openOutfile(gScanner, chrTemp))!=NULLHANDLE) 289 302 {
Note:
See TracChangeset
for help on using the changeset viewer.