- Timestamp:
- Feb 4, 2007, 10:26:27 AM (19 years ago)
- Location:
- trunk/nom
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/class_c/nomclassmanager.c
r221 r222 89 89 mtab=g_datalist_get_data(&_gdataClassList, className); 90 90 91 nomPrintf("-----> %s %s %x\n", __FUNCTION__, className, mtab);91 //nomPrintf("-----> %s %s %x\n", __FUNCTION__, className, mtab); 92 92 93 93 if(mtab){ … … 225 225 } 226 226 227 /** 228 \brief Function which implements the nomSubstituteClass() method of NOMClassMgr. 229 */ 230 NOM_Scope CORBA_boolean NOMLINK impl_NOMClassMgr_nomSubstituteClass(NOMClassMgr* nomSelf, 231 const CORBA_char * oldClass, 232 const CORBA_char * replacementClass, 233 CORBA_Environment *ev) 234 { 235 /* NOMClassMgrData* nomThis=NOMClassMgrGetData(nomSelf); */ 236 NOMObject* oClass; 237 NOMObject* rClass; 238 239 if((oClass=_nomFindClassFromName( nomSelf, oldClass, 0, 0, NULLHANDLE))==NULLHANDLE) 240 return FALSE; 241 242 if((rClass=_nomFindClassFromName( nomSelf, replacementClass, 0, 0, NULLHANDLE))==NULLHANDLE) 243 return FALSE; 244 245 /* Save old class object pointer. Hmm, maybe not it's still in the old parentMtab */ 246 247 /* Change the class object pointer in the nomClassDataStructure */ 248 249 /* Reregister old class with new mtab in the internal list. Make sure we don't get 250 a warning by GLib */ 251 252 return FALSE; 253 } 254 227 255 static 228 256 int nomClassMgrCompareFunc(gconstpointer a, gconstpointer b) -
trunk/nom/class_c/nomobj.c
r219 r222 45 45 46 46 #include "nomobj.ih" 47 48 #include "gc.h" 47 49 48 50 /** … … 95 97 { 96 98 /* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */ 99 GC_PTR oldData; 100 GC_finalization_proc oldFinalizerFunc; 101 NOMClassPriv *ncp; 102 103 /* Unregister finalizer if the class uses nomUnInit. This is done so nomUnInit isn't 104 called again when the memory is eventually collected by the GC. */ 105 ncp=(NOMClassPriv*)nomSelf->mtab->nomClsInfo; 106 if(ncp->ulClassFlags & NOM_FLG_NOMUNINIT_OVERRIDEN){ 107 /* A NULL finalizer function removes the finalizer */ 108 GC_register_finalizer(nomSelf, NULL, NULL, &oldFinalizerFunc, &oldData); 109 } 97 110 98 111 /* Give object the chance to free resources */ -
trunk/nom/idl/nomclassmanager.idl
r220 r222 153 153 154 154 /** 155 This method substitutes \e oldClass with \e replacementClass. This means that after 156 replacing whenever class \e oldClass is requested \e replacementClass is returned. 157 \e oldClassNew() will create \e replacementClass objects etc. 158 159 The class \e replacementClass must be a direct subclass of \e oldClass. 160 161 \remark Both classes must already be registered with the class manager when calling this 162 method. 163 164 \par How to override 165 This method is usually not overriden. 166 167 \param oldClass The class to be replaced 168 \param replacementClass The class which will be used instead of \e oldClass 169 \return TRUE if replacement succeeded. 170 171 */ 172 boolean nomSubstituteClass(in string oldClass, in string replacementClass); 173 174 /** 155 175 Override of nomInit(). The list of methods and the list of classes are initialized 156 176 in that method. In addition the balanced binary tree for registering mtabs is created. … … 164 184 165 185 /** 166 The list of registered methods. 186 The list of registered methods. The method nomGetClassList() can be used to get it. 187 If doing so be aware that it's the real thing no copy. 167 188 */ 168 NOMINSTANCEVAR(PGData gdataMethodList); 169 /** 170 Balanced binary tree holding the mtabs of all known classes. 189 NOMINSTANCEVAR(PGData gdataMethodList); 190 191 /** 192 Balanced binary tree holding the mtabs of all known classes. You can't access 193 this from the outside. It's entirely private to NOMClassMgr. 171 194 */ 172 195 NOMINSTANCEVAR(PGTree pClassListTree);
Note:
See TracChangeset
for help on using the changeset viewer.