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

#include <owl/template.h>

Public Types

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

Public Member Functions

 TBaseList ()
 
 TBaseList (int, int lower=0, int delta=0)
 
 ~TBaseList ()
 
int LowerBound () const
 
uint Size () const
 
int UpperBound () const
 
uint ArraySize () const
 
bool IsFull () const
 
bool Empty () const
 
bool IsEmpty () const
 
uint GetItemsInContainer () const
 
void Add (const T &data)
 add new item at end of list
 
void Add (TBaseListIterator< T > *iter, const T &data)
 add new item after iterator, if 0 add before first
 
void Push (const T &data)
 add new item at begin of list
 
void PushBack (const T &data)
 add new item at end of list
 
Pop ()
 remove 1 item return data item
 
const T & Top ()
 return top of list
 
const T & Bottom ()
 return bottom of array
 
void Flush ()
 Flush all items.
 
bool DetachItem (const T &t)
 DetachItem( detach item and delete it.
 
bool Detach (int loc)
 Detach( but and delete it.
 
bool HasMember (const T &t) const
 check item in container
 
TBaseNode< T > * Find (const T &t) const
 Find.
 
void ForEach (IterFunc iter, void *args)
 iterates all strings
 
T * FirstThat (CondFunc cond, void *args) const
 FirstThat( return first member.
 
T * LastThat (CondFunc cond, void *args) const
 LastThat return last member.
 

Protected Member Functions

bool Remove (TBaseNode< T > *t)
 remove item from list not delete node
 
int Add (TBaseNode< T > *node, const T &data)
 add new item after item, if 0 add before first return index
 
int Add (TBaseNode< T > *node)
 add new item at end of list return index
 
int Add (TBaseNode< T > *item, TBaseNode< T > *node)
 add new item after item, if 0 add before first
 

Protected Attributes

TBaseNode< T > * First
 
TBaseNode< T > * Last
 
uint ItemSize
 optimization for Size()
 

Static Protected Attributes

static const auto NPOS = -1
 

Friends

class TBaseListIterator< T >
 

Detailed Description

template<class T>
class owl::TBaseList< T >

Definition at line 935 of file template.h.

Member Typedef Documentation

◆ CondFunc

template<class T >
typedef bool(* owl::TBaseList< T >::CondFunc) (const T &, void *)

Definition at line 938 of file template.h.

◆ Iterator

template<class T >
typedef TBaseListIterator<T> owl::TBaseList< T >::Iterator

Definition at line 940 of file template.h.

◆ iterator

template<class T >
typedef Iterator owl::TBaseList< T >::iterator

Definition at line 942 of file template.h.

◆ IterFunc

template<class T >
typedef void(* owl::TBaseList< T >::IterFunc) (T &, void *)

Definition at line 937 of file template.h.

Constructor & Destructor Documentation

◆ TBaseList() [1/2]

template<class T >
owl::TBaseList< T >::TBaseList ( )
inline

Definition at line 1900 of file template.h.

◆ TBaseList() [2/2]

template<class T >
owl::TBaseList< T >::TBaseList ( int ,
int lower = 0,
int delta = 0 )
inline

Definition at line 1908 of file template.h.

◆ ~TBaseList()

template<class T >
owl::TBaseList< T >::~TBaseList ( )
inline

Definition at line 1916 of file template.h.

Member Function Documentation

◆ Add() [1/5]

template<class T >
void owl::TBaseList< T >::Add ( const T & data)
inline

add new item at end of list

Definition at line 1923 of file template.h.

◆ Add() [2/5]

template<class T >
void owl::TBaseList< T >::Add ( TBaseListIterator< T > * iter,
const T & data )
inline

add new item after iterator, if 0 add before first

Definition at line 1931 of file template.h.

◆ Add() [3/5]

template<class T >
int owl::TBaseList< T >::Add ( TBaseNode< T > * item,
TBaseNode< T > * node )
protected

add new item after item, if 0 add before first

Definition at line 2116 of file template.h.

◆ Add() [4/5]

template<class T >
int owl::TBaseList< T >::Add ( TBaseNode< T > * node)
protected

add new item at end of list return index

Definition at line 2098 of file template.h.

◆ Add() [5/5]

template<class T >
int owl::TBaseList< T >::Add ( TBaseNode< T > * node,
const T & data )
inlineprotected

add new item after item, if 0 add before first return index

Definition at line 2091 of file template.h.

◆ ArraySize()

template<class T >
uint owl::TBaseList< T >::ArraySize ( ) const
inline

Definition at line 952 of file template.h.

References owl::TBaseList< T >::Size().

◆ Bottom()

template<class T >
const T & owl::TBaseList< T >::Bottom ( )
inline

return bottom of array

Definition at line 1969 of file template.h.

◆ Detach()

template<class T >
bool owl::TBaseList< T >::Detach ( int loc)

Detach( but and delete it.

Definition at line 2001 of file template.h.

◆ DetachItem()

template<class T >
bool owl::TBaseList< T >::DetachItem ( const T & t)

DetachItem( detach item and delete it.

Definition at line 1989 of file template.h.

◆ Empty()

template<class T >
bool owl::TBaseList< T >::Empty ( ) const
inline

Definition at line 954 of file template.h.

References owl::TBaseList< T >::First.

◆ Find()

template<class T >
TBaseNode< T > * owl::TBaseList< T >::Find ( const T & t) const

Find.

Definition at line 2024 of file template.h.

◆ FirstThat()

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

FirstThat( return first member.

Definition at line 2042 of file template.h.

◆ Flush()

template<class T >
void owl::TBaseList< T >::Flush ( )

Flush all items.

Definition at line 1976 of file template.h.

◆ ForEach()

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

iterates all strings

Definition at line 2034 of file template.h.

◆ GetItemsInContainer()

template<class T >
uint owl::TBaseList< T >::GetItemsInContainer ( ) const
inline

Definition at line 956 of file template.h.

References owl::TBaseList< T >::Size().

◆ HasMember()

template<class T >
bool owl::TBaseList< T >::HasMember ( const T & t) const
inline

check item in container

Definition at line 2017 of file template.h.

◆ IsEmpty()

template<class T >
bool owl::TBaseList< T >::IsEmpty ( ) const
inline

Definition at line 955 of file template.h.

References owl::TBaseList< T >::Empty().

◆ IsFull()

template<class T >
bool owl::TBaseList< T >::IsFull ( ) const
inline

Definition at line 953 of file template.h.

◆ LastThat()

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

LastThat return last member.

Definition at line 2052 of file template.h.

◆ LowerBound()

template<class T >
int owl::TBaseList< T >::LowerBound ( ) const
inline

Definition at line 949 of file template.h.

◆ Pop()

template<class T >
T owl::TBaseList< T >::Pop ( )
inline

remove 1 item return data item

Definition at line 1952 of file template.h.

◆ Push()

template<class T >
void owl::TBaseList< T >::Push ( const T & data)
inline

add new item at begin of list

Definition at line 1938 of file template.h.

◆ PushBack()

template<class T >
void owl::TBaseList< T >::PushBack ( const T & data)
inline

add new item at end of list

Definition at line 1945 of file template.h.

◆ Remove()

template<class T >
bool owl::TBaseList< T >::Remove ( TBaseNode< T > * t)
protected

remove item from list not delete node

Definition at line 2062 of file template.h.

◆ Size()

template<class T >
uint owl::TBaseList< T >::Size ( ) const
inline

Definition at line 950 of file template.h.

References owl::TBaseList< T >::ItemSize.

◆ Top()

template<class T >
const T & owl::TBaseList< T >::Top ( )
inline

return top of list

Definition at line 1962 of file template.h.

◆ UpperBound()

template<class T >
int owl::TBaseList< T >::UpperBound ( ) const
inline

Definition at line 951 of file template.h.

References owl::TBaseList< T >::Size().

Friends And Related Symbol Documentation

◆ TBaseListIterator< T >

template<class T >
friend class TBaseListIterator< T >
friend

Definition at line 940 of file template.h.

Member Data Documentation

◆ First

template<class T >
TBaseNode<T>* owl::TBaseList< T >::First
protected

Definition at line 1003 of file template.h.

◆ ItemSize

template<class T >
uint owl::TBaseList< T >::ItemSize
protected

optimization for Size()

Definition at line 1005 of file template.h.

◆ Last

template<class T >
TBaseNode<T>* owl::TBaseList< T >::Last
protected

Definition at line 1004 of file template.h.

◆ NPOS

template<class T >
const auto owl::TBaseList< T >::NPOS = -1
staticprotected

Definition at line 1007 of file template.h.


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