File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed
Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 11#include " Store.h"
22
3- using namespace ToolFramework ;
3+ namespace ToolFramework {
44
55Store::Store (){}
66
@@ -211,3 +211,17 @@ bool Store::Destring(std::string key){
211211 return true ;
212212
213213}
214+
215+ std::ostream& operator <<(std::ostream& stream, const Store& s){
216+ stream<<" {" ;
217+ bool first=true ;
218+ for (auto it=s.m_variables .begin (); it!=s.m_variables .end (); ++it){
219+ if (!first) stream<<" , " ;
220+ stream<<" \" " <<it->first <<" \" :" << it->second ;
221+ first=false ;
222+ }
223+ stream<<" }" ;
224+ return stream;
225+ }
226+
227+ }
Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ namespace ToolFramework{
204204 stream<<" {" ;
205205 bool first=true ;
206206 for (std::map<std::string,std::string>::iterator it=m_variables.begin (); it!=m_variables.end (); ++it){
207- if (!first) stream<<" ," ;
208- stream<<" \" " <<it->first <<" \" :" << it->second << " " ;
207+ if (!first) stream<<" , " ;
208+ stream<<" \" " <<it->first <<" \" :" << it->second ;
209209
210210 first=false ;
211211 }
@@ -215,6 +215,8 @@ namespace ToolFramework{
215215
216216 }
217217
218+ friend std::ostream& operator <<(std::ostream &stream, const Store &s);
219+
218220 std::map<std::string, std::string>::iterator begin () { return m_variables.begin (); }
219221 std::map<std::string, std::string>::iterator end () { return m_variables.end (); }
220222
@@ -227,6 +229,7 @@ namespace ToolFramework{
227229
228230 };
229231
230- }
232+ } // end ToolFramework namespace
233+
231234
232235#endif
You can’t perform that action at this time.
0 commit comments