Changeset 98a2987 for molecuilder/src/Views
- Timestamp:
- Feb 26, 2010, 12:40:52 PM (15 years ago)
- Children:
- e65cc0
- Parents:
- 33bc66
- Location:
- molecuilder/src/Views
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/Views/MethodStringView.cpp
r33bc66 r98a2987 7 7 8 8 #include "MethodStringView.hpp" 9 10 using namespace std; 9 11 10 12 MethodStringView::MethodStringView(boost::function<string()> _displayMethod) : -
molecuilder/src/Views/MethodStringView.hpp
r33bc66 r98a2987 19 19 { 20 20 public: 21 MethodStringView(boost::function<st ring()>);21 MethodStringView(boost::function<std::string()>); 22 22 virtual ~MethodStringView(); 23 23 24 virtual const st ring toString();24 virtual const std::string toString(); 25 25 26 26 private: 27 boost::function<st ring()> displayMethod;27 boost::function<std::string()> displayMethod; 28 28 }; 29 29 -
molecuilder/src/Views/StreamStringView.cpp
r33bc66 r98a2987 7 7 8 8 #include <sstream> 9 #include <iostream> 9 10 10 11 #include "StreamStringView.hpp" 11 12 12 StreamStringView::StreamStringView(boost::function<void(ofstream *)> _displayMethod) : 13 using namespace std; 14 15 StreamStringView::StreamStringView(boost::function<void(ostream *)> _displayMethod) : 13 16 StringView(), 14 17 displayMethod(_displayMethod) 15 { 16 // TODO Auto-generated constructor stub 17 18 } 18 {} 19 19 20 20 StreamStringView::~StreamStringView() 21 { 22 // TODO Auto-generated destructor stub 23 } 21 {} 24 22 25 23 const string StreamStringView::toString() { 26 24 stringstream s; 27 displayMethod( (ofstream *)&s);25 displayMethod(dynamic_cast<ostream *>(&s)); 28 26 return s.str(); 29 27 } -
molecuilder/src/Views/StreamStringView.hpp
r33bc66 r98a2987 10 10 11 11 #include <boost/function.hpp> 12 #include <iostream> 12 13 13 14 #include "Views/StringView.hpp" … … 24 25 { 25 26 public: 26 StreamStringView(boost::function<void( ofstream *)>);27 StreamStringView(boost::function<void(std::ostream *)>); 27 28 virtual ~StreamStringView(); 28 29 29 virtual const st ring toString();30 virtual const std::string toString(); 30 31 31 32 private: 32 boost::function<void( ofstream *)> displayMethod;33 boost::function<void(std::ostream *)> displayMethod; 33 34 }; 34 35 -
molecuilder/src/Views/StringView.hpp
r33bc66 r98a2987 12 12 #include "Views/View.hpp" 13 13 14 using namespace std;15 16 14 /** 17 15 * View to show something as a string … … 26 24 virtual ~StringView(); 27 25 28 virtual const st ring toString()=0;26 virtual const std::string toString()=0; 29 27 }; 30 28
Note:
See TracChangeset
for help on using the changeset viewer.