Changeset 294
- Timestamp:
- Apr 7, 2007, 4:29:56 PM (18 years ago)
- Location:
- trunk/nom
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/Makefile
r284 r294 93 93 #BASE_NOMCOMPILEH = $(IDLCOMP) --showcpperrors --header --output-dir=$(CLASSINC) $< 94 94 #BASE_NOMCOMPILEIH = $(IDLCOMP) --showcpperrors --ihfile --output-dir=$(CLASSINC) $< 95 BASE_NOMCOMPILEC = $(IDLCOMP) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $<95 #BASE_NOMCOMPILEC = $(IDLCOMP) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $< 96 96 97 97 BASE_NOMCOMPILEH = gcc -E -x c -D__NOM_IDL_COMPILER__ $(NOMIDLINC) $< | $(NOMIDLCOMPILER) --emit-h -d $(CLASSINC) - 98 98 BASE_NOMCOMPILEIH = gcc -E -x c -D__NOM_IDL_COMPILER__ $(NOMIDLINC) $< | $(NOMIDLCOMPILER) --emit-ih -d $(CLASSINC) - 99 BASE_NOMCOMPILEC = gcc -E -x c -D__NOM_IDL_COMPILER__ $(NOMIDLINC) $< | $(NOMIDLCOMPILER) --emit-c -d $(CLASSTEMPLATEDIR) - 99 100 100 101 -
trunk/nom/class_c/nomclassmanager.c
r255 r294 62 62 \remark This method isn't implemented yet. 63 63 */ 64 NOM_Scope PNOMObjectNOMLINK impl_NOMClassMgr_nomFindClassFromId(NOMClassMgr* nomSelf,65 66 67 68 64 NOM_Scope NOMClass* NOMLINK impl_NOMClassMgr_nomFindClassFromId(NOMClassMgr* nomSelf, 65 const CORBA_long classId, 66 const CORBA_long ulMajorVersion, 67 const CORBA_long ulMinorVersion, 68 CORBA_Environment *ev) 69 69 { 70 70 /* NOMClassMgrData *nomThis = NOMClassMgrGetData(nomSelf); */ … … 79 79 \brief Function which implements the nomFindClassFromName() method of NOMClassMgr. 80 80 */ 81 NOM_Scope PNOMObjectNOMLINK impl_NOMClassMgr_nomFindClassFromName(NOMClassMgr* nomSelf,82 83 84 85 81 NOM_Scope NOMClass* NOMLINK impl_NOMClassMgr_nomFindClassFromName(NOMClassMgr* nomSelf, 82 const CORBA_char * className, 83 const CORBA_long ulMajorVersion, 84 const CORBA_long ulMinorVersion, 85 CORBA_Environment *ev) 86 86 { 87 87 CORBA_Object nomRetval=NULLHANDLE; … … 95 95 mtab=g_datalist_get_data(&_gdataClassList, className); 96 96 97 //nomPrintf("-----> %s %s %x\n", __FUNCTION__, className, mtab);98 99 97 if(mtab){ 100 98 NOMClassPriv* ncPriv; 101 99 ncPriv=(NOMClassPriv*)mtab->nomClsInfo; 102 //if(1==ncPriv->ulIsMetaClass){103 // nomPrintf("%s: found %s\n", __FUNCTION__, mtab->nomClassName);104 100 nomRetval=(CORBA_Object)ncPriv->sci->nomCds->nomClassObject; 105 //}106 107 101 } 108 102 return nomRetval; … … 142 136 g_tree_insert(_pClassListTree, mtab, mtab->nomClassName); /* key is the mtab because we want to use 143 137 this tree for fast lookup of mtabs to 144 check for objects. */145 146 // g_datalist_set_data_full(&_gdataClassList, mtab->nomClassName, classMtab, priv_handleClassRemove);147 // nomPrintf("%s: registering %lx, %s classList: %lx\n", __FUNCTION__,148 //classMtab, mtab->nomClassName, _gdataClassList);138 check for valid objects. */ 139 140 //nomPrintf("%s: registering %lx, %s classList: %lx ID: %ld\n", __FUNCTION__, 141 // classMtab, mtab->nomClassName, _gdataClassList, g_quark_try_string(mtab->nomClassName)); 142 mtab->classNomId=g_quark_try_string(mtab->nomClassName); 149 143 } 150 144 … … 156 150 { 157 151 NOMClassMgrData *nomThis = NOMClassMgrGetData(nomSelf); 158 nomPrintf(" Entering %s with nomSelf: 0x%x. nomSelf is: %s.\n",159 __FUNCTION__, nomSelf, nomSelf->mtab->nomClassName);160 152 161 153 return _gdataClassList; … … 212 204 213 205 g_datalist_set_data_full(&_gdataMethodList, chrMethodName, classMtab, priv_handleMethodRemoveFromList); 214 //g_datalist_set_data_full(&_gdataClassList, mtab->nomClassName, classMtab, priv_handleClassRemove);215 // nomPrintf("%s: registering %lx, %s methodList: %lx\n", __FUNCTION__, classMtab, chrMethodName, _gdataMethodList);216 217 206 } 218 207 … … 240 229 { 241 230 /* NOMClassMgrData* nomThis=NOMClassMgrGetData(nomSelf); */ 242 NOMObject* oClass; 243 NOMObject* rClass; 244 231 NOMClass* oClass; 232 NOMClass* rClass; 233 NOMClassPriv* ncp; 234 235 /* This returns a meta class */ 245 236 if((oClass=_nomFindClassFromName( nomSelf, oldClass, 0, 0, NULLHANDLE))==NULLHANDLE) 246 237 return FALSE; … … 250 241 251 242 /* Check if the class is a direct child */ 243 ncp=(NOMClassPriv*)_nomGetObjectCreateInfo(rClass, NULLHANDLE); 244 245 if(strcmp(ncp->parentMtabStruct.next->mtab->nomClassName, oldClass)) 246 return FALSE; 252 247 253 248 /* Save old class object pointer. Hmm, maybe not it's still in the old parentMtab */ -
trunk/nom/class_c/nomcls.c
r255 r294 191 191 { 192 192 NOMClassData* nomThis=NOMClassGetData(nomSelf); 193 194 //nomPrintf(" Entering %s with nomSelf: 0x%x. nomSelf is: %s.\n",195 // __FUNCTION__, nomSelf, nomSelf->mtab->nomClassName);196 193 197 194 _ncpObject=ncpObject; -
trunk/nom/idl/nomclassmanager.idl
r281 r294 49 49 50 50 */ 51 52 interface NOMClass; 53 51 54 interface NOMClassMgr : NOMObject 52 55 { … … 57 60 58 61 /** 59 Find the class with the given nomId in the internal class list managed by the62 Find the class object for the class with the given nomId in the internal class list managed by the 60 63 class manager. 61 64 … … 69 72 \param ulMinorVersion This parameter is not used at the moment and should be set to 0. 70 73 \return 71 The class with the given name or NULL if not found.72 */ 73 PNOMObjectnomFindClassFromId(in long classId,74 The class object for the class with the given name or NULL if not found. 75 */ 76 NOMClass* nomFindClassFromId(in long classId, 74 77 in long ulMajorVersion, 75 78 in long ulMinorVersion); 76 79 77 80 /** 78 Find the class with the given name in the internal class list managed by the81 Find the class object for the class with the given name in the internal class list managed by the 79 82 class manager. 80 83 81 84 \remark 82 This method will return classes and metaclasses.85 This method will return the metaclasses for the given class name. 83 86 84 87 \par How to override 85 88 This method is usually not overriden. 86 89 87 \param className The name of the class to be foundas a C string.90 \param className The name of the class as a C string. 88 91 \param ulMajorVersion This parameter is not used at the moment and should be set to 0. 89 92 \param ulMinorVersion This parameter is not used at the moment and should be set to 0. 90 93 \return 91 The class with the given name or NULL if not found.92 */ 93 PNOMObjectnomFindClassFromName(in string className,94 The class object for the class with the given name or NULL if not found. 95 */ 96 NOMClass* nomFindClassFromName(in string className, 94 97 in long ulMajorVersion, 95 98 in long ulNinorVersion); -
trunk/nom/idl/nomcls.idl
r281 r294 145 145 146 146 /** 147 Query the structure holding all the info needed for creating new objects. 148 147 149 \remarks 150 You should know what you're doing if you want to use the structure returned by this method... 148 151 The return type may change. 149 152 */ … … 169 172 The type of this variable will change! 170 173 */ 171 NOMINSTANCEVAR( stringncpObject); //NOMClassPriv structure holding info about the object this class can create174 NOMINSTANCEVAR(gpointer ncpObject); //NOMClassPriv structure holding info about the object this class can create 172 175 NOMOVERRIDE(nomInit); 173 176 -
trunk/nom/include/nomapi.h
r255 r294 53 53 gulong ulInstanceSize; /* Size of an instance of this class */ 54 54 gulong mtabSize; /* Size of this mtab (includes method ptrs.) */ 55 nomId classNomId; /* The unique ID of this class */ 55 56 nomMethodProc* entries[1]; 56 57 } nomMethodTab, *nomMethodTabPtr;
Note:
See TracChangeset
for help on using the changeset viewer.