source: trunk/nom/idl/nomobj.idl@ 242

Last change on this file since 242 was 219, checked in by cinc, 19 years ago

Added doxygen tags. Some minor changes to NOMClass.

File size: 4.1 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2* Version: CDDL 1.0/LGPL 2.1
3*
4* The contents of this file are subject to the COMMON DEVELOPMENT AND
5* DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
6* this file except in compliance with the License. You may obtain a copy of
7* the License at http://www.sun.com/cddl/
8*
9* Software distributed under the License is distributed on an "AS IS" basis,
10* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11* for the specific language governing rights and limitations under the
12* License.
13*
14* The Original Code is "NOM" Netlabs Object Model
15*
16* The Initial Developer of the Original Code is
17* netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>.
18* Portions created by the Initial Developer are Copyright (C) 2005-2006
19* the Initial Developer. All Rights Reserved.
20*
21* Contributor(s):
22*
23* Alternatively, the contents of this file may be used under the terms of
24* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
25* case the provisions of the LGPL are applicable instead of those above. If
26* you wish to allow use of your version of this file only under the terms of
27* the LGPL, and not to allow others to use your version of this file under
28* the terms of the CDDL, indicate your decision by deleting the provisions
29* above and replace them with the notice and other provisions required by the
30* LGPL. If you do not delete the provisions above, a recipient may use your
31* version of this file under the terms of any one of the CDDL or the LGPL.
32*
33* ***** END LICENSE BLOCK ***** */
34#ifndef NOMOBJ_IDL_INCLUDED
35#define NOMOBJ_IDL_INCLUDED
36
37#include "nombase.idl"
38
39//NOMCLASSNAME(NOMObject);
40
41interface NOMObject
42{
43
44 NOMCLASSVERSION(1, 0 );
45
46 /**
47 This method is intended to be overriden by classes which need some initialization.
48
49 \par How to override
50 The parent class must always be called first when overriden.
51
52 \sa impl_NOMObject_nomInit()
53 */
54 void nomInit();
55
56 /**
57 This method is intended to be overriden by classes which need some uninitialization.
58 Note that when overriding the method the garbage collector will add the object
59 to the list of objects with a finalizer. The finalizer will be run when the object is
60 collected and calls nomUnInit() to give the object a chance for cleanup.
61
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.
64
65 \par How to override
66 The parent method must be called after doing the own processing.
67
68 \sa impl_NOMObject_nomUnInit()
69 */
70 void nomUnInit();
71
72 /**
73 Return the size of the object. That is sizeof(mTab*)+sizeof(all instance vars)
74
75 \par How to override
76 This method is usually not overriden.
77
78 \sa impl_NOMObject_nomGetSize()
79 */
80 long nomGetSize();
81
82 /**
83 This method calls nomUnInit() to give the object a chance of freeing system resources.
84 Afterwards the memory occupied by the object is given back to the system and the
85 object is not accessible anymore.
86
87 \sa impl_NOMObject_delete()
88 */
89 void delete();
90
91 /**
92 This method returns a pointer to the class object of this object.
93
94 \par How to override
95 This method is usually not overriden.
96
97 \return Pointer to the class object
98
99 \sa impl_NOMObject_nomGetClass()
100 */
101 PNOMClass nomGetClass();
102
103 /**
104 Create a new class of the kind the caller is. This method ensures that subclasses
105 are properly handled without the need to override this method in every subclass.
106
107 This method will get the class object of nomSelf and call nomNew() on it creating
108 a new object which has exactly the same class hierarchy of nomSelf.
109
110 \par How to override
111 This method is usually not overriden.
112
113 \return Pointer to a new object of the same kind as nomSelf. Note that this won't
114 create an exact copy but a completely new objecct.
115
116 \sa impl_NOMObject_new()
117 */
118 PNOMObject new();
119};
120
121#endif /* NOMOBJ_IDL_INCLUDED */
Note: See TracBrowser for help on using the repository browser.