Gadget
Public Member Functions | Friends | List of all members
Formula Class Reference

This is the class used to calculate the value of the variables used in the model simulation. More...

#include <formula.h>

Collaboration diagram for Formula:
Collaboration graph

Public Member Functions

 Formula ()
 This is the default Formula constructor. More...
 
 Formula (double initial)
 This is the Formula constructor that creates a Formula with a given initial value. More...
 
 Formula (const Formula &initial)
 This is the Formula constructor that creates a copy of an existing Formula. More...
 
 Formula (FunctionType ft, vector< Formula * > formlist)
 This is the Formula constructor for a given function type and list of parameters. More...
 
 ~Formula ()
 This is the default Formula destructor. More...
 
void setValue (double init)
 This function will set the value of the Formula. More...
 
 operator double () const
 This operator will return the value of the Formula. More...
 
void Interchange (Formula &newF, Keeper *keeper) const
 This function will swap the Formula value for a new value. More...
 
void Inform (Keeper *keeper)
 This function will inform the Keeper for the current model of the new Formula. More...
 
void Delete (Keeper *keeper) const
 This function will delete a Formula value. More...
 
Formulaoperator= (const Formula &F)
 This operator will set the Formula equal to an existing Formula. More...
 
FormulaType getType () const
 This will return the type of Formula class. More...
 

Friends

CommentStreamoperator>> (CommentStream &infile, Formula &F)
 This operator will read data from a CommentStream into a Formula. More...
 

Detailed Description

This is the class used to calculate the value of the variables used in the model simulation.

Constructor & Destructor Documentation

◆ Formula() [1/4]

Formula::Formula ( )

This is the default Formula constructor.

◆ Formula() [2/4]

Formula::Formula ( double  initial)

This is the Formula constructor that creates a Formula with a given initial value.

Parameters
initialis the initial vlaue for the Formula

◆ Formula() [3/4]

Formula::Formula ( const Formula initial)

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

Parameters
initialis the Formula to copy

◆ Formula() [4/4]

Formula::Formula ( FunctionType  ft,
vector< Formula * >  formlist 
)

This is the Formula constructor for a given function type and list of parameters.

Parameters
ftis the FunctionType for the new Formula function
formlistis the vector of arguments for the new Formula function

◆ ~Formula()

Formula::~Formula ( )

This is the default Formula destructor.

Member Function Documentation

◆ Delete()

void Formula::Delete ( Keeper keeper) const

This function will delete a Formula value.

Parameters
keeperis the Keeper for the current model

◆ getType()

FormulaType Formula::getType ( ) const
inline

This will return the type of Formula class.

Returns
type

◆ Inform()

void Formula::Inform ( Keeper keeper)

This function will inform the Keeper for the current model of the new Formula.

Parameters
keeperis the Keeper for the current model

◆ Interchange()

void Formula::Interchange ( Formula newF,
Keeper keeper 
) const

This function will swap the Formula value for a new value.

Parameters
newFis the new Formula value
keeperis the Keeper for the current model

◆ operator double()

Formula::operator double ( ) const

This operator will return the value of the Formula.

Returns
the value of the Formula

◆ operator=()

Formula & Formula::operator= ( const Formula F)

This operator will set the Formula equal to an existing Formula.

Parameters
Fis the Formula to copy

◆ setValue()

void Formula::setValue ( double  init)

This function will set the value of the Formula.

Parameters
initis the value of the Formula

Friends And Related Function Documentation

◆ operator>>

CommentStream& operator>> ( CommentStream infile,
Formula F 
)
friend

This operator will read data from a CommentStream into a Formula.

Parameters
infileis the CommentStream to read from
Fis the Formula used to store the data

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