|
Open CASCADE Technology
6.7.1
|
#include <NCollection_Array1.hxx>

Data Structures | |
| class | Iterator |
| Implementation of the Iterator interface. More... | |
Public Member Functions | |
| NCollection_Array1 (const Standard_Integer theLower, const Standard_Integer theUpper) | |
| Constructor. More... | |
| NCollection_Array1 (const NCollection_Array1 &theOther) | |
| Copy constructor. More... | |
| NCollection_Array1 (const TheItemType &theBegin, const Standard_Integer theLower, const Standard_Integer theUpper) | |
| C array-based constructor. More... | |
| void | Init (const TheItemType &theValue) |
| Initialise the items with theValue. More... | |
| virtual Standard_Integer | Size (void) const |
| Size query. More... | |
| Standard_Integer | Length (void) const |
| Length query (the same) More... | |
| Standard_Integer | Lower (void) const |
| Lower bound. More... | |
| Standard_Integer | Upper (void) const |
| Upper bound. More... | |
| Standard_Boolean | IsDeletable (void) const |
| myDeletable flag More... | |
| Standard_Boolean | IsAllocated (void) const |
| IsAllocated flag - for naming compatibility. More... | |
| virtual void | Assign (const NCollection_BaseCollection< TheItemType > &theOther) |
| Assign (any collection to this array) More... | |
| NCollection_Array1 & | operator= (const NCollection_Array1 &theOther) |
| operator= (array to array) More... | |
| const TheItemType & | First () const |
| TheItemType & | ChangeFirst () |
| const TheItemType & | Last () const |
| TheItemType & | ChangeLast () |
| const TheItemType & | Value (const Standard_Integer theIndex) const |
| Constant value access. More... | |
| const TheItemType & | operator() (const Standard_Integer theIndex) const |
| operator() - alias to Value More... | |
| TheItemType & | ChangeValue (const Standard_Integer theIndex) |
| Variable value access. More... | |
| TheItemType & | operator() (const Standard_Integer theIndex) |
| operator() - alias to ChangeValue More... | |
| void | SetValue (const Standard_Integer theIndex, const TheItemType &theItem) |
| Set value. More... | |
| ~NCollection_Array1 (void) | |
| Destructor - releases the memory. More... | |
Public Member Functions inherited from NCollection_BaseCollection< TheItemType > | |
| NCollection_BaseCollection (const Handle< NCollection_BaseAllocator > &theAllocator=0L) | |
| Common for all collections constructor takes care of theAllocator. More... | |
| virtual | ~NCollection_BaseCollection (void) |
| Destructor - must be implemented to release the memory. More... | |
| const Handle < NCollection_BaseAllocator > & | Allocator () const |
| Returns attached allocator. More... | |
Protected Attributes | |
| Standard_Integer | myLowerBound |
| Standard_Integer | myUpperBound |
| Standard_Boolean | myDeletable |
| Flag showing who allocated the array. More... | |
| TheItemType * | myData |
| Pointer to '0'th array item. More... | |
Protected Attributes inherited from NCollection_BaseCollection< TheItemType > | |
| Handle< NCollection_BaseAllocator > | myAllocator |
Additional Inherited Members | |
Protected Member Functions inherited from NCollection_BaseCollection< TheItemType > | |
| const Handle < NCollection_BaseAllocator > & | IterAllocator (void) const |
| void | exchangeAllocators (NCollection_BaseCollection &theOther) |
| Exchange allocators of two collections. More... | |
Purpose: The class Array1 represents unidimensional arrays of fixed size known at run time. The range of the index is user defined. An array1 can be constructed with a "C array". This functionality is useful to call methods expecting an Array1. It allows to carry the bounds inside the arrays.
Examples: Item tab[100]; // An example with a C array Array1OfItem ttab (tab[0],1,100);
Array1OfItem tttab (ttab(10),10,20); // a slice of ttab
If you want to reindex an array from 1 to Length do :
Array1 tab1(tab(tab.Lower()),1,tab.Length());
Warning: Programs client of such a class must be independant of the range of the first element. Then, a C++ for loop must be written like this
for (i = A.Lower(); i <= A.Upper(); i++)
Changes: In comparison to TCollection the flag isAllocated was renamed into myDeletable (alike in the Array2). For naming compatibility the method IsAllocated remained in class along with IsDeletable.
|
inline |
Constructor.
|
inline |
Copy constructor.
|
inline |
C array-based constructor.
|
inline |
Destructor - releases the memory.
|
inlinevirtual |
Assign (any collection to this array)
Implements NCollection_BaseCollection< TheItemType >.
|
inline |
|
inline |
|
inline |
Variable value access.
|
inline |
|
inline |
Initialise the items with theValue.
|
inline |
IsAllocated flag - for naming compatibility.
|
inline |
myDeletable flag
|
inline |
|
inline |
Length query (the same)
|
inline |
Lower bound.
|
inline |
operator() - alias to Value
|
inline |
operator() - alias to ChangeValue
|
inline |
operator= (array to array)
|
inline |
Set value.
|
inlinevirtual |
Size query.
Implements NCollection_BaseCollection< TheItemType >.
|
inline |
Upper bound.
|
inline |
Constant value access.
|
protected |
Pointer to '0'th array item.
|
protected |
Flag showing who allocated the array.
|
protected |
|
protected |
1.8.5