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

This is the class used to store the name of a variable used in the model simulation. More...

#include <parameter.h>

Collaboration diagram for Parameter:
Collaboration graph

Public Member Functions

 Parameter ()
 This is the default Parameter constructor. More...
 
 Parameter (const Parameter &p)
 This is the Parameter constructor that creates a copy of an existing Parameter. More...
 
 Parameter (char *value)
 This is the Parameter constructor for a given string value. More...
 
 ~Parameter ()
 This is the default Parameter destructor. More...
 
char * getName () const
 This function will return the name of the Parameter. More...
 
Parameteroperator= (const Parameter &p)
 This operator will set the Parameter equal to an existing Parameter. More...
 
int operator== (const Parameter &p) const
 This operator will check to see if the Parameter is equal to an existing Parameter. More...
 
int isValidName (char *value)
 This function will check to see if the string that is going to be the name of the Parameter is valid or not. More...
 

Friends

CommentStreamoperator>> (CommentStream &infile, Parameter &p)
 This operator will read data from a CommentStream into a Parameter. More...
 
istream & operator>> (istream &infile, Parameter &p)
 This operator will read data from a istream into a Parameter. More...
 

Detailed Description

This is the class used to store the name of a variable used in the model simulation.

Constructor & Destructor Documentation

◆ Parameter() [1/3]

Parameter::Parameter ( )
inline

This is the default Parameter constructor.

◆ Parameter() [2/3]

Parameter::Parameter ( const Parameter p)

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

Parameters
pis the Parameter to copy

◆ Parameter() [3/3]

Parameter::Parameter ( char *  value)

This is the Parameter constructor for a given string value.

Parameters
valueis the string value that will be set to the name of the Parameter

◆ ~Parameter()

Parameter::~Parameter ( )

This is the default Parameter destructor.

Member Function Documentation

◆ getName()

char* Parameter::getName ( ) const
inline

This function will return the name of the Parameter.

Returns
name

◆ isValidName()

int Parameter::isValidName ( char *  value)

This function will check to see if the string that is going to be the name of the Parameter is valid or not.

Returns
1 if the name is valid, 0 otherwise

◆ operator=()

Parameter & Parameter::operator= ( const Parameter p)

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

Parameters
pis the Parameter to copy

◆ operator==()

int Parameter::operator== ( const Parameter p) const

This operator will check to see if the Parameter is equal to an existing Parameter.

Parameters
pis the Parameter to check
Returns
1 if the two Parameters are equal, 0 otherwise

Friends And Related Function Documentation

◆ operator>> [1/2]

CommentStream& operator>> ( CommentStream infile,
Parameter p 
)
friend

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

Parameters
infileis the CommentStream to read from
pis the Parameter used to store the data

◆ operator>> [2/2]

istream& operator>> ( istream &  infile,
Parameter p 
)
friend

This operator will read data from a istream into a Parameter.

Parameters
infileis the istream to read from
pis the Parameter used to store the data

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