source:
molecuilder/src/Views/StreamStringView.cpp@
5dba7a
| Last change on this file since 5dba7a was 98a2987, checked in by , 16 years ago | |
|---|---|
|
|
| File size: 487 bytes | |
| Rev | Line | |
|---|---|---|
| [df55a0] | 1 | /* |
| 2 | * StreamStringView.cpp | |
| 3 | * | |
| 4 | * Created on: Dec 14, 2009 | |
| 5 | * Author: crueger | |
| 6 | */ | |
| 7 | ||
| 8 | #include <sstream> | |
| [98a2987] | 9 | #include <iostream> |
| [df55a0] | 10 | |
| 11 | #include "StreamStringView.hpp" | |
| 12 | ||
| [98a2987] | 13 | using namespace std; |
| 14 | ||
| 15 | StreamStringView::StreamStringView(boost::function<void(ostream *)> _displayMethod) : | |
| [df55a0] | 16 | StringView(), |
| 17 | displayMethod(_displayMethod) | |
| [98a2987] | 18 | {} |
| [df55a0] | 19 | |
| 20 | StreamStringView::~StreamStringView() | |
| [98a2987] | 21 | {} |
| [df55a0] | 22 | |
| 23 | const string StreamStringView::toString() { | |
| 24 | stringstream s; | |
| [98a2987] | 25 | displayMethod(dynamic_cast<ostream *>(&s)); |
| [df55a0] | 26 | return s.str(); |
| 27 | } |
Note:
See TracBrowser
for help on using the repository browser.
