00001 // written by png shao wei 00002 #include <string> 00003 #include "State.h" 00004 00005 void State::setVNamePrev(string str) { 00006 vnamePrev = str; 00007 } 00008 00009 void State::setVNameCurr(string str) { 00010 vnameCurr = str; 00011 } 00012 00013 void State::setObserved(bool o) { 00014 observed = o; 00015 } 00016 00017 const string State::getVNamePrev() const { 00018 return vnamePrev; 00019 } 00020 00021 const string State::getVNameCurr() const { 00022 return vnameCurr; 00023 } 00024 00025 const bool State::getObserved() const { 00026 return observed; 00027 } 00028 /* 00029 void State::setStateFunction(StateFunction* s) { 00030 sf = s; 00031 } 00032 00033 StateFunction* State:: getStateFunction() { 00034 return sf; 00035 }*/ 00036 00037 std::ostream& State::write(std::ostream& out) { 00038 out << "vnamePrev :" << vnamePrev << endl; 00039 out << "vnameCurr :" << vnameCurr << endl; 00040 out << "observation :" << observed << endl; 00041 out << "ValueEnum: " << endl; 00042 00043 for (unsigned int i = 0; i < valueEnum.size(); i++) { 00044 out << valueEnum[i] << "."; 00045 } 00046 return out; 00047 //copy(valueEnum.begin(), valueEnum.end(), ostream_iterator<string>(out, ", ")); 00048 00049 00050 }