- Timestamp:
- Mar 11, 2007, 11:43:15 AM (19 years ago)
- Location:
- trunk/nom
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nom/idl/nomclassmanager.idl
r239 r250 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 nomclassmanager.idl 35 36 Class definition file for the NOM class NOMClassMgr 37 */ 34 38 35 39 #ifndef nomcm_idl … … 38 42 #include <nomobj.idl> 39 43 40 44 /** \interface NOMClassMgr 45 46 The NOMClassMgr class provides methods for managing the whole 47 object system. One single instance is created and a pointer is to it is 48 put into the global variable \i NOMClassMgrObject. 49 50 */ 41 51 interface NOMClassMgr : NOMObject 42 52 { … … 97 107 checking the memories mtab pointer against the registered list of mtabs. 98 108 99 \remark Classes are registered usually from within nomClassReady().109 \remarks Classes are registered usually from within nomClassReady(). 100 110 101 111 \par How to override … … 109 119 Get the internal list of classes. 110 120 111 \par How to override 121 \remarks This method is only for NOM kernel implemeters. You can gather all 122 information of this list by using provided methods. 123 124 \par How to override: 112 125 This method is usually not overriden. 113 126 … … 119 132 120 133 /** 121 122 \par How to override 134 This method returns a pointer to a class specific private structure holding additional 135 information. The structure is only used by the NOM kernel. 136 137 \remarks This method is only for NOM kernel implemeters. 138 139 \par How to override: 123 140 This method is usually not overriden. 124 141 … … 143 160 list of mtabs. 144 161 145 \par How to override 162 \remarks You probably want to use the function nomIsObj() instead which subsequently 163 calls this method. 164 165 \par How to override: 146 166 This method is usually not overriden. 147 167 148 168 \param nomObject The object to be checked. 149 \return 150 True if the given object is a NOMObject.169 170 \returns True if the given object is a NOMObject. 151 171 */ 152 172 boolean nomIsObject(in PNOMObject nomObject); … … 162 182 method. 163 183 164 \par How to override 184 \par How to override: 165 185 This method is usually not overriden. 166 186 167 187 \param oldClass The class to be replaced 168 188 \param replacementClass The class which will be used instead of \e oldClass 169 \return TRUE if replacement succeeded. 189 \returns TRUE if replacement succeeded. 190 191 \warning 192 This method is not implemented yet. 170 193 171 194 */ … … 177 200 178 201 \remark The returned path is in the system encoding. 202 203 \warning 204 This method is not implemented yet. 179 205 */ 180 206 string nomQueryDLLForClass(in string chrClassName); -
trunk/nom/idl/nomcls.idl
r219 r250 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 /** \file nomcls.idl 35 36 Class definition file for NOM class NOMClass the root metaclass. 37 */ 34 38 #ifndef NOMCLS_IDL_INCLUDED 35 39 #define NOMCLS_IDL_INCLUDED … … 39 43 //NOMCLASSNAME(NOMClass); 40 44 45 /** \interface NOMClass 46 47 This is the root class for metaclasses. 48 49 */ 41 50 interface NOMClass:NOMObject 42 51 { … … 58 67 This method returns the name of the class this class object is an instance of. 59 68 60 \par How to override 69 \par How to override: 61 70 This method is usually not overriden. 62 71 … … 73 82 and then calls nomInit() on the newly created object. 74 83 75 \par How to override 84 \par How to override: 76 85 This method is usually not overriden. 77 86 … … 110 119 memory is zeroed similar to using NOMCalloc(). 111 120 112 \par How to override 121 \par How to override: 113 122 This method is usually not overriden. 114 123 … … 132 141 /** 133 142 This method is called after the class object is built. It registers the new 134 class with the NOMClassM agrObj.143 class with the NOMClassMgrObj. 135 144 In addition to registering the class object the class this metaclass can create will 136 145 also be registered. -
trunk/nom/idl/nomobj.idl
r219 r250 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 Class definition file for the NOM class NOMObject. 37 */ 38 34 39 #ifndef NOMOBJ_IDL_INCLUDED 35 40 #define NOMOBJ_IDL_INCLUDED … … 39 44 //NOMCLASSNAME(NOMObject); 40 45 46 /** \interface NOMObject 47 48 This is the root class of NOM. It provides methods common to all objects. 49 50 \remarks NOMObject can't be replaced. 51 52 */ 41 53 interface NOMObject 42 54 { … … 47 59 This method is intended to be overriden by classes which need some initialization. 48 60 49 \par How to override 61 \remarks This method is called by the system during object creation. Don't call it 62 from your code or unexpected things may happen. 63 64 \par How to override: 50 65 The parent class must always be called first when overriden. 51 66 52 \sa impl_NOMObject_nomInit() 67 \sa impl_NOMObject_nomInit(), nomUnInit() 53 68 */ 54 69 void nomInit(); … … 60 75 collected and calls nomUnInit() to give the object a chance for cleanup. 61 76 62 \note It's not necessary to free memory in nomUnInit(). This is the job of the garbage collector. 63 Only system resources like file handles etc. must be explicitely freed. 77 \remarks It's not necessary to free memory in nomUnInit(). This is the job of the garbage collector. 78 Only system resources like file handles etc. must be explicitely freed. 79 This method is called by the system during object deletion. Don't call it 80 from your code or unexpected things may happen. 64 81 65 \par How to override 82 \par How to override: 66 83 The parent method must be called after doing the own processing. 67 84 68 \sa impl_NOMObject_nomUnInit() 85 \sa impl_NOMObject_nomUnInit(), nomInit(); 69 86 */ 70 87 void nomUnInit(); … … 73 90 Return the size of the object. That is sizeof(mTab*)+sizeof(all instance vars) 74 91 75 \par How to override 92 \par How to override: 76 93 This method is usually not overriden. 77 94 … … 81 98 82 99 /** 83 This method calls nomUnInit() to give the object a chance of freeing system resources. 100 Delete an object. This method is useful if you have to control the point in time when 101 an object is actually destroyed. Normally the garbage collector destroys any object when 102 no longer in use but there is no way to control when this happens. 103 104 \remarks This method calls nomUnInit() to give the object a chance of freeing system resources. 84 105 Afterwards the memory occupied by the object is given back to the system and the 85 106 object is not accessible anymore. 86 107 87 \sa impl_NOMObject_delete() 108 \par HowTo override: 109 This method is usually not overriden. If you need some own processing during object 110 destruction override nomUnInit(). 111 112 \sa impl_NOMObject_delete(), nomUnInit() 88 113 */ 89 114 void delete(); … … 92 117 This method returns a pointer to the class object of this object. 93 118 94 \par How to override 119 \par How to override: 95 120 This method is usually not overriden. 96 121 … … 105 130 are properly handled without the need to override this method in every subclass. 106 131 132 When deriving from classes new methods are added to a class but the already present ones are 133 usually not changed. If one of these classes creates a new object of the class itself 134 is an instance of unexpected things may happen. Consider the 135 following class hierarchy: 136 137 \code 138 NOMObject->NOMString->NOMPath 139 \endcode 140 141 When a method introduced by \e NOMString tries to create a new \e NOMString object it may 142 use the \e NOMStringNew() macro to do so. Problems arise if the method is called from 143 within a \e NOMPath object. The caller probably doesn't want a \e NOMString but rather 144 a \e NOMPath object. So instead of having to override the method using the creation macro 145 which may mean to recreate the whole method implementation the macro should be replaced 146 by a call to new(). 147 107 148 This method will get the class object of nomSelf and call nomNew() on it creating 108 149 a new object which has exactly the same class hierarchy of nomSelf. 109 150 110 \par How to override 151 \remarks Because a new object is created the whole object creation sequence will take 152 place which means a call to nomInit() will be made by the system. 153 154 \par How to override: 111 155 This method is usually not overriden. 112 156 -
trunk/nom/include/nomapi.h
r210 r250 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 * … … 73 73 } nomClassDataStructure, *NomClassDataStructurePtr; 74 74 75 typedef struct nomParmInfoStruct { 76 gulong ulNumParms; /* The number of parameters for this method */ 77 gchar* pReturnType; 78 gchar* pParm[]; /* Parameter types */ 79 }nomParmInfo; 80 81 /** 82 This structure defines the method introduced by a class. The IDL compiler 83 puts an array of such structs into the *.ih file which is used by the NOM 84 kernel to build the class. 85 */ 75 86 typedef struct nomStaticMethodDescStruct { 76 nomMToken *nomMAddressInClassData; 77 nomID nomMethodId; 78 char** chrMethodDescriptor; 79 nomMethodProc *nomMethod; 87 nomMToken *nomMAddressInClassData; /* Method token in class data struct */ 88 nomID nomMethodId; /* This is a 'gchar**' pointing to something like 89 "wpQueryContainerHandle" */ 90 char** chrMethodDescriptor; /* This points to something like: 91 "WPFolderWindow:wpQueryContainerHandle" */ 92 nomMethodProc *nomMethod; /* Address of the function implementing this 93 method. */ 94 nomParmInfo *pParamInfo; /* Information about the parameter types */ 80 95 } nomStaticMethodDesc; 81 96 97 /** 98 Structure describing an overriden method. An array of these structures 99 is put into the *.ih file. 100 */ 82 101 typedef struct nomOverridenMethodDescStruct { 83 102 nomID nomMethodId;
Note:
See TracChangeset
for help on using the changeset viewer.