Gadget
Public Member Functions | List of all members
TimeVariable Class Reference

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

#include <timevariable.h>

Collaboration diagram for TimeVariable:
Collaboration graph

Public Member Functions

 TimeVariable ()
 This is the default TimeVariable constructor. More...
 
 ~TimeVariable ()
 This is the default TimeVariable destructor. More...
 
void read (CommentStream &infile, const TimeClass *const TimeInfo, Keeper *const keeper)
 This function will read TimeVariable data from file. More...
 
double getValue () const
 This function will return the value of the TimeVariable. More...
 
void Interchange (TimeVariable &newTV, Keeper *const keeper) const
 This function will swap the TimeVariable value for a new value. More...
 
void Update (const TimeClass *const TimeInfo)
 This function will update the TimeVariable value. More...
 
void Delete (Keeper *const keeper) const
 This function will delete a TimeVariable value. More...
 
int didChange (const TimeClass *const TimeInfo)
 This function will check to see if the TimeVariable value has changed. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ TimeVariable()

TimeVariable::TimeVariable ( )
inline

This is the default TimeVariable constructor.

◆ ~TimeVariable()

TimeVariable::~TimeVariable ( )
inline

This is the default TimeVariable destructor.

Member Function Documentation

◆ Delete()

void TimeVariable::Delete ( Keeper *const  keeper) const

This function will delete a TimeVariable value.

Parameters
keeperis the Keeper for the current model

◆ didChange()

int TimeVariable::didChange ( const TimeClass *const  TimeInfo)

This function will check to see if the TimeVariable value has changed.

Parameters
TimeInfois the TimeClass for the current model
Returns
1 if the values have changed, 0 otherwise

◆ getValue()

double TimeVariable::getValue ( ) const
inline

This function will return the value of the TimeVariable.

Returns
the value of the TimeVariable

◆ Interchange()

void TimeVariable::Interchange ( TimeVariable newTV,
Keeper *const  keeper 
) const

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

Parameters
newTVis the new TimeVariable value
keeperis the Keeper for the current model

◆ read()

void TimeVariable::read ( CommentStream infile,
const TimeClass *const  TimeInfo,
Keeper *const  keeper 
)

This function will read TimeVariable data from file.

Parameters
infileis the CommentStream to read the data from
TimeInfois the TimeClass for the current model
keeperis the Keeper for the current model

◆ Update()

void TimeVariable::Update ( const TimeClass *const  TimeInfo)

This function will update the TimeVariable value.

Parameters
TimeInfois the TimeClass for the current model

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