Gadget
Public Member Functions | Protected Attributes | List of all members
FormulaVector Class Reference

This class implements a dynamic vector of Formula values. More...

#include <formulavector.h>

Collaboration diagram for FormulaVector:
Collaboration graph

Public Member Functions

 FormulaVector ()
 This is the default FormulaVector constructor. More...
 
 FormulaVector (int sz, Formula initial)
 This is the FormulaVector constructor for a specified size. More...
 
 FormulaVector (int sz, double initial)
 This is the FormulaVector constructor for a specified size. More...
 
 FormulaVector (const FormulaVector &initial)
 This is the FormulaVector constructor that creates a copy of an existing FormulaVector. More...
 
 ~FormulaVector ()
 This is the FormulaVector destructor. More...
 
void resize (int addsize, Keeper *keeper)
 This will add new blank (ie. NULL) entries to the vector. More...
 
void Delete (int pos, Keeper *keeper)
 This will delete an entry from the vector. More...
 
int Size () const
 This will return the size of the vector. More...
 
Formulaoperator[] (int pos)
 This will return the value of an element of the vector. More...
 
const Formulaoperator[] (int pos) const
 This will return the value of an element of the vector. More...
 
void Inform (Keeper *keeper)
 This function will inform Keeper of the values of the stored Formula. More...
 

Protected Attributes

int size
 This is the size of the vector. More...
 
Formulav
 This is the vector of Formula values. More...
 

Detailed Description

This class implements a dynamic vector of Formula values.

Constructor & Destructor Documentation

◆ FormulaVector() [1/4]

FormulaVector::FormulaVector ( )
inline

This is the default FormulaVector constructor.

◆ FormulaVector() [2/4]

FormulaVector::FormulaVector ( int  sz,
Formula  initial 
)

This is the FormulaVector constructor for a specified size.

Parameters
szis the size of the vector to be created
initialis the initial value for all the entries of the vector

◆ FormulaVector() [3/4]

FormulaVector::FormulaVector ( int  sz,
double  initial 
)

This is the FormulaVector constructor for a specified size.

Parameters
szis the size of the vector to be created
initialis the initial value for all the entries of the vector

◆ FormulaVector() [4/4]

FormulaVector::FormulaVector ( const FormulaVector initial)

This is the FormulaVector constructor that creates a copy of an existing FormulaVector.

Parameters
initialis the FormulaVector to copy

◆ ~FormulaVector()

FormulaVector::~FormulaVector ( )

This is the FormulaVector destructor.

Note
This will free all the memory allocated to all the elements of the vector

Member Function Documentation

◆ Delete()

void FormulaVector::Delete ( int  pos,
Keeper keeper 
)

This will delete an entry from the vector.

Parameters
posis the element of the vector to be deleted
keeperis the Keeper for the current model
Note
This will free the memory allocated to the deleted element of the vector

◆ Inform()

void FormulaVector::Inform ( Keeper keeper)

This function will inform Keeper of the values of the stored Formula.

Parameters
keeperis the Keeper for the current model

◆ operator[]() [1/2]

Formula& FormulaVector::operator[] ( int  pos)
inline

This will return the value of an element of the vector.

Parameters
posis the element of the vector to be returned
Returns
the value of the specified element

◆ operator[]() [2/2]

const Formula& FormulaVector::operator[] ( int  pos) const
inline

This will return the value of an element of the vector.

Parameters
posis the element of the vector to be returned
Returns
the value of the specified element

◆ resize()

void FormulaVector::resize ( int  addsize,
Keeper keeper 
)

This will add new blank (ie. NULL) entries to the vector.

Parameters
addsizeis the number of blank entries that will be entered
keeperis the Keeper for the current model
Note
The new elements of the vector will be created, and set to zero

◆ Size()

int FormulaVector::Size ( ) const
inline

This will return the size of the vector.

Returns
the size of the vector

Member Data Documentation

◆ size

int FormulaVector::size
protected

This is the size of the vector.

◆ v

Formula* FormulaVector::v
protected

This is the vector of Formula values.


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