OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TMObjectArray< T, A > Class Template Reference

Holds array pointers to strings. More...

#include <owl/template.h>

Inheritance diagram for owl::TMObjectArray< T, A >:
owl::TStandardAllocator owl::TArrayBase owl::TObjectArray< TComboBoxExItem > owl::TObjectArray< tstring >

Public Types

typedef void(*) IterFunc(T &, void *)
typedef bool(*) CondFunc(const T &, void *)
typedef TObjArrayIterator< T, TMObjectArray< T, A > > Iterator
typedef Iterator iterator

Public Member Functions

 TMObjectArray (int upper, int lower=0, int=0)
 TMObjectArray ()
 ~TMObjectArray ()
 TMObjectArray (const TMObjectArray< T, A > &array)
TMObjectArray< T, A > & operator= (const TMObjectArray< T, A > &array)
TMMemBlocks< A > & GetAllocator ()
void RemoveEntry (int loc)
void SqueezeEntry (unsigned loc)
void Grow (int index)
int Add (const T &t)
void AddAt (const T &t, uint index)
bool DestroyItem (const T &t)
bool Destroy (int loc)
bool HasMember (const T &t) const
int Find (const T &t) const
T & operator[] (int loc)
const T & operator[] (int loc) const
void ForEach (IterFunc iter, void *args)
T * FirstThat (CondFunc cond, void *args) const
T * LastThat (CondFunc cond, void *args) const
void Flush ()
Public Member Functions inherited from owl::TStandardAllocator
void operator delete (void *ptr)
void * operator new (size_t sz)
void * Alloc (size_t sz)
void Free (void *ptr)
void * ReAlloc (void *ptr, size_t sz)
Public Member Functions inherited from owl::TArrayBase
 TArrayBase ()
uint GetItemsInContainer () const
int LowerBound () const
int UpperBound () const
uint ArraySize () const
bool IsFull () const
bool IsEmpty () const
uint Size () const
uint Count () const
bool Empty () const
uint size () const
bool empty () const

Protected Member Functions

void Resize (int delta)
void Remove (int index)

Protected Attributes

T ** Data
TMMemBlocks< A > Mem
Protected Attributes inherited from owl::TArrayBase
uint ItemCnt
uint Reserved

Friends

class TObjArrayIterator< T, TMObjectArray< T, A > >

Additional Inherited Members

Static Public Attributes inherited from owl::TArrayBase
static const int NPOS = -1

Detailed Description

template<class T, class A = TStandardAllocator>
class owl::TMObjectArray< T, A >

Holds array pointers to strings.

Definition at line 697 of file template.h.

Member Typedef Documentation

◆ CondFunc

template<class T, class A = TStandardAllocator>
typedef bool(*) owl::TMObjectArray< T, A >::CondFunc(const T &, void *)

Definition at line 703 of file template.h.

◆ Iterator

template<class T, class A = TStandardAllocator>
typedef TObjArrayIterator<T, TMObjectArray<T, A> > owl::TMObjectArray< T, A >::Iterator

Definition at line 705 of file template.h.

◆ iterator

template<class T, class A = TStandardAllocator>
typedef Iterator owl::TMObjectArray< T, A >::iterator

Definition at line 707 of file template.h.

◆ IterFunc

template<class T, class A = TStandardAllocator>
typedef void(*) owl::TMObjectArray< T, A >::IterFunc(T &, void *)

Definition at line 702 of file template.h.

Constructor & Destructor Documentation

◆ TMObjectArray() [1/3]

template<class T, class A = TStandardAllocator>
owl::TMObjectArray< T, A >::TMObjectArray ( int upper,
int lower = 0,
int = 0 )
inline

Definition at line 709 of file template.h.

References Data, Mem, and Resize().

◆ TMObjectArray() [2/3]

template<class T, class A = TStandardAllocator>
owl::TMObjectArray< T, A >::TMObjectArray ( )
inline

Definition at line 711 of file template.h.

References Data, and Mem.

◆ ~TMObjectArray()

template<class T, class A>
owl::TMObjectArray< T, A >::~TMObjectArray ( )
inline

Definition at line 1252 of file template.h.

References Data, and Flush().

◆ TMObjectArray() [3/3]

template<class T, class A>
owl::TMObjectArray< T, A >::TMObjectArray ( const TMObjectArray< T, A > & array)

Member Function Documentation

◆ Add()

template<class T, class A>
int owl::TMObjectArray< T, A >::Add ( const T & t)
inline

◆ AddAt()

template<class T, class A>
void owl::TMObjectArray< T, A >::AddAt ( const T & t,
uint index )

◆ Destroy()

template<class T, class A>
bool owl::TMObjectArray< T, A >::Destroy ( int loc)
inline

Definition at line 1320 of file template.h.

References owl::__owl_destruct(), Data, Mem, Remove(), and owl::TArrayBase::Size().

◆ DestroyItem()

template<class T, class A>
bool owl::TMObjectArray< T, A >::DestroyItem ( const T & t)
inline

Definition at line 1305 of file template.h.

References owl::__owl_destruct(), Data, Find(), Mem, owl::TArrayBase::NPOS, and Remove().

◆ Find()

template<class T, class A>
int owl::TMObjectArray< T, A >::Find ( const T & t) const

Definition at line 1340 of file template.h.

References Data, owl::TArrayBase::NPOS, and owl::TArrayBase::Size().

◆ FirstThat()

template<class T, class A>
T * owl::TMObjectArray< T, A >::FirstThat ( CondFunc cond,
void * args ) const

Definition at line 1370 of file template.h.

References Data, and owl::TArrayBase::Size().

◆ Flush()

template<class T, class A>
void owl::TMObjectArray< T, A >::Flush ( )

◆ ForEach()

template<class T, class A>
void owl::TMObjectArray< T, A >::ForEach ( IterFunc iter,
void * args )

Definition at line 1363 of file template.h.

References Data, and owl::TArrayBase::Size().

◆ GetAllocator()

template<class T, class A = TStandardAllocator>
TMMemBlocks< A > & owl::TMObjectArray< T, A >::GetAllocator ( )
inline

Definition at line 715 of file template.h.

References Mem.

◆ Grow()

template<class T, class A>
void owl::TMObjectArray< T, A >::Grow ( int index)
inline

Definition at line 1399 of file template.h.

References owl::TArrayBase::Reserved, and Resize().

◆ HasMember()

template<class T, class A>
bool owl::TMObjectArray< T, A >::HasMember ( const T & t) const
inline

Definition at line 1334 of file template.h.

References Find(), and owl::TArrayBase::NPOS.

◆ LastThat()

template<class T, class A>
T * owl::TMObjectArray< T, A >::LastThat ( CondFunc cond,
void * args ) const

Definition at line 1379 of file template.h.

References Data, and owl::TArrayBase::Size().

◆ operator=()

template<class T, class A>
TMObjectArray< T, A > & owl::TMObjectArray< T, A >::operator= ( const TMObjectArray< T, A > & array)

◆ operator[]() [1/2]

template<class T, class A>
T & owl::TMObjectArray< T, A >::operator[] ( int loc)
inline

Definition at line 1349 of file template.h.

References Data, PRECONDITION, and owl::TArrayBase::Size().

◆ operator[]() [2/2]

template<class T, class A>
const T & owl::TMObjectArray< T, A >::operator[] ( int loc) const
inline

Definition at line 1356 of file template.h.

References Data, PRECONDITION, and owl::TArrayBase::Size().

◆ Remove()

template<class T, class A>
void owl::TMObjectArray< T, A >::Remove ( int index)
inlineprotected

Definition at line 1428 of file template.h.

References Data, and owl::TArrayBase::ItemCnt.

◆ RemoveEntry()

template<class T, class A = TStandardAllocator>
void owl::TMObjectArray< T, A >::RemoveEntry ( int loc)
inline

Definition at line 717 of file template.h.

References Remove().

◆ Resize()

template<class T, class A>
void owl::TMObjectArray< T, A >::Resize ( int delta)
protected

Definition at line 1407 of file template.h.

References Data, and owl::TArrayBase::Reserved.

◆ SqueezeEntry()

template<class T, class A = TStandardAllocator>
void owl::TMObjectArray< T, A >::SqueezeEntry ( unsigned loc)
inline

Definition at line 718 of file template.h.

References Remove().

◆ TObjArrayIterator< T, TMObjectArray< T, A > >

template<class T, class A = TStandardAllocator>
friend class TObjArrayIterator< T, TMObjectArray< T, A > >
friend

Definition at line 705 of file template.h.

Member Data Documentation

◆ Data

template<class T, class A = TStandardAllocator>
T** owl::TMObjectArray< T, A >::Data
protected

Definition at line 745 of file template.h.

◆ Mem

template<class T, class A = TStandardAllocator>
TMMemBlocks<A> owl::TMObjectArray< T, A >::Mem
protected

Definition at line 746 of file template.h.


The documentation for this class was generated from the following file: