Gadget
parameter.h
Go to the documentation of this file.
1 #ifndef parameter_h
2 #define parameter_h
3 
4 #include "commentstream.h"
5 #include "gadget.h"
6 
11 class Parameter {
12 public:
16  Parameter() { name = NULL; };
21  Parameter(const Parameter& p);
26  Parameter(char* value);
30  ~Parameter();
35  char* getName() const { return name; };
47  friend istream& operator >> (istream& infile, Parameter& p);
52  Parameter& operator = (const Parameter& p);
58  int operator == (const Parameter& p) const;
63  int isValidName(char* value);
64 private:
70  int isValidChar(int c);
74  char* name;
75 };
76 
77 #endif
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This is the class used to store the name of a variable used in the model simulation.
Definition: parameter.h:11
friend CommentStream & operator>>(CommentStream &infile, Parameter &p)
This operator will read data from a CommentStream into a Parameter.
Definition: parameter.cc:86
int operator==(const Parameter &p) const
This operator will check to see if the Parameter is equal to an existing Parameter.
Definition: parameter.cc:35
Parameter()
This is the default Parameter constructor.
Definition: parameter.h:16
~Parameter()
This is the default Parameter destructor.
Definition: parameter.cc:28
Parameter & operator=(const Parameter &p)
This operator will set the Parameter equal to an existing Parameter.
Definition: parameter.cc:39
char * getName() const
This function will return the name of the Parameter.
Definition: parameter.h:35
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 ...
Definition: parameter.cc:56