Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:20

0001 // Created on: 2002-04-23
0002 // Created by: Alexander GRIGORIEV
0003 // Copyright (c) 2002-2013 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef NCollection_Vector_HeaderFile
0017 #define NCollection_Vector_HeaderFile
0018 
0019 #include <NCollection_DynamicArray.hxx>
0020 
0021 //! Class NCollection_Vector (dynamic array of objects)
0022 //!
0023 //! This class is similar to NCollection_Vector  though the indices always start
0024 //! at 0 (in Array1 the first index must be specified)
0025 //!
0026 //! The Vector is always created with 0 length. It can be enlarged by two means:
0027 //!  1. Calling the method Append (val) - then "val" is added to the end of the
0028 //!     vector (the vector length is incremented)
0029 //!  2. Calling the method SetValue (i, val)  - if "i" is greater than or equal
0030 //!     to the current length of the vector,  the vector is enlarged to accomo-
0031 //!     date this index
0032 //!
0033 //! The methods Append and SetValue return  a non-const reference  to the copied
0034 //! object  inside  the vector.  This reference  is guaranteed to be valid until
0035 //! the vector is destroyed. It can be used to access the vector member directly
0036 //! or to pass its address to other data structures.
0037 //!
0038 //! The vector iterator remembers the length of the vector  at the moment of the
0039 //! creation or initialisation of the iterator.   Therefore the iteration begins
0040 //! at index 0  and stops at the index equal to (remembered_length-1).  It is OK
0041 //! to enlarge the vector during the iteration.
0042 template <class TheItemType>
0043 using NCollection_Vector = NCollection_DynamicArray<TheItemType>;
0044 
0045 #endif // NCollection_Vector_HeaderFile