Purpose: The class Array2 represents bi-dimensional arrays of fixed size known at run time. More...
#include <SMESH_Array2.hxx>
Classes | |
class | Iterator |
Public Member Functions | |
virtual void | Assign (const NCollection_BaseCollection< TheItemType > &theOther) |
Assign. More... | |
TheItemType & | ChangeValue (const Standard_Integer theRow, const Standard_Integer theCol) |
Variable value access. More... | |
Standard_Integer | ColLength (void) const |
ColLength. More... | |
void | Init (const TheItemType &theValue) |
Initialise the values. More... | |
Standard_Boolean | IsDeletable (void) const |
myDeletable flag More... | |
Standard_Integer | Length (void) const |
Length (number of items) More... | |
Standard_Integer | LowerCol (void) const |
LowerCol. More... | |
Standard_Integer | LowerRow (void) const |
LowerRow. More... | |
TheItemType & | operator() (const Standard_Integer theRow, const Standard_Integer theCol) |
operator() - alias to ChangeValue More... | |
const TheItemType & | operator() (const Standard_Integer theRow, const Standard_Integer theCol) const |
operator() - alias to ChangeValue More... | |
SMESH_Array2 & | operator= (const SMESH_Array2 &theOther) |
operator= (array to array) More... | |
Standard_Integer | RowLength (void) const |
RowLength. More... | |
void | SetValue (const Standard_Integer theRow, const Standard_Integer theCol, const TheItemType &theItem) |
SetValue. More... | |
virtual Standard_Integer | Size (void) const |
Size (number of items) More... | |
SMESH_Array2 (const SMESH_Array2 &theOther) | |
Copy constructor. More... | |
SMESH_Array2 (const Standard_Integer theRowLower, const Standard_Integer theRowUpper, const Standard_Integer theColLower, const Standard_Integer theColUpper) | |
Constructor. More... | |
SMESH_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... | |
Standard_Integer | UpperCol (void) const |
UpperCol. More... | |
Standard_Integer | UpperRow (void) const |
UpperRow. More... | |
const TheItemType & | Value (const Standard_Integer theRow, const Standard_Integer theCol) const |
Constant value access. More... | |
~SMESH_Array2 (void) | |
Destructor - releases the memory. More... | |
Protected Attributes | |
TheItemType ** | myData |
Pointer to the row pointers table. More... | |
Standard_Boolean | myDeletable |
Flag showing who allocated the array. More... | |
Standard_Integer | myLowerCol |
Standard_Integer | myLowerRow |
TheItemType * | myStart |
Pointer to the memory array. More... | |
Standard_Integer | myUpperCol |
Standard_Integer | myUpperRow |
Friends | |
class | Iterator |
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 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++)
SMESH_Array2< TheItemType >::SMESH_Array2 | ( | const Standard_Integer | theRowLower, |
const Standard_Integer | theRowUpper, | ||
const Standard_Integer | theColLower, | ||
const Standard_Integer | theColUpper | ||
) |
Constructor.
SMESH_Array2< TheItemType >::SMESH_Array2 | ( | const SMESH_Array2< TheItemType > & | theOther | ) |
Copy constructor.
SMESH_Array2< TheItemType >::SMESH_Array2 | ( | const TheItemType & | theBegin, |
const Standard_Integer | theRowLower, | ||
const Standard_Integer | theRowUpper, | ||
const Standard_Integer | theColLower, | ||
const Standard_Integer | theColUpper | ||
) |
C array-based constructor.
References SMESH_Array2< TheItemType >::myStart.
SMESH_Array2< TheItemType >::~SMESH_Array2 | ( | void | ) |
Destructor - releases the memory.
References SMESH_Array2< TheItemType >::myData, SMESH_Array2< TheItemType >::myDeletable, SMESH_Array2< TheItemType >::myLowerRow, and SMESH_Array2< TheItemType >::myStart.
|
virtual |
Assign.
References SMESH_Array2< TheItemType >::Length(), and SMESH_Array2< TheItemType >::myStart.
TheItemType & SMESH_Array2< TheItemType >::ChangeValue | ( | const Standard_Integer | theRow, |
const Standard_Integer | theCol | ||
) |
Variable value access.
References SMESH_Array2< TheItemType >::myData, SMESH_Array2< TheItemType >::myUpperCol, and SMESH_Array2< TheItemType >::myUpperRow.
Referenced by SMESH_Array2< TheItemType >::operator()().
Standard_Integer SMESH_Array2< TheItemType >::ColLength | ( | void | ) | const |
ColLength.
References SMESH_Array2< TheItemType >::myLowerRow, and SMESH_Array2< TheItemType >::myUpperRow.
Referenced by SMESH_Array2< TheItemType >::Length().
void SMESH_Array2< TheItemType >::Init | ( | const TheItemType & | theValue | ) |
Initialise the values.
References SMESH_Array2< TheItemType >::myStart, and SMESH_Array2< TheItemType >::Size().
Standard_Boolean SMESH_Array2< TheItemType >::IsDeletable | ( | void | ) | const |
myDeletable flag
References SMESH_Array2< TheItemType >::myDeletable.
Standard_Integer SMESH_Array2< TheItemType >::Length | ( | void | ) | const |
Length (number of items)
References SMESH_Array2< TheItemType >::ColLength(), and SMESH_Array2< TheItemType >::RowLength().
Referenced by ArchStructure.CommandStructuralSystem::Activated(), SMESH_Array2< TheItemType >::Assign(), ArchPanel.CommandPanel::getPoint(), SMESH_Array2< TheItemType >::Iterator::Init(), SMESH_Array2< TheItemType >::operator=(), ArchPanel.CommandPanel::setLength(), SMESH_Array2< TheItemType >::Size(), and ArchPanel.CommandPanel::update().
Standard_Integer SMESH_Array2< TheItemType >::LowerCol | ( | void | ) | const |
LowerCol.
References SMESH_Array2< TheItemType >::myLowerCol.
Standard_Integer SMESH_Array2< TheItemType >::LowerRow | ( | void | ) | const |
LowerRow.
References SMESH_Array2< TheItemType >::myLowerRow.
TheItemType & SMESH_Array2< TheItemType >::operator() | ( | const Standard_Integer | theRow, |
const Standard_Integer | theCol | ||
) |
operator() - alias to ChangeValue
References SMESH_Array2< TheItemType >::ChangeValue().
const TheItemType & SMESH_Array2< TheItemType >::operator() | ( | const Standard_Integer | theRow, |
const Standard_Integer | theCol | ||
) | const |
operator() - alias to ChangeValue
References SMESH_Array2< TheItemType >::Value().
SMESH_Array2 & SMESH_Array2< TheItemType >::operator= | ( | const SMESH_Array2< TheItemType > & | theOther | ) |
operator= (array to array)
References SMESH_Array2< TheItemType >::Length(), and SMESH_Array2< TheItemType >::myStart.
Standard_Integer SMESH_Array2< TheItemType >::RowLength | ( | void | ) | const |
RowLength.
References SMESH_Array2< TheItemType >::myLowerCol, and SMESH_Array2< TheItemType >::myUpperCol.
Referenced by SMESH_Array2< TheItemType >::Length().
void SMESH_Array2< TheItemType >::SetValue | ( | const Standard_Integer | theRow, |
const Standard_Integer | theCol, | ||
const TheItemType & | theItem | ||
) |
SetValue.
References SMESH_Array2< TheItemType >::myData, SMESH_Array2< TheItemType >::myUpperCol, and SMESH_Array2< TheItemType >::myUpperRow.
|
virtual |
Size (number of items)
References SMESH_Array2< TheItemType >::Length().
Referenced by SMESH_Array2< TheItemType >::Init().
Standard_Integer SMESH_Array2< TheItemType >::UpperCol | ( | void | ) | const |
UpperCol.
References SMESH_Array2< TheItemType >::myUpperCol.
Standard_Integer SMESH_Array2< TheItemType >::UpperRow | ( | void | ) | const |
UpperRow.
References SMESH_Array2< TheItemType >::myUpperRow.
const TheItemType & SMESH_Array2< TheItemType >::Value | ( | const Standard_Integer | theRow, |
const Standard_Integer | theCol | ||
) | const |
Constant value access.
References SMESH_Array2< TheItemType >::myData, SMESH_Array2< TheItemType >::myUpperCol, and SMESH_Array2< TheItemType >::myUpperRow.
Referenced by SMESH_Array2< TheItemType >::operator()().
|
protected |
Pointer to the row pointers table.
Referenced by SMESH_Array2< TheItemType >::ChangeValue(), SMESH_Array2< TheItemType >::SetValue(), SMESH_Array2< TheItemType >::Value(), and SMESH_Array2< TheItemType >::~SMESH_Array2().
|
protected |
Flag showing who allocated the array.
Referenced by SMESH_Array2< TheItemType >::IsDeletable(), and SMESH_Array2< TheItemType >::~SMESH_Array2().
|
protected |
Referenced by SMESH_Array2< TheItemType >::LowerCol(), and SMESH_Array2< TheItemType >::RowLength().
|
protected |
|
protected |
Pointer to the memory array.
Referenced by SMESH_Array2< TheItemType >::Assign(), SMESH_Array2< TheItemType >::Iterator::ChangeValue(), SMESH_Array2< TheItemType >::Init(), SMESH_Array2< TheItemType >::operator=(), SMESH_Array2< TheItemType >::SMESH_Array2(), SMESH_Array2< TheItemType >::Iterator::Value(), and SMESH_Array2< TheItemType >::~SMESH_Array2().
|
protected |
|
protected |