|
Open CASCADE Technology
6.5.4
|
#include <NCollection_Array2.hxx>

Data Structures | |
| class | Iterator |
Public Member Functions | |
| NCollection_Array2 (const Standard_Integer theRowLower, const Standard_Integer theRowUpper, const Standard_Integer theColLower, const Standard_Integer theColUpper) | |
| Constructor. | |
| NCollection_Array2 (const NCollection_Array2 &theOther) | |
| Copy constructor. | |
| 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. | |
| void | Init (const TheItemType &theValue) |
| Initialise the values. | |
| virtual Standard_Integer | Size (void) const |
| Size (number of items) | |
| Standard_Integer | Length (void) const |
| Length (number of items) | |
| Standard_Integer | RowLength (void) const |
| RowLength. | |
| Standard_Integer | ColLength (void) const |
| ColLength. | |
| Standard_Integer | LowerRow (void) const |
| LowerRow. | |
| Standard_Integer | UpperRow (void) const |
| UpperRow. | |
| Standard_Integer | LowerCol (void) const |
| LowerCol. | |
| Standard_Integer | UpperCol (void) const |
| UpperCol. | |
| Standard_Boolean | IsDeletable (void) const |
| myDeletable flag | |
| virtual void | Assign (const NCollection_BaseCollection< TheItemType > &theOther) |
| Assign. | |
| NCollection_Array2 & | operator= (const NCollection_Array2 &theOther) |
| operator= (array to array) | |
| const TheItemType & | Value (const Standard_Integer theRow, const Standard_Integer theCol) const |
| Constant value access. | |
| const TheItemType & | operator() (const Standard_Integer theRow, const Standard_Integer theCol) const |
| operator() - alias to ChangeValue | |
| TheItemType & | ChangeValue (const Standard_Integer theRow, const Standard_Integer theCol) |
| Variable value access. | |
| TheItemType & | operator() (const Standard_Integer theRow, const Standard_Integer theCol) |
| operator() - alias to ChangeValue | |
| void | SetValue (const Standard_Integer theRow, const Standard_Integer theCol, const TheItemType &theItem) |
| SetValue. | |
| ~NCollection_Array2 (void) | |
| Destructor - releases the memory. | |
Protected Attributes | |
| Standard_Integer | myLowerRow |
| Standard_Integer | myUpperRow |
| Standard_Integer | myLowerCol |
| Standard_Integer | myUpperCol |
| TheItemType ** | myData |
| Pointer to the row pointers table. | |
| TheItemType * | myStart |
| Pointer to the memory array. | |
| Standard_Boolean | myDeletable |
| Flag showing who allocated the array. | |
Purpose: The class Array2 represents bi-dimensional arrays of fixed size known at run time. The ranges of indices are user defined.
Warning: Programs clients of such class must be independant 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++)
| NCollection_Array2< TheItemType >::NCollection_Array2 | ( | const Standard_Integer | theRowLower, |
| const Standard_Integer | theRowUpper, | ||
| const Standard_Integer | theColLower, | ||
| const Standard_Integer | theColUpper | ||
| ) | [inline] |
| NCollection_Array2< TheItemType >::NCollection_Array2 | ( | const NCollection_Array2< TheItemType > & | theOther | ) | [inline] |
| NCollection_Array2< TheItemType >::NCollection_Array2 | ( | const TheItemType & | theBegin, |
| const Standard_Integer | theRowLower, | ||
| const Standard_Integer | theRowUpper, | ||
| const Standard_Integer | theColLower, | ||
| const Standard_Integer | theColUpper | ||
| ) | [inline] |
| NCollection_Array2< TheItemType >::~NCollection_Array2 | ( | void | ) | [inline] |
| virtual void NCollection_Array2< TheItemType >::Assign | ( | const NCollection_BaseCollection< TheItemType > & | theOther | ) | [inline, virtual] |
Implements NCollection_BaseCollection< TheItemType >.
| TheItemType& NCollection_Array2< TheItemType >::ChangeValue | ( | const Standard_Integer | theRow, |
| const Standard_Integer | theCol | ||
| ) | [inline] |
| Standard_Integer NCollection_Array2< TheItemType >::ColLength | ( | void | ) | const [inline] |
| void NCollection_Array2< TheItemType >::Init | ( | const TheItemType & | theValue | ) | [inline] |
| Standard_Boolean NCollection_Array2< TheItemType >::IsDeletable | ( | void | ) | const [inline] |
| Standard_Integer NCollection_Array2< TheItemType >::Length | ( | void | ) | const [inline] |
| Standard_Integer NCollection_Array2< TheItemType >::LowerCol | ( | void | ) | const [inline] |
| Standard_Integer NCollection_Array2< TheItemType >::LowerRow | ( | void | ) | const [inline] |
| const TheItemType& NCollection_Array2< TheItemType >::operator() | ( | const Standard_Integer | theRow, |
| const Standard_Integer | theCol | ||
| ) | const [inline] |
| TheItemType& NCollection_Array2< TheItemType >::operator() | ( | const Standard_Integer | theRow, |
| const Standard_Integer | theCol | ||
| ) | [inline] |
| NCollection_Array2& NCollection_Array2< TheItemType >::operator= | ( | const NCollection_Array2< TheItemType > & | theOther | ) | [inline] |
| Standard_Integer NCollection_Array2< TheItemType >::RowLength | ( | void | ) | const [inline] |
| void NCollection_Array2< TheItemType >::SetValue | ( | const Standard_Integer | theRow, |
| const Standard_Integer | theCol, | ||
| const TheItemType & | theItem | ||
| ) | [inline] |
| virtual Standard_Integer NCollection_Array2< TheItemType >::Size | ( | void | ) | const [inline, virtual] |
Implements NCollection_BaseCollection< TheItemType >.
| Standard_Integer NCollection_Array2< TheItemType >::UpperCol | ( | void | ) | const [inline] |
| Standard_Integer NCollection_Array2< TheItemType >::UpperRow | ( | void | ) | const [inline] |
| const TheItemType& NCollection_Array2< TheItemType >::Value | ( | const Standard_Integer | theRow, |
| const Standard_Integer | theCol | ||
| ) | const [inline] |
TheItemType** NCollection_Array2< TheItemType >::myData [protected] |
Standard_Boolean NCollection_Array2< TheItemType >::myDeletable [protected] |
Standard_Integer NCollection_Array2< TheItemType >::myLowerCol [protected] |
Standard_Integer NCollection_Array2< TheItemType >::myLowerRow [protected] |
TheItemType* NCollection_Array2< TheItemType >::myStart [protected] |
Standard_Integer NCollection_Array2< TheItemType >::myUpperCol [protected] |
Standard_Integer NCollection_Array2< TheItemType >::myUpperRow [protected] |
1.8.0