3a45ecdb71295f522f6152e49adb7bc212dc94de
[occt.git] / src / NCollection / NCollection_DefineSList.hxx
1 // Created on: 2002-04-17
2 // Created by: Alexander Kartomin (akm)
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 //            Automatically created from NCollection_SList.hxx by GAWK
17 // Purpose:     An SList is a LISP like list of Items.
18 //              An SList is :
19 //                . Empty.
20 //                . Or it has a Value and a  Tail  which is an other SList. 
21 //              The Tail of an empty list is an empty list.
22 //              SList are  shared.  It  means   that they  can  be
23 //              modified through other lists.
24 //              SList may  be used  as Iterators. They  have Next,
25 //              More, and value methods. To iterate on the content
26 //              of the list S just do.
27 //              SList Iterator;
28 //              for (Iterator = S; Iterator.More(); Iterator.Next())
29 //                X = Iterator.Value();
30 //              Memory usage  is  automatically managed for  SLists
31 //              (using reference counts).
32 // Example:
33 //              If S1 and S2 are SLists :
34 //              if S1.Value() is X.
35 //              And the following is done :
36 //              S2 = S1;
37 //              S2.SetValue(Y);
38 //              S1.Value() becomes also Y.   So SList must be used
39 //              with   care.  Mainly  the SetValue()    method  is
40 //              dangerous. 
41
42
43 #ifndef NCollection_DefineSList_HeaderFile
44 #define NCollection_DefineSList_HeaderFile
45
46 #include <NCollection_DefineBaseCollection.hxx>
47 #include <NCollection_SList.hxx>
48
49 // **************************************** Template for  SList  class ********
50
51 #define DEFINE_SLIST(_ClassName_, _BaseCollection_, TheItemType)               \
52 typedef NCollection_SList<TheItemType > _ClassName_;
53
54 #endif