Commit 5622c8c9 authored by Dominik Charousset's avatar Dominik Charousset

Add const overload for stream_manager::out

parent 803ba536
...@@ -111,6 +111,9 @@ public: ...@@ -111,6 +111,9 @@ public:
/// Returns the manager for downstream communication. /// Returns the manager for downstream communication.
virtual downstream_manager& out() = 0; virtual downstream_manager& out() = 0;
/// Returns the manager for downstream communication.
const downstream_manager& out() const;
/// Returns whether the manager has reached the end and can be discarded /// Returns whether the manager has reached the end and can be discarded
/// safely. /// safely.
virtual bool done() const = 0; virtual bool done() const = 0;
......
...@@ -194,6 +194,11 @@ bool stream_manager::generate_messages() { ...@@ -194,6 +194,11 @@ bool stream_manager::generate_messages() {
return false; return false;
} }
const downstream_manager& stream_manager::out() const {
// We restore the const when returning from this member function.
return const_cast<stream_manager*>(this)->out();
}
void stream_manager::cycle_timeout(size_t) { void stream_manager::cycle_timeout(size_t) {
// TODO: make pure virtual // TODO: make pure virtual
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment