21 #ifndef _WORLDSTATE_HH_
22 #define _WORLDSTATE_HH_
103 public:
bool HasModelState(
const std::string &_modelName)
const;
109 public:
bool IsZero()
const;
137 _out <<
"<state world_name='" << _state.
name <<
"'>\n";
138 _out <<
" <sim_time>" << _state.
simTime <<
"</sim_time>\n";
139 _out <<
" <wall_time>" << _state.
wallTime <<
"</wall_time>\n";
140 _out <<
" <real_time>" << _state.
realTime <<
"</real_time>\n";
143 if (_state.insertions.size() > 0)
145 _out <<
" <insertions>\n";
146 for (std::vector<std::string>::const_iterator iter =
147 _state.insertions.begin();
148 iter != _state.insertions.end(); ++iter)
150 _out << *iter <<
"\n";
152 _out <<
" </insertions>\n";
156 if (_state.deletions.size() > 0)
158 _out <<
" <deletions>\n";
159 for (std::vector<std::string>::const_iterator iter =
160 _state.deletions.begin();
161 iter != _state.deletions.end(); ++iter)
163 _out <<
" <name>" << (*iter) <<
"</name>\n";
165 _out <<
" </deletions>\n";
169 for (std::vector<ModelState>::const_iterator iter =
170 _state.modelStates.begin(); iter != _state.modelStates.end();
176 _out <<
"</state>\n";
182 private: std::vector<ModelState> modelStates;
186 private: std::vector<std::string> insertions;
190 private: std::vector<std::string> deletions;