0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Hypertable::SshOutputCollector::iterator Class Reference

Iterator for traversing output line-by-line. More...

#include <SshOutputCollector.h>

Inheritance diagram for Hypertable::SshOutputCollector::iterator:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::SshOutputCollector::iterator:
Collaboration graph
[legend]

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
 

Detailed Description

Iterator for traversing output line-by-line.

Definition at line 83 of file SshOutputCollector.h.

Constructor & Destructor Documentation

Hypertable::SshOutputCollector::iterator::iterator ( std::vector< Buffer > &  buffers,
size_t  index = 0 
)
inline

Constructor.

Parameters
buffersvector of buffers
indexStarting buffer index

Definition at line 88 of file SshOutputCollector.h.

Member Function Documentation

const std::string& Hypertable::SshOutputCollector::iterator::dereference ( ) const
inlineprivate

Returns next line.

This method returns the line stored in m_line bye the increment() function.

Returns
Reference to next line

Definition at line 114 of file SshOutputCollector.h.

bool Hypertable::SshOutputCollector::iterator::equal ( iterator const &  other) const
inlineprivate

Equality comparison.

Returns true if the m_index and m_offset members are equal.

Parameters
otherIterator with which to compare
Returns
true if this iteratore is equal to other, false otherwise.

Definition at line 105 of file SshOutputCollector.h.

void SshOutputCollector::iterator::increment ( )
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.

Friends And Related Function Documentation

friend class boost::iterator_core_access
friend

Definition at line 94 of file SshOutputCollector.h.

Member Data Documentation

std::vector<Buffer>& Hypertable::SshOutputCollector::iterator::m_buffers
private

Output buffers.

Definition at line 117 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::iterator::m_index {}
private

Index of buffer in m_buffers holding start of current line of output.

Definition at line 119 of file SshOutputCollector.h.

std::string Hypertable::SshOutputCollector::iterator::m_line
private

Current line of output.

Definition at line 127 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::iterator::m_next_index {}
private

Index of buffer in m_buffers holding start of next line of output.

Definition at line 123 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::iterator::m_next_offset {}
private

Offset within next buffer of start of next line of output.

Definition at line 125 of file SshOutputCollector.h.

size_t Hypertable::SshOutputCollector::iterator::m_offset {}
private

Offset within current buffer of start of current line of output.

Definition at line 121 of file SshOutputCollector.h.


The documentation for this class was generated from the following files: