|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Array common:BooleanArray
class
Generic Boolean dynamic array object wrapper.
This is a generic dynamic array wrapper class for
Boolean data. See the Array base class for more
information.
class BooleanArray(Array) { ; Generic Boolean dynamic array object wrapper. ; <p> ; This is a generic dynamic array wrapper class for ; Boolean data. See the Array base class for more ; information. public: ; Constructor ; ; @param plength initial length of the array func BooleanArray(int plength) setLength(m_Elements, plength) endfunc ; Length wrapper ; ; @return the number of elements in the array int func GetArrayLength() return length(m_Elements) endfunc ; setLength wrapper ; <p> ; This is analagous to UF's native setLength() function ; for dynamic arrays. ; ; @param plength new length of the array func SetArrayLength(int plength) setLength(m_Elements, plength) endfunc ; Copy (must be implemented in each type) ; ; @param dest BooleanArray object to copy all values into; previous contents of dest will be discarded. func Copy(BooleanArray &dest) int l = this.GetArrayLength() if (dest == 0) dest = new BooleanArray(l) else dest.SetArrayLength(l) endif int j = 0 while (j < l) dest.m_Elements[j] = m_Elements[j] j = j + 1 endwhile endfunc ; Array elements (for direct access) bool m_Elements[] default: }
Constructor Summary | |
---|---|
BooleanArray()
|
|
BooleanArray(int plength)
Constructor |
Method Summary | |
---|---|
void |
Copy(BooleanArray dest)
Copy (must be implemented in each type) |
int |
GetArrayLength()
Length wrapper |
void |
SetArrayLength(int plength)
setLength wrapper |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public BooleanArray(int plength)
plength
- initial length of the arraypublic BooleanArray()
Method Detail |
---|
public int GetArrayLength()
GetArrayLength
in class Array
public void SetArrayLength(int plength)
This is analagous to UF's native setLength() function for dynamic arrays.
SetArrayLength
in class Array
plength
- new length of the arraypublic void Copy(BooleanArray dest)
dest
- BooleanArray object to copy all values into; previous contents of dest will be discarded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |