OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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::TMSortedObjectArray< T, TStandardAllocator > owl::TMSortedObjectArray< T, A > owl::TSortedObjectArray< T >

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)
 
voidoperator new (size_t sz)
 
voidAlloc (size_t sz)
 
void Free (void *ptr)
 
voidReAlloc (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 owl::TMObjectArray< T, A >::Resize().

◆ TMObjectArray() [2/3]

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

Definition at line 711 of file template.h.

◆ ~TMObjectArray()

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

Definition at line 1252 of file template.h.

◆ 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

Definition at line 1278 of file template.h.

◆ AddAt()

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

Definition at line 1287 of file template.h.

◆ 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().

◆ 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().

◆ Find()

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

Definition at line 1340 of file template.h.

◆ 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.

◆ Flush()

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

Definition at line 1388 of file template.h.

References owl::__owl_destruct().

◆ ForEach()

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

Definition at line 1363 of file template.h.

◆ GetAllocator()

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

Definition at line 715 of file template.h.

References owl::TMObjectArray< T, A >::Mem.

◆ Grow()

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

Definition at line 1399 of file template.h.

◆ 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.

◆ 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.

◆ operator=()

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

Definition at line 1260 of file template.h.

◆ 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 PRECONDITION.

◆ 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 PRECONDITION.

◆ Remove()

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

Definition at line 1428 of file template.h.

◆ 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 owl::TMObjectArray< T, A >::Remove().

◆ Resize()

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

Definition at line 1407 of file template.h.

◆ 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 owl::TMObjectArray< T, A >::Remove().

Friends And Related Symbol Documentation

◆ 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: