| … | … | @@ -31,6 +31,7 @@ |
| 31 | 31 | #include <opencog/atoms/value/VoidValue.h> |
| 32 | 32 | |
| 33 | 33 | #include <opencog/sensory/types/atom_types.h> |
| 34 | #include "TextStream.h" | |
| 34 | 35 | #include "TextStreamNode.h" |
| 35 | 36 | |
| 36 | 37 | using namespace opencog; |
| … | … | @@ -110,3 +111,11 @@ void TextStreamNode::do_write(const ValuePtr& content) |
| 110 | 111 | } |
| 111 | 112 | |
| 112 | 113 | // ============================================================== |
| 114 | ||
| 115 | // Override stream() to return TextStream instead of ReadStream | |
| 116 | ValuePtr TextStreamNode::stream(void) const | |
| 117 | { | |
| 118 | return createTextStream(get_handle()); | |
| 119 | } | |
| 120 | ||
| 121 | // ============================================================== |
| … | … | @@ -61,6 +61,9 @@ protected: |
| 61 | 61 | // Derived classes need to implement a handler. |
| 62 | 62 | virtual void do_write(const std::string&) = 0; |
| 63 | 63 | |
| 64 | // Override to return TextStream instead of ReadStream | |
| 65 | virtual ValuePtr stream(void) const; | |
| 66 | ||
| 64 | 67 | public: |
| 65 | 68 | virtual ~TextStreamNode(); |
| 66 | 69 | }; |