Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

CTArray Class Reference

Define an array of objects Implemented in: tvu_list_tree_array.cpp. More...

#include <tvu_typesdef.h>

Inheritance diagram for CTArray::

CTObject

Public Methods

 CTArray ()
 Constructors/Destructors. More...

 CTArray (TINT nElements)
 Constructor with the maximum number of elements. More...

virtual ~CTArray ()
 destuctor. More...

virtual TVOID Delete (TBOOL bDeleteData=TFALSE)
 Delete the buffer bDeleteData = TRUE => delete the objects contained in the array. More...

virtual TVOID ResetArray ()
 Detach every elements. More...

 DEFINE_ID_FUNCTIONS (CTArray, CTObject, CLASSNAME_TYPE_ARRAY_ID, CLASSNAME_TYPE_ARRAY) public
 Overwrite. More...

CTIntGetCount ()
 Get the current number of elements. More...

LPCTObject* GetBuffer ()
 Get the buffer of the array ==> "array" of objects. More...

CTObjectGetAt (TINT i)
 Get the element i of the array. More...

TBOOL SetAt (TINT i, CTObject *pObject)
 Replace the element i of the array. More...

TBOOL Add (CTObject *pObject)
 Add an object to the array. More...

TBOOL Alloc (TINT nElements)
 Allocate the memery for the array. More...

TBOOL ReAlloc (TINT nElements)
 Allocate the memery for the array and conserve its data. More...

virtual CTObjectCalculate (TINT iOperator, CTObject *Object)
 For calculating. More...

CTArray& operator= (CTArray &Array)
 Operations. More...


Protected Methods

TINT GetIndex (TINT i)
 Convert from an integer to the index of the array. More...

TINT GetNextIndex (TINT i)

Protected Attributes

CTInt m_MaxCount
 Maximum number of elements. More...

CTInt m_nCount
 Current number of elements. More...

LPCTObject* m_Objects
 Buffers. More...


Detailed Description

Define an array of objects Implemented in: tvu_list_tree_array.cpp.


Constructor & Destructor Documentation

CTArray::CTArray ( )
 

Constructors/Destructors.

CTArray::CTArray ( TINT nElements )
 

Constructor with the maximum number of elements.

CTArray::~CTArray ( ) [virtual]
 

destuctor.


Member Function Documentation

TBOOL CTArray::Add ( CTObject * pObject )
 

Add an object to the array.

TBOOL CTArray::Alloc ( TINT nElements )
 

Allocate the memery for the array.

CTObject * CTArray::Calculate ( TINT iOperator,
CTObject * Object ) [virtual]
 

For calculating.

Reimplemented from CTObject.

CTArray::DEFINE_ID_FUNCTIONS ( CTArray,
CTObject,
CLASSNAME_TYPE_ARRAY_ID,
CLASSNAME_TYPE_ARRAY ) [inline]
 

Overwrite.

02207               :
02209                 CTInt& GetMaxCount() { return m_MaxCount; };

TVOID CTArray::Delete ( TBOOL bDeleteData = TFALSE ) [virtual]
 

Delete the buffer bDeleteData = TRUE => delete the objects contained in the array.

CTObject * CTArray::GetAt ( TINT i ) [inline]
 

Get the element i of the array.

02215 { return m_Objects[GetIndex(i)]; };

LPCTObject * CTArray::GetBuffer ( ) [inline]
 

Get the buffer of the array ==> "array" of objects.

02213 { return m_Objects; };

CTInt & CTArray::GetCount ( ) [inline]
 

Get the current number of elements.

02211 { return m_nCount; };

TINT CTArray::GetIndex ( TINT i ) [protected]
 

Convert from an integer to the index of the array.

TBOOL CTArray::ReAlloc ( TINT nElements )
 

Allocate the memery for the array and conserve its data.

TVOID CTArray::ResetArray ( ) [virtual]
 

Detach every elements.

TBOOL CTArray::SetAt ( TINT i,
CTObject * pObject )
 

Replace the element i of the array.

CTArray & CTArray::operator= ( CTArray & Array )
 

Operations.


Field Documentation

CTInt CTArray::m_MaxCount [protected]
 

Maximum number of elements.

LPCTObject * CTArray::m_Objects [protected]
 

Buffers.

CTInt CTArray::m_nCount [protected]
 

Current number of elements.


The documentation for this class was generated from the following file:
Generated at Wed Aug 6 15:58:59 2003 for TVU's libraries for video surveillance: by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001