Open CASCADE Technology
7.4.0
|
#include <NCollection_Array2.hxx>
Data Structures | |
class | Iterator |
Public Types | |
typedef TheItemType | value_type |
STL-compliant typedef for value type. More... | |
Public Member Functions | |
NCollection_Array2 () | |
Empty constructor; should be used with caution. More... | |
NCollection_Array2 (const Standard_Integer theRowLower, const Standard_Integer theRowUpper, const Standard_Integer theColLower, const Standard_Integer theColUpper) | |
Constructor. More... | |
NCollection_Array2 (const NCollection_Array2 &theOther) | |
Copy constructor. More... | |
NCollection_Array2 (NCollection_Array2 &&theOther) | |
Move constructor. More... | |
NCollection_Array2 (const TheItemType &theBegin, const Standard_Integer theRowLower, const Standard_Integer theRowUpper, const Standard_Integer theColLower, const Standard_Integer theColUpper) | |
C array-based constructor. More... | |
void | Init (const TheItemType &theValue) |
Initialise the values. More... | |
Standard_Integer | Size (void) const |
Size (number of items) More... | |
Standard_Integer | Length (void) const |
Length (number of items) More... | |
Standard_Integer | NbRows () const |
Returns number of rows. More... | |
Standard_Integer | NbColumns () const |
Returns number of columns. More... | |
Standard_Integer | RowLength () const |
Returns length of the row, i.e. number of columns. More... | |
Standard_Integer | ColLength () const |
Returns length of the column, i.e. number of rows. More... | |
Standard_Integer | LowerRow (void) const |
LowerRow. More... | |
Standard_Integer | UpperRow (void) const |
UpperRow. More... | |
Standard_Integer | LowerCol (void) const |
LowerCol. More... | |
Standard_Integer | UpperCol (void) const |
UpperCol. More... | |
Standard_Boolean | IsDeletable (void) const |
myDeletable flag More... | |
NCollection_Array2 & | Assign (const NCollection_Array2 &theOther) |
Assignment. More... | |
NCollection_Array2 & | Move (NCollection_Array2 &theOther) |
Move assignment. This array will borrow all the data from theOther. The moved object will be left unitialized and should not be used anymore. More... | |
NCollection_Array2 & | operator= (const NCollection_Array2 &theOther) |
Assignment operator. More... | |
NCollection_Array2 & | operator= (NCollection_Array2 &&theOther) |
Move assignment operator;. More... | |
const TheItemType & | Value (const Standard_Integer theRow, const Standard_Integer theCol) const |
Constant value access. More... | |
const TheItemType & | operator() (const Standard_Integer theRow, const Standard_Integer theCol) const |
operator() - alias to ChangeValue More... | |
TheItemType & | ChangeValue (const Standard_Integer theRow, const Standard_Integer theCol) |
Variable value access. More... | |
TheItemType & | operator() (const Standard_Integer theRow, const Standard_Integer theCol) |
operator() - alias to ChangeValue More... | |
void | SetValue (const Standard_Integer theRow, const Standard_Integer theCol, const TheItemType &theItem) |
SetValue. More... | |
void | Resize (Standard_Integer theRowLower, Standard_Integer theRowUpper, Standard_Integer theColLower, Standard_Integer theColUpper, Standard_Boolean theToCopyData) |
Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE. More... | |
~NCollection_Array2 (void) | |
Destructor - releases the memory. More... | |
Protected Attributes | |
Standard_Integer | myLowerRow |
Standard_Integer | myUpperRow |
Standard_Integer | myLowerCol |
Standard_Integer | myUpperCol |
TheItemType ** | myData |
Pointer to the row pointers table. More... | |
TheItemType * | myStart |
Pointer to the memory array. More... | |
Standard_Boolean | myDeletable |
Flag showing who allocated the array. More... | |
Purpose: The class Array2 represents bi-dimensional arrays of fixed size known at run time. The ranges of indices are user defined.
Class allocates one 1D array storing full data (all Rows and Columns) and extra 1D array storing pointers to each Row.
Warning: Programs clients of such class must be independent of the range of the first element. Then, a C++ for loop must be written like this
for (i = A.LowerRow(); i <= A.UpperRow(); i++) for (j = A.LowerCol(); j <= A.UpperCol(); j++)
typedef TheItemType NCollection_Array2< TheItemType >::value_type |
STL-compliant typedef for value type.
|
inline |
|
inline |
Constructor.
|
inline |
Copy constructor.
|
inline |
Move constructor.
|
inline |
C array-based constructor.
|
inline |
Destructor - releases the memory.
|
inline |
Assignment.
|
inline |
Variable value access.
|
inline |
Returns length of the column, i.e. number of rows.
|
inline |
Initialise the values.
|
inline |
myDeletable flag
|
inline |
Length (number of items)
|
inline |
LowerCol.
|
inline |
LowerRow.
|
inline |
Move assignment. This array will borrow all the data from theOther. The moved object will be left unitialized and should not be used anymore.
|
inline |
Returns number of columns.
|
inline |
Returns number of rows.
|
inline |
operator() - alias to ChangeValue
|
inline |
operator() - alias to ChangeValue
|
inline |
Assignment operator.
|
inline |
Move assignment operator;.
|
inline |
Resizes the array to specified bounds. No re-allocation will be done if length of array does not change, but existing values will not be discarded if theToCopyData set to FALSE.
theRowLower | new lower Row of array |
theRowUpper | new upper Row of array |
theColLower | new lower Column of array |
theColUpper | new upper Column of array |
theToCopyData | flag to copy existing data into new array |
|
inline |
Returns length of the row, i.e. number of columns.
|
inline |
SetValue.
|
inline |
Size (number of items)
|
inline |
UpperCol.
|
inline |
UpperRow.
|
inline |
Constant value access.
|
protected |
Pointer to the row pointers table.
|
protected |
Flag showing who allocated the array.
|
protected |
|
protected |
|
protected |
Pointer to the memory array.
|
protected |
|
protected |