- Timestamp:
- Jan 7, 2007, 5:25:48 PM (19 years ago)
- Location:
- trunk/nom
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/class_c/nomobj.c
r177 r179 38 38 #include <gtk/gtk.h> 39 39 40 41 40 #include "nom.h" 42 41 #include "nomtk.h" 43 42 44 43 #include "nomobj.ih" 45 46 44 47 45 … … 87 85 } 88 86 87 NOM_Scope PNOMClass NOMLINK impl_NOMObject_nomGetClass(NOMObject* nomSelf, CORBA_Environment *ev) 88 { 89 /* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */ 89 90 91 return nomSelf->mtab->nomClassObject; 92 } 93 94 /* 95 Create a new class of the kind the caller is. This method ensures that subclasses 96 are properly handled without the need to override this class in every subclass. 97 */ 98 NOM_Scope PNOMObject NOMLINK impl_NOMObject_new(NOMObject* nomSelf, CORBA_Environment *ev) 99 { 100 /* NOMObjectData* nomThis=NOMObjectGetData(nomSelf); */ 101 PNOMObject nomRetval; 102 NOMClass* nomCls; 103 104 /* We don't know which class we're actually. So we can't just create a new object using 105 <CkassName>New() here. 106 It is possible that we are called by a subclass. So get the class object and let the 107 class object create the correct class. */ 108 nomCls=NOMObject_nomGetClass(nomSelf, NULLHANDLE); 109 return NOMClass_nomNew(nomCls, NULLHANDLE); 110 } 111 112 113 -
trunk/nom/idl/nombase.idl
r174 r179 64 64 65 65 /* Native types we want to use in the IDL */ 66 native PNOMObject; 67 native PNOMClass; 68 66 69 native gint; 67 70 native gulong; -
trunk/nom/idl/nomcls.idl
r94 r179 37 37 #include "nomobj.idl" 38 38 39 //NOMCLASSNAME(NOMClass); 40 39 41 interface NOMClass:NOMObject 40 42 { -
trunk/nom/idl/nomobj.idl
r120 r179 37 37 #include "nombase.idl" 38 38 39 //NOMCLASSNAME(NOMObject); 40 39 41 interface NOMObject 40 42 { 41 43 42 44 NOMCLASSVERSION(1, 0 ); 43 45 44 45 46 47 46 void nomInit(); 47 void nomUninit(); 48 /* Return the size of the object. That is sizeof(mTab*)+sizeof(all instance vars) */ 49 long nomGetSize(); 48 50 void delete(); 51 PNOMClass nomGetClass(); 52 PNOMObject new(); 49 53 #if 0 50 54 NOMOVERRIDE(wpEchoString); -
trunk/nom/include/nom.h
r174 r179 129 129 130 130 131 #define NOMObject NOMAnyObj 132 #define NOMClass NOMAnyObj 131 #ifndef NOMClass 132 typedef struct NOMClass_struct { 133 struct nomMethodTabStruct *mtab; 134 gulong body[1]; 135 } NOMClassObj; 136 #define NOMClass NOMClassObj 137 typedef NOMClass *PNOMClass; 138 #endif 139 140 #ifndef NOMObject 141 typedef struct NOMObject_struct { 142 struct nomMethodTabStruct *mtab; 143 gulong body[1]; 144 } NOMObjectObj; 145 #define NOMObject NOMObjectObj 146 typedef NOMObject *PNOMObject; 147 #endif 148 149 //#define NOMObject NOMAnyObj 133 150 #define NOMClassMgr NOMAnyObj 134 151
Note:
See TracChangeset
for help on using the changeset viewer.