-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started work on a class for variables.
- Loading branch information
Showing
6 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Variable.cpp | ||
* | ||
* Created on: Apr 25, 2013 | ||
* Author: jimtahu | ||
*/ | ||
|
||
#include "Variable.h" | ||
|
||
Variable::Variable(string name){ | ||
this->Name=name; | ||
} | ||
|
||
Variable::Variable(Variable &other){ | ||
this->Name=other.GetName(); | ||
this->Value=other.GetValue(); | ||
} | ||
|
||
string Variable::GetName(void){ | ||
return this->Name; | ||
} | ||
|
||
string Variable::GetValue(void){ | ||
return this->Value; | ||
} | ||
|
||
void Variable::SetValue(string value){ | ||
this->Value=value; | ||
} | ||
|
||
Variable::~Variable(){ | ||
// TODO Auto-generated destructor stub | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Variable.h | ||
* | ||
* Created on: Apr 25, 2013 | ||
* Author: jimtahu | ||
*/ | ||
|
||
#ifndef VARIABLE_H_ | ||
#define VARIABLE_H_ | ||
|
||
#include <string> | ||
|
||
using namespace std; | ||
|
||
class Variable { | ||
private: | ||
string Name; | ||
string Value; | ||
public: | ||
Variable(string name); | ||
Variable(Variable &other); | ||
string GetName(); | ||
string GetValue(); | ||
void SetValue(string value); | ||
virtual ~Variable(); | ||
}; | ||
|
||
#endif /* VARIABLE_H_ */ |