Ignore:
Timestamp:
Jun 7, 2008, 10:41:05 AM (17 years ago)
Author:
cinc
Message:

Started implementing method query methods. Renamed nomGetClass() to nomQueryClass().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nom/class_c/nomobj.c

    r326 r353  
    5454#include "nomobj.ih"
    5555
     56#include "nomstring.h"
     57#include "nommethod.h"
    5658#include "gc.h"
    5759
     
    124126
    125127/**
    126     \brief This function implements the method nomGetClass() of class NOMObject.
     128    \brief This function implements the method nomQueryClass() of class NOMObject.
    127129    It returns a pointer to the class object of this object.
    128130
     
    131133    \retval PNOMClass A pointer to the class object for this object. This can never be NULL.
    132134 */
    133 NOM_Scope PNOMClass NOMLINK impl_NOMObject_nomGetClass(NOMObject* nomSelf, CORBA_Environment *ev)
     135NOM_Scope PNOMClass NOMLINK impl_NOMObject_nomQueryClass(NOMObject* nomSelf, CORBA_Environment *ev)
    134136{
    135137/* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */
     
    158160     It is possible that we are called by a subclass. So get the class object and let the
    159161     class object create the correct class. */
    160   nomCls=NOMObject_nomGetClass(nomSelf, NULL);
     162  nomCls=NOMObject_nomQueryClass(nomSelf, NULL);
    161163  return NOMClass_nomNew(nomCls, NULL);
    162164}
     
    206208  }
    207209 
    208   if(nomClass==_nomGetClass(nomSelf, NULL))
     210  if(nomClass==_nomQueryClass(nomSelf, NULL))
    209211    return TRUE;
    210212 
     
    220222  return nomSelf->mtab->nomClassName;
    221223}
     224
     225
     226NOMDLLEXPORT NOM_Scope void NOMLINK impl_NOMObject_nomGetMethodList(NOMObject* nomSelf,
     227                                                                    const CORBA_boolean bIncludingParents,
     228                                                                    CORBA_Environment *ev)
     229{
     230  NOMClassPriv* ncPriv;
     231 
     232  /* NOMObjectData* nomThis = NOMObjectGetData(nomSelf); */
     233
     234  g_message("In %s (%d): %s", __FUNCTION__, __LINE__, _nomGetClassName(_nomQueryClass(nomSelf, NULL), NULL));
     235 
     236  ncPriv=(NOMClassPriv*)_nomGetObjectCreateInfo(_nomQueryClass(nomSelf, NULL), NULL);
     237 
     238  if(ncPriv){
     239    gulong a, ulNumIntroducedMethods;
     240
     241    ulNumIntroducedMethods=ncPriv->sci->ulNumStaticMethods;
     242    for(a=0;a< ulNumIntroducedMethods;a++)
     243    {
     244      NOMMethod* nMethod=NOMMethodNew();
     245      NOMString* ns;
     246     
     247      _initData(nMethod, (gpointer) &ncPriv->sci->nomSMethods[a], NULL);
     248      g_message("In %s (%d): %s %X", __FUNCTION__, __LINE__, *ncPriv->sci->nomSMethods[a].nomMethodId, nMethod /*chrMethodDescriptor*/);
     249
     250      g_message("  In %s (%d): %s\n", __FUNCTION__, __LINE__, _nomGetClassName(_getName(nMethod, NULL), NULL));
     251     
     252     
     253      //g_message("    In %s (%d): %X NOMString: %x", __FUNCTION__, __LINE__, nMethod, _getName(nMethod, NULL));
     254     
     255      g_message("    In %s (%d): NOMMethod: %x %s 3\n", __FUNCTION__, __LINE__, nMethod, _queryString(_getName(nMethod, NULL), NULL));
     256     
     257    }
     258    //nomPrintf("     %s %s \n", nomSelf->mtab->nomClassName, ncPriv->mtab->nomClassName);
     259  }
     260 
     261  //nomPrintf("In %s: metaclass: %s, class: %s\n", __FUNCTION__, _nomGetClassName(_nomQueryClass(nomSelf, NULL), NULL),
     262    //        _nomGetClassName(nomSelf, NULL));
     263
     264}
     265
Note: See TracChangeset for help on using the changeset viewer.