Skip to content
Snippets Groups Projects
Commit fee28ffc authored by Van Dung NGUYEN's avatar Van Dung NGUYEN
Browse files

function should be non-const

parent 387ea8e2
No related branches found
No related tags found
1 merge request!35updates jl gurs
...@@ -37,7 +37,7 @@ class IPStateBase{ ...@@ -37,7 +37,7 @@ class IPStateBase{
enum whichState{initial, previous, current, temp, activeDissipation}; enum whichState{initial, previous, current, temp, activeDissipation};
virtual IPVariable* getState(const whichState wst=IPStateBase::current) const=0; virtual IPVariable* getState(const whichState wst=IPStateBase::current) const=0;
virtual void restart()=0; virtual void restart()=0;
virtual void getAllIPVariable(std::vector<IPVariable*>& allIP) const = 0; virtual void getAllIPVariable(std::vector<IPVariable*>& allIP) = 0;
virtual void setLocation(const IPVariable::LOCATION loc){ virtual void setLocation(const IPVariable::LOCATION loc){
std::vector<IPVariable*> allIP; std::vector<IPVariable*> allIP;
...@@ -70,7 +70,10 @@ class IP1State : public IPStateBase{ ...@@ -70,7 +70,10 @@ class IP1State : public IPStateBase{
virtual IP1State & operator = (const IPStateBase &source); virtual IP1State & operator = (const IPStateBase &source);
IPVariable* getState(const whichState wst=IPStateBase::current) const; IPVariable* getState(const whichState wst=IPStateBase::current) const;
virtual void restart(); virtual void restart();
virtual void getAllIPVariable(std::vector<IPVariable*>& allIP) const {allIP.push_back(_current); }; virtual void getAllIPVariable(std::vector<IPVariable*>& allIP) {
allIP.clear();
allIP.push_back(_current);
};
}; };
class IP3State : public IPStateBase{ class IP3State : public IPStateBase{
...@@ -90,7 +93,8 @@ class IP3State : public IPStateBase{ ...@@ -90,7 +93,8 @@ class IP3State : public IPStateBase{
virtual IP3State & operator = (const IPStateBase &source); virtual IP3State & operator = (const IPStateBase &source);
IPVariable* getState(const whichState wst=IPStateBase::current) const; IPVariable* getState(const whichState wst=IPStateBase::current) const;
virtual void restart(); virtual void restart();
virtual void getAllIPVariable(std::vector<IPVariable*>& allIP) const { virtual void getAllIPVariable(std::vector<IPVariable*>& allIP) {
allIP.clear();
allIP.push_back(_initial); allIP.push_back(_initial);
allIP.push_back(_step1); allIP.push_back(_step1);
allIP.push_back(_step2); allIP.push_back(_step2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment