0022815: Missing delete operator for placement new
[occt.git] / src / NCollection / NCollection_DefineArray1.hxx
1 // File:        NCollection_DefineArray1.hxx
2 // Created:     15.04.02 17:05:16
3 // Author:      Alexander Kartomin (akm)
4 //              <a-kartomin@opencascade.com>
5 //            Automatically created from NCollection_Array1.hxx by GAWK
6 // Copyright:   Open Cascade 2002
7 //              
8 // Purpose:     The class Array2 represents unidimensional arrays 
9 //              of fixed size known at run time. 
10 //              The range of the index is user defined.
11 //              An array1 can be constructed with a "C array".
12 //              This functionality is useful to call methods expecting
13 //              an Array1. It allows to carry the bounds inside the arrays.
14 //              
15 // Examples:    Item tab[100]; //  An example with a C array
16 //              Array1OfItem ttab (tab[0],1,100);
17 //              
18 //              Array1OfItem tttab (ttab(10),10,20); // a slice of ttab
19 //              
20 //              If you want to reindex an array from 1 to Length do :
21 //              
22 //              Array1 tab1(tab(tab.Lower()),1,tab.Length());
23 //                          
24 // Warning:     Programs client of such a class must be independant
25 //              of the range of the first element. Then, a C++ for
26 //              loop must be written like this
27 //              
28 //              for (i = A.Lower(); i <= A.Upper(); i++)
29 //              
30 // Changes:     In  comparison  to  TCollection  the  flag  isAllocated  was
31 //              renamed into myDeletable (alike in  the Array2).  For naming
32 //              compatibility the method IsAllocated remained in class along
33 //              with IsDeletable.
34 //              
35
36 #ifndef NCollection_DefineArray1_HeaderFile
37 #define NCollection_DefineArray1_HeaderFile
38
39 #include <NCollection_DefineBaseCollection.hxx>
40 #include <NCollection_Array1.hxx>
41
42 // *********************************************** Template for Array1 class
43
44 #define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType)              \
45         typedef NCollection_Array1<TheItemType > _ClassName_;
46
47 #endif