Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

DpListBinH(Type) Class Reference

binary sorted list of class objects managed by handles. More...

#include <DpListBinH_Type.h>

List of all members.

Public Methods

 DpListBinH(Type) (;) DpListBinH(Type(const) DpListBinH(Type) &list_)
 ~DpListBinH(Type) (;) const DpListBinH(Type) &operator=(const DpListBinH(Type) &list_)
void add (const Type *item)
Type* remove (const int id)
Type* remove (const Type *item)
int size () const
Type* getItem (const int id) const
Type* getItemBefore (const int id) const
Type* operator[] (const int i) const
void unbindLastReturn ()


Detailed Description

binary sorted list of class objects managed by handles.

NAME: DpListBinH(Type) - binary sorted list of class objects managed by handles

DESCRIPTION:

This class implements a macro template for a binary sorted list of class objects that can be managed by handles. The classes that should be sorted must implement a member

   int getId() const;
which returns a unique identifier of the class. The parameter type ("Type") must be a class name and not a pointer.


Constructor & Destructor Documentation

DpListBinH(Type)::DpListBinH_Type ( ; ) const
 

DpListBinH(Type)::~DpListBinH(Type) ( ; ) const
 


Member Function Documentation

void DpListBinH(Type)::add ( const Type * item )
 

add a new item to the list.

Type * DpListBinH(Type)::getItem ( const int id ) const [inline]
 

return pointer to item with the given id, or NULL if not found.

Type * DpListBinH(Type)::getItemBefore ( const int id ) const [inline]
 

return pointer to the item in the list with largest id less or equal to the given id, or NULL if not found.

Type * DpListBinH(Type)::operator[] ( const int i ) const [inline]
 

Type * DpListBinH(Type)::remove ( const Type * item ) [inline]
 

See documentation of one of the overloaded functions.

Type * DpListBinH(Type)::remove ( const int id )
 

One version removes the item with supplied id, the other version of this function removes a specified object from the list. A pointer to the removed item is returned from the function.

int DpListBinH(Type)::size ( ) const [inline]
 

returns the number of items in the list.

void DpListBinH(Type)::unbindLastReturn ( ) [inline]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.