Diffpack Documentation


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

SetDistinct(Type) Class Reference

a template class for distinct sets. More...

#include <SetDistinct_Type.h>

Inheritance diagram for SetDistinct(Type)::

HandleId List of all members.

Public Methods

 SetDistinct(Type) ()
 SetDistinct(Type) (const SetDistinct(Type) &set)
 ~SetDistinct(Type) ()
bool add (Type &object)
bool remove (Type &object)
int getNoMembers () const
bool member (const Type &object) const
void copy (const SetDistinct(Type) &set)
Type& getMember (int i)
const Type& getMember (int i) const
Type& operator() (int i)
const Type& operator() (int i) const
SetDistinct(Type)& operator= (const SetDistinct(Type) &set)
void heapsort ()
void sort ()
void remove ()
void convert2vector (VecSimplest(Type) &v) const
void print (Os os) const
void scan (Is is, char startmark='\0', char sepmark='', char endmark=';')

Friends

Osoperator<< (Os &os, const SetDistinct(Type) &x)
Isoperator>> (Is &is, SetDistinct(Type) &x)

Detailed Description

a template class for distinct sets.

NAME: SetDistinct - a template class for distinct sets

DESCRIPTION:

Class "SetDistinct" offers sets without mutiple entries(Distinct Set).


Constructor & Destructor Documentation

SetDistinct(Type)::SetDistinct_Type ( ) [inline]
 

The only constructor creates an empty set. The member function "add" are used to add new members into the set. Every new member is added at the end of the set.

SetDistinct(Type)::SetDistinct_Type ( const SetDistinct(Type) & set ) [inline]
 

See documentation of one of the overloaded constructor.

SetDistinct(Type)::~SetDistinct(Type) ( ) [inline]
 


Member Function Documentation

bool SetDistinct(Type)::add ( Type & object )
 

adds a new member into the set. If the member does not exit, add it into the set and return "true"; if the member already exits, then just return "false".

void SetDistinct(Type)::convert2vector ( VecSimplest(Type) & v ) const
 

copies the content of the set into a vector "VecSimplest(Type)".

void SetDistinct(Type)::copy ( const SetDistinct(Type) & set )
 

const Type & SetDistinct(Type)::getMember ( int i ) const [inline]
 

See documentation of one of the overloaded functions.

Type & SetDistinct(Type)::getMember ( int i ) [inline]
 

returns the member in a given position in the set.

int SetDistinct(Type)::getNoMembers ( ) const [inline]
 

returns the number of members in the set.

void SetDistinct(Type)::heapsort ( )
 

bool SetDistinct(Type)::member ( const Type & object ) const
 

check if a given object is part of the set.

const Type & SetDistinct(Type)::operator() ( int i ) const [inline]
 

Type & SetDistinct(Type)::operator() ( int i ) [inline]
 

SetDistinct(Type) & SetDistinct(Type)::operator= ( const SetDistinct(Type) & set ) [inline]
 

void SetDistinct(Type)::print ( Os os ) const
 

prints the set.

void SetDistinct(Type)::remove ( ) [inline]
 

See documentation of one of the overloaded functions.

bool SetDistinct(Type)::remove ( Type & object )
 

See documentation of one of the overloaded functions.

void SetDistinct(Type)::scan ( Is is,
char startmark = '\0',
char sepmark = ' ',
char endmark = ';' )
 

void SetDistinct(Type)::sort ( ) [inline]
 


Friends And Related Function Documentation

Os & operator<< ( Os & os,
const SetDistinct(Type) & x ) [friend]
 

Is & operator>> ( Is & is,
SetDistinct(Type) & x ) [friend]
 


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