acccace3 |
1 | // Created by: Peter KURNEV |
2 | // Copyright (c) 1999-2013 OPEN CASCADE SAS |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
acccace3 |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
acccace3 |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
acccace3 |
14 | |
15 | #ifndef BOPCol_NCVector_HeaderFile |
16 | #define BOPCol_NCVector_HeaderFile |
17 | |
18 | #include <Standard.hxx> |
19 | #include <NCollection_Vector.hxx> |
20 | #include <NCollection_BaseAllocator.hxx> |
21 | |
22 | //======================================================================= |
23 | //class : BOPCol_NCVector |
24 | //purpose : |
25 | //======================================================================= |
26 | template <class Type> class BOPCol_NCVector |
27 | : |
28 | public NCollection_Vector<Type> |
29 | { |
30 | public: |
31 | BOPCol_NCVector(const Standard_Integer theIncrement=256, |
857ffd5e |
32 | const Handle(NCollection_BaseAllocator)& theAlloc = NULL) |
ddf2fe8e |
33 | : NCollection_Vector<Type>(theIncrement, theAlloc) |
34 | {} |
acccace3 |
35 | // |
36 | BOPCol_NCVector(const BOPCol_NCVector& theOther) |
ddf2fe8e |
37 | : NCollection_Vector<Type>(theOther) |
38 | {} |
acccace3 |
39 | // |
40 | Type& Append1 () |
41 | { |
ddf2fe8e |
42 | Type& anAppended = *(Type*)this->expandV (this->myLength); |
acccace3 |
43 | return anAppended; |
44 | } |
45 | // |
46 | Standard_Integer Extent() const |
47 | { |
ddf2fe8e |
48 | return this->myLength; |
acccace3 |
49 | } |
acccace3 |
50 | }; |
51 | |
52 | #endif |