0022815: Missing delete operator for placement new
[occt.git] / src / NCollection / NCollection_DefineSList.hxx
1 // File:        NCollection_DefineSList.hxx
2 // Created:     17.04.02 10:12:48
3 // Author:      Alexander Kartomin (akm)
4 //            Automatically created from NCollection_SList.hxx by GAWK
5 // Copyright:   Open Cascade 2002
6 //           
7 // Purpose:     An SList is a LISP like list of Items.
8 //              An SList is :
9 //                . Empty.
10 //                . Or it has a Value and a  Tail  which is an other SList. 
11 //              
12 //              The Tail of an empty list is an empty list.
13 //              SList are  shared.  It  means   that they  can  be
14 //              modified through other lists.
15 //              SList may  be used  as Iterators. They  have Next,
16 //              More, and value methods. To iterate on the content
17 //              of the list S just do.
18 //              
19 //              SList Iterator;
20 //              for (Iterator = S; Iterator.More(); Iterator.Next())
21 //                X = Iterator.Value();
22 //            
23 //              Memory usage  is  automatically managed for  SLists
24 //              (using reference counts).
25 //             
26 // Example:
27 //              If S1 and S2 are SLists :
28 //              if S1.Value() is X.
29 //              
30 //              And the following is done :
31 //              S2 = S1;
32 //              S2.SetValue(Y);
33 //            
34 //              S1.Value() becomes also Y.   So SList must be used
35 //              with   care.  Mainly  the SetValue()    method  is
36 //              dangerous. 
37 //              
38
39
40 #ifndef NCollection_DefineSList_HeaderFile
41 #define NCollection_DefineSList_HeaderFile
42
43 #include <NCollection_DefineBaseCollection.hxx>
44 #include <NCollection_SList.hxx>
45
46 // **************************************** Template for  SList  class ********
47
48 #define DEFINE_SLIST(_ClassName_, _BaseCollection_, TheItemType)               \
49         typedef NCollection_SList<TheItemType > _ClassName_;
50
51 #endif