Set Class Reference

#include <set.h>

Collaboration diagram for Set:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Set ()
 Set (Data data)
 operator Data ()
Setoperator= (Array< 1, Data > &arr)
void add (const Data &element)
int size ()
Dataoperator[] (int i)


Detailed Description

A set interpretation of an array. The add function will extend the array by doubling its size.

Definition at line 36 of file set.h.


Constructor & Destructor Documentation

Set::Set (  )  [inline]

Initializes a set with no elements

Definition at line 82 of file set.h.

Set::Set ( Data  data  )  [inline]

Initialized the set with the given data, which is casted to an array.

Definition at line 91 of file set.h.


Member Function Documentation

void Set::add ( const Data element  ) 

Will add a new data element to the set

Definition at line 44 of file set.cpp.

Set::operator Data (  )  [inline]

The conversion to a data array is done by taking the appropriate view on the

Definition at line 100 of file set.h.

Set& Set::operator= ( Array< 1, Data > &  arr  )  [inline]

Sets the content of the set to the given array

Definition at line 109 of file set.h.

Data& Set::operator[] ( int  i  )  [inline]

Returns the data element at the given position

Definition at line 131 of file set.h.

int Set::size (  )  [inline]

Returns the size of the set

Definition at line 123 of file set.h.


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

Generated on Sat Feb 20 19:04:27 2010 for Data Objects by  doxygen 1.5.9