Diffpack Documentation


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

SetSimplest(Type) Class Reference

set of complicated objects, arbitrary set size. More...

#include <SetSimplest_Type.h>

Inheritance diagram for SetSimplest(Type)::

HandleId List of all members.

Public Methods

 SetSimplest(Type) (int max_size=100)
 ~SetSimplest(Type) ()
int getNoMembers () const
Type& getMember (int i_)
const Type& getMember (int i_) const
Type& operator() (int i_)
const Type& operator() (int i_) const
bool ok () const
void add (Type &object)
void mark (int i_)
void removeMarks ()
void removeLast ()
void print (Os os) const
void scan (Is is, char startmark='\0', char sepmark='', char endmark=';')
void initIterator ()
bool next (Type *&object)

Detailed Description

set of complicated objects, arbitrary set size.

NAME: SetSimplest(Type) - set of complicated objects, arbitrary set size

DESCRIPTION:

The class enables the programmer to operate with a set of objects of arbitrary size. The set members are of class "Type". The functionality concerns functions that returns a reference or pointer to the i-th object in the set. Class "SetOfNo(Type)" has many more functions but is limited to the cases where class "Type" implements several operators like "operator+" and "operator=". The main application is when the programmer would like to read in an unknown number of objects from file. The various functions in the class will require that "Type" is a class that implements an "operator<<" and an "operator>>" function for use in conjunction with "Is" and "Os" input/output classes. Furthermore, class "Type" must have a constructor without arguments.


Constructor & Destructor Documentation

SetSimplest(Type)::SetSimplest_Type ( int max_size = 100 )
 

The constructor takes no arguments. Initialization is performed through the "scan" function which reads a file in a certain format. Note that initialization by the empty constructor of class "Type" and "Type scan" must be sufficient. The function "add" can also be used for adding new members to the set.

SetSimplest(Type)::~SetSimplest(Type) ( )
 


Member Function Documentation

void SetSimplest(Type)::add ( Type & object )
 

const Type & SetSimplest(Type)::getMember ( int i_ ) const [inline]
 

Type & SetSimplest(Type)::getMember ( int i_ ) [inline]
 

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

void SetSimplest(Type)::initIterator ( )
 

void SetSimplest(Type)::mark ( int i_ ) [inline]
 

bool SetSimplest(Type)::next ( Type *& object )
 

bool SetSimplest(Type)::ok ( ) const [inline]
 

const Type & SetSimplest(Type)::operator() ( int i_ ) const [inline]
 

Type & SetSimplest(Type)::operator() ( int i_ ) [inline]
 

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

void SetSimplest(Type)::removeLast ( )
 

void SetSimplest(Type)::removeMarks ( ) [inline]
 

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


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