Changeset 251 for trunk/nom/class_c
- Timestamp:
- Mar 11, 2007, 2:22:39 PM (18 years ago)
- Location:
- trunk/nom/class_c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/class_c/nomclassmanager.c
r242 r251 16 16 * The Initial Developer of the Original Code is 17 17 * netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>. 18 * Portions created by the Initial Developer are Copyright (C) 2005-200 618 * Portions created by the Initial Developer are Copyright (C) 2005-2007 19 19 * the Initial Developer. All Rights Reserved. 20 20 * … … 35 35 * And remember, phase 3 is near... 36 36 */ 37 /** \file nomobj.idl 38 39 Implementation file for the NOM class NOMClassMgr. 40 */ 41 37 42 #ifndef NOM_NOMClassMgr_IMPLEMENTATION_FILE 38 43 #define NOM_NOMClassMgr_IMPLEMENTATION_FILE -
trunk/nom/class_c/nomcls.c
r242 r251 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 /** \file noncls.c 35 36 Implementation file for the NOMClass class. 37 */ 34 38 #ifndef NOM_NOMClass_IMPLEMENTATION_FILE 35 39 #define NOM_NOMClass_IMPLEMENTATION_FILE … … 83 87 ncp=(NOMClassPriv*)_ncpObject; 84 88 89 /* Allocate memory big enough to hold an object. This means the size is that of the 90 mtab pointer and all instance variables. */ 85 91 if((nObj=_nomAllocate(nomSelf, ncp->mtab->ulInstanceSize, NULLHANDLE))==NULLHANDLE) 86 92 return NULLHANDLE; … … 149 155 150 156 /** 151 Function which implements the nomGet Name() method of NOMClass.157 Function which implements the nomGetCreatedClassName() method of NOMClass. 152 158 */ 153 NOM_Scope CORBA_string NOMLINK impl_NOMClass_nomGetName(NOMClass* nomSelf, CORBA_Environment *ev) 154 { 155 return nomSelf->mtab->nomClassName; 159 NOM_Scope CORBA_string NOMLINK impl_NOMClass_nomGetCreatedClassName(NOMClass* nomSelf, CORBA_Environment *ev) 160 { 161 NOMClassPriv* ncp; 162 163 /* The private struct characterizing the objects this meta class can create. */ 164 ncp=_nomGetObjectCreateInfo(nomSelf, NULLHANDLE); 165 166 if(!ncp) 167 return ""; /* That can not happen but anyway... */ 168 169 // return nomSelf->mtab->nomClassName; 170 return ncp->mtab->nomClassName; 156 171 } 157 172 … … 212 227 213 228 /* FIXME: no use of version information, yet. */ 214 //nomPrintf("I'm here (%s): ", _nomGetName(nomSelf, NULLHANDLE)); 215 if(!_nomFindClassFromName(NOMClassMgrObject, _nomGetName(nomSelf, NULLHANDLE), 229 230 //The following was used before changing nomGetname() 231 //if(!_nomFindClassFromName(NOMClassMgrObject, _nomGetName(nomSelf, NULLHANDLE), 232 // 0, 0, NULLHANDLE)) 233 if(!_nomFindClassFromName(NOMClassMgrObject, _nomGetClassName(nomSelf, NULLHANDLE), 216 234 0, 0, NULLHANDLE)) 235 217 236 { 218 237 NOMClassPriv* ncPriv; -
trunk/nom/class_c/nomobj.c
r222 r251 16 16 * The Initial Developer of the Original Code is 17 17 * netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>. 18 * Portions created by the Initial Developer are Copyright (C) 2005-200 618 * Portions created by the Initial Developer are Copyright (C) 2005-2007 19 19 * the Initial Developer. All Rights Reserved. 20 20 * … … 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 /** \file nomobj.idl 35 36 Implementation file for the NOM class NOMObject. 37 */ 38 34 39 #ifndef NOM_NOMObject_IMPLEMENTATION_FILE 35 40 #define NOM_NOMObject_IMPLEMENTATION_FILE … … 49 54 50 55 /** 51 52 56 \brief This function implements the method nomInit() of class NOMObject. 53 57 */ 54 58 NOM_Scope void NOMLINK impl_NOMObject_nomInit(NOMObject *nomSelf, CORBA_Environment *ev) 55 59 { 56 //nomPrintf(" Entering %s (%x) with nomSelf: 0x%x. nomSelf is: %s.\n", 57 // __FUNCTION__, impl_NOMObject_nomInit, nomSelf , nomSelf->mtab->nomClassName); 58 } 59 60 /** 61 60 61 } 62 63 /** 62 64 \brief This function implements the method nomUnInit() of class NOMObject. 63 65 */ … … 71 73 72 74 /** 73 74 75 \brief This function implements the method nomGetSize() of class NOMObject. 75 76 */ … … 87 88 88 89 /** 89 90 90 \brief This function implements the method delete() of class NOMObject. 91 91 … … 121 121 122 122 /** 123 124 123 \brief This function implements the method nomGetClass() of class NOMObject. 125 124 It returns a pointer to the class object of this object. … … 162 161 163 162 163 NOM_Scope CORBA_boolean NOMLINK impl_NOMObject_nomIsA(NOMObject* nomSelf, const PNOMClass nomClass, CORBA_Environment *ev) 164 { 165 /* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */ 166 NOMClassPriv* ncp; 167 nomMethodTabs mtabs; /* List of mtabs */ 168 169 if(!nomIsObj(nomClass)){ 170 g_warning("%s: class object pointer nomClass does not point to an object.", __FUNCTION__); 171 return FALSE; 172 } 173 174 /* Check if we have the class in our list of classes */ 175 ncp=(NOMClassPriv*)nomSelf->mtab->nomClsInfo; 176 mtabs=&ncp->mtabList; 177 while(mtabs) 178 { 179 if(nomClass==mtabs->mtab->nomClassObject) 180 return TRUE; 181 182 mtabs=mtabs->next; 183 } 184 return FALSE; 185 } 186 187 188 NOM_Scope CORBA_boolean NOMLINK impl_NOMObject_nomIsInstanceOf(NOMObject* nomSelf, const PNOMClass nomClass, CORBA_Environment *ev) 189 { 190 /* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */ 191 192 if(!nomIsObj(nomClass)){ 193 g_warning("%s: class object pointer nomClass does not point to an object.", __FUNCTION__); 194 return FALSE; 195 } 196 197 if(nomClass==_nomGetClass(nomSelf, NULLHANDLE)) 198 return TRUE; 199 200 return FALSE; 201 } 202 203 /** 204 Function which implements the nomGetClassName() method of NOMObject. 205 */ 206 NOM_Scope CORBA_string NOMLINK impl_NOMObject_nomGetClassName(NOMObject* nomSelf, CORBA_Environment *ev) 207 { 208 /* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */ 209 return nomSelf->mtab->nomClassName; 210 }
Note:
See TracChangeset
for help on using the changeset viewer.