Changeset 250 for trunk/nom/idl/nomobj.idl
- Timestamp:
- Mar 11, 2007, 11:43:15 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.