Iterator for traversing output line-by-line. More...
#include <SshOutputCollector.h>
Public Member Functions | |
iterator (std::vector< Buffer > &buffers, size_t index=0) | |
Constructor. More... | |
Private Member Functions | |
void | increment () |
Increment to next output line. More... | |
bool | equal (iterator const &other) const |
Equality comparison. More... | |
const std::string & | dereference () const |
Returns next line. More... | |
Private Attributes | |
std::vector< Buffer > & | m_buffers |
Output buffers. More... | |
size_t | m_index {} |
Index of buffer in m_buffers holding start of current line of output. More... | |
size_t | m_offset {} |
Offset within current buffer of start of current line of output. More... | |
size_t | m_next_index {} |
Index of buffer in m_buffers holding start of next line of output. More... | |
size_t | m_next_offset {} |
Offset within next buffer of start of next line of output. More... | |
std::string | m_line |
Current line of output. More... | |
Friends | |
class | boost::iterator_core_access |
Iterator for traversing output line-by-line.
Definition at line 83 of file SshOutputCollector.h.
|
inline |
Constructor.
buffers | vector of buffers |
index | Starting buffer index |
Definition at line 88 of file SshOutputCollector.h.
|
inlineprivate |
Returns next line.
This method returns the line stored in m_line bye the increment() function.
Definition at line 114 of file SshOutputCollector.h.
|
inlineprivate |
Equality comparison.
Returns true if the m_index and m_offset members are equal.
other | Iterator with which to compare |
other
, false otherwise. Definition at line 105 of file SshOutputCollector.h.
|
private |
Increment to next output line.
This function fills m_line with the next line of output.
Definition at line 36 of file SshOutputCollector.cc.
|
friend |
Definition at line 94 of file SshOutputCollector.h.
|
private |
Output buffers.
Definition at line 117 of file SshOutputCollector.h.
|
private |
Index of buffer in m_buffers holding start of current line of output.
Definition at line 119 of file SshOutputCollector.h.
|
private |
Current line of output.
Definition at line 127 of file SshOutputCollector.h.
|
private |
Index of buffer in m_buffers holding start of next line of output.
Definition at line 123 of file SshOutputCollector.h.
|
private |
Offset within next buffer of start of next line of output.
Definition at line 125 of file SshOutputCollector.h.
|
private |
Offset within current buffer of start of current line of output.
Definition at line 121 of file SshOutputCollector.h.