7d19c440a30a37cfd0f8c7213aa899058967748f
[occt.git] / src / NCollection / NCollection_DefineBaseCollection.hxx
1 // Created on: 2002-04-09
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 // Purpose:     NCollection_BaseCollection  is the base  abstract  class for 
17 //              all collection templates of this package.
18 //              The set  of collections is similar  to that  of TCollection.
19 //              Also  the methods of classes  have mostly the same names for
20 //              easy switch from TCollection <-> NCollection containers.
21 //              NCollection is a nocdlpack, thus it is compiled without WOK.
22 //              BaseCollection allows assigning the collections of different
23 //              kinds  (the  items  type  being the same) with a few obvious
24 //              exclusions - one can not  assign any  collection to  the map 
25 //              having double data (two keys or a key  plus value). Only the 
26 //              maps of the very same type may be assigned through operator=
27 //              Said maps are: DoubleMap,
28 //                             DataMap,
29 //                             IndexedDataMap
30 //              For the  users  needing  control  over the memory  usage the
31 //              allocators were added (see NCollection_BaseAllocator header)
32 //              Others may forget it -  BaseAllocator is used by default and
33 //              then memory is managed through Standard::Allocate/::Free.
34
35 #ifndef NCollection_DefineBaseCollection_HeaderFile
36 #define NCollection_DefineBaseCollection_HeaderFile
37
38 #include <NCollection_BaseCollection.hxx>
39
40 // *************************************** Template for BaseCollection class
41
42 #define DEFINE_BASECOLLECTION(_ClassName_, TheItemType)                        \
43 typedef NCollection_BaseCollection<TheItemType > _ClassName_;
44
45 #endif