Ignore:
Timestamp:
Mar 27, 2007, 10:22:54 PM (18 years ago)
Author:
cinc
Message:

Work on IH file emitter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/idl-compiler/h-emitter_c/h_file_emitter.c

    r277 r278  
    7272}
    7373
    74 /**
    75    Returns the interface structure (holding all the interface information) of the
    76    parent of an interface.
    77 
    78    \Param pif Pointer to an interface structure.
    79    \Returns The interface data structure of the parent interface or NULL if the
    80    interface has no parent.
    81 
    82  */
    83 static PINTERFACE getParentInterface(PINTERFACE pif)
    84 {
    85   if(pif->chrParent==NULL)
    86     return NULL;
    87 
    88   return findInterfaceFromName(pif->chrParent);
    89 }
    9074
    9175static void emitParentHeader(PPARSEINFO pLocalPI, PINTERFACE pif)
     
    145129}
    146130
    147 /*
    148   \param pArray Pointer to the list of parameters.
    149  */
    150 static void emitMethodParams(PPARSEINFO pLocalPI, PINTERFACE pif, GPtrArray *pArray)
    151 {
    152   FILE* fh=pLocalPI->outFile;
    153   int a;
    154 
    155   for(a=0;a<pArray->len;a++)
    156     {
    157       int b;
    158       PMETHODPARAM pm=(PMETHODPARAM)g_ptr_array_index(pArray, a);
    159 
    160       switch(pm->uiDirection)
    161         {
    162         case PARM_DIRECTION_IN:
    163           fprintf(fh, "    const %s", pm->chrType);
    164           break;
    165         case PARM_DIRECTION_OUT:
    166           fprintf(fh, "    %s*", pm->chrType);
    167           break;
    168         case PARM_DIRECTION_INOUT:
    169 
    170           break;
    171         default:
    172           fprintf(fh, "    %s*", pm->chrType);
    173           break;
    174         }
    175       for(b=0;b<pm->uiStar;b++)
    176         fprintf(fh, "*");
    177       fprintf(fh, " %s,\n", pm->chrName);     
    178     }
    179 }
    180 
    181 /*
    182   \param pArray Pointer to the list of parameters.
    183  */
    184 static void emitMethodParamsNoTypes(PPARSEINFO pLocalPI, PINTERFACE pif, GPtrArray *pArray)
    185 {
    186   FILE* fh=pLocalPI->outFile;
    187   int a;
    188 
    189   for(a=0;a<pArray->len;a++)
    190     {
    191       PMETHODPARAM pm=(PMETHODPARAM)g_ptr_array_index(pArray, a);
    192       fprintf(fh, " %s,", pm->chrName);     
    193     }
    194 }
    195131
    196132static void emitNewMethods(PPARSEINFO pLocalPI, PINTERFACE pif)
Note: See TracChangeset for help on using the changeset viewer.