Protocol++® (Protocolpp®)  v5.6.2
option::PrintUsageImplementation::LinePartIterator Class Reference

Public Member Functions

 LinePartIterator (const Descriptor usage[])
 Creates an iterator for usage.
 
bool nextTable ()
 Moves iteration to the next table (if any). Has to be called once on a new LinePartIterator to move to the 1st table. More...
 
void restartTable ()
 Reset iteration to the beginning of the current table.
 
bool nextRow ()
 Moves iteration to the next row (if any). Has to be called once after each call to nextTable() to move to the 1st row of the table. More...
 
void restartRow ()
 Reset iteration to the beginning of the current row.
 
bool next ()
 Moves iteration to the next part (if any). Has to be called once after each call to nextRow() to move to the 1st part of the row. More...
 
int column ()
 Returns the index (counting from 0) of the column in which the part pointed to by data() is located.
 
int line ()
 Returns the index (counting from 0) of the line within the current column this part belongs to.
 
int length ()
 Returns the length of the part pointed to by data() in raw chars (not UTF-8 characters).
 
int screenLength ()
 Returns the width in screen columns of the part pointed to by data(). Takes multi-byte UTF-8 sequences and wide characters into account.
 
const char * data ()
 Returns the current part of the iteration.
 

Member Function Documentation

◆ next()

bool option::PrintUsageImplementation::LinePartIterator::next ( )
inline

Moves iteration to the next part (if any). Has to be called once after each call to nextRow() to move to the 1st part of the row.

Return values
falseif moving to next part failed because no further part exists.

See LinePartIterator for details about the iteration.

◆ nextRow()

bool option::PrintUsageImplementation::LinePartIterator::nextRow ( )
inline

Moves iteration to the next row (if any). Has to be called once after each call to nextTable() to move to the 1st row of the table.

Return values
falseif moving to next row failed because no further row exists.
Here is the call graph for this function:

◆ nextTable()

bool option::PrintUsageImplementation::LinePartIterator::nextTable ( )
inline

Moves iteration to the next table (if any). Has to be called once on a new LinePartIterator to move to the 1st table.

Return values
falseif moving to next table failed because no further table exists.
Here is the call graph for this function:

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