0024911: Avoid using virtual functions in NCollection classes
[occt.git] / src / NCollection / NCollection_DefineVector.hxx
1 // Created on: 2002-04-23
2 // Created by: Alexander GRIGORIEV
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_Vector.hxx by GAWK
17
18
19 #ifndef NCollection_DefineVector_HeaderFile
20 #define NCollection_DefineVector_HeaderFile
21
22 #include <NCollection_Vector.hxx>
23
24 //  Class NCollection_Vector (dynamic array of objects)
25 // This class is similar to NCollection_Array1  though the indices always start
26 // at 0 (in Array1 the first index must be specified)
27 // The Vector is always created with 0 length. It can be enlarged by two means:
28 //   1. Calling the method Append (val) - then "val" is added to the end of the
29 //      vector (the vector length is incremented)
30 //   2. Calling the method SetValue (i, val)  - if "i" is greater than or equal
31 //      to the current length of the vector,  the vector is enlarged to accomo-
32 // The methods Append and SetValue return  a non-const reference  to the copied
33 // object  inside  the vector.  This reference  is guaranteed to be valid until
34 // the vector is destroyed. It can be used to access the vector member directly
35 // or to pass its address to other data structures.
36 // The vector iterator remembers the length of the vector  at the moment of the
37 // creation or initialisation of the iterator.   Therefore the iteration begins
38 // at index 0  and stops at the index equal to (remembered_length-1).  It is OK
39 // to enlarge the vector during the iteration.
40
41 #define DEFINE_VECTOR(_ClassName_, _BaseCollection_, TheItemType)              \
42 typedef NCollection_Vector<TheItemType > _ClassName_;
43
44 #endif