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

This is the class used to store the name, and memory adddress, of the variables used in the model simulation. More...

#include <addresskeeper.h>

Collaboration diagram for AddressKeeper:
Collaboration graph

Public Member Functions

 AddressKeeper ()
 This is the default AddressKeeper constructor. More...
 
 AddressKeeper (const AddressKeeper &initial)
 This is the AddressKeeper constructor that creates a copy of an existing AddressKeeper. More...
 
 ~AddressKeeper ()
 This is the default AddressKeeper destructor. More...
 
void operator= (double *address)
 This operator will set the address of the AddressKeeper equal to an existing address. More...
 
void operator= (double &value)
 This operator will set the address of the AddressKeeper equal to an existing vale. More...
 
int operator== (const double &value)
 This operator will check to see if the address for the AddressKeeper is equal to an existing address. More...
 
int operator== (const double *address)
 This operator will check to see if the address for the AddressKeeper is equal to an existing address. More...
 
void operator= (const char *str)
 This operator will set the name of the AddressKeeper equal to an existing string. More...
 
void operator= (const AddressKeeper a)
 This operator will set the AddressKeeper equal to an existing AddressKeeper. More...
 
const char * getName () const
 This will return a null terminated text string containing the name of the stored variable. More...
 

Public Attributes

double * addr
 This is the memory address where the value of the variable is stored. More...
 

Detailed Description

This is the class used to store the name, and memory adddress, of the variables used in the model simulation.

Constructor & Destructor Documentation

◆ AddressKeeper() [1/2]

AddressKeeper::AddressKeeper ( )
inline

This is the default AddressKeeper constructor.

◆ AddressKeeper() [2/2]

AddressKeeper::AddressKeeper ( const AddressKeeper initial)
inline

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

Parameters
initialis the AddressKeeper to copy

◆ ~AddressKeeper()

AddressKeeper::~AddressKeeper ( )
inline

This is the default AddressKeeper destructor.

Member Function Documentation

◆ getName()

const char* AddressKeeper::getName ( ) const
inline

This will return a null terminated text string containing the name of the stored variable.

Returns
name

◆ operator=() [1/4]

void AddressKeeper::operator= ( const AddressKeeper  a)
inline

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

Parameters
ais the AddressKeeper to copy

◆ operator=() [2/4]

void AddressKeeper::operator= ( const char *  str)
inline

This operator will set the name of the AddressKeeper equal to an existing string.

Parameters
stris the string to copy

◆ operator=() [3/4]

void AddressKeeper::operator= ( double &  value)
inline

This operator will set the address of the AddressKeeper equal to an existing vale.

Parameters
valueis the value to copy

◆ operator=() [4/4]

void AddressKeeper::operator= ( double *  address)
inline

This operator will set the address of the AddressKeeper equal to an existing address.

Parameters
addressis the address to copy

◆ operator==() [1/2]

int AddressKeeper::operator== ( const double &  value)
inline

This operator will check to see if the address for the AddressKeeper is equal to an existing address.

Parameters
valueis the address to check
Returns
1 if the two addresses are equal, 0 otherwise

◆ operator==() [2/2]

int AddressKeeper::operator== ( const double *  address)
inline

This operator will check to see if the address for the AddressKeeper is equal to an existing address.

Parameters
addressis the address to check
Returns
1 if the two addresses are equal, 0 otherwise

Member Data Documentation

◆ addr

double* AddressKeeper::addr

This is the memory address where the value of the variable is stored.


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