-
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.
Moved Scalar Variable to its own class
- Loading branch information
Showing
5 changed files
with
55 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* ScalarVariable.cpp | ||
* | ||
* Created on: Apr 26, 2013 | ||
* Author: jimtahu | ||
*/ | ||
|
||
#include "ScalarVariable.h" | ||
|
||
ScalarVariable::ScalarVariable(string name):Variable(name){ | ||
this->Value=""; | ||
} | ||
|
||
ScalarVariable::ScalarVariable(ScalarVariable &other):Variable(other){ | ||
this->Value=other.GetValue(); | ||
} | ||
|
||
string ScalarVariable::GetValue(void){ | ||
return this->Value; | ||
} | ||
|
||
void ScalarVariable::SetValue(string value){ | ||
this->Value=value; | ||
} | ||
|
||
ScalarVariable::~ScalarVariable() { | ||
// 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,23 @@ | ||
/* | ||
* ScalarVariable.h | ||
* | ||
* Created on: Apr 26, 2013 | ||
* Author: jimtahu | ||
*/ | ||
|
||
#ifndef SCALARVARIABLE_H_ | ||
#define SCALARVARIABLE_H_ | ||
|
||
#include "Variable.h" | ||
|
||
class ScalarVariable: public Variable { | ||
string Value; | ||
public: | ||
ScalarVariable(string name); | ||
ScalarVariable(ScalarVariable &other); | ||
string GetValue(); | ||
void SetValue(string value); | ||
virtual ~ScalarVariable(); | ||
}; | ||
|
||
#endif /* SCALARVARIABLE_H_ */ |
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