All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
OptionParser::PrintUsageImplementation::LinePartIterator Class Reference

#include <optionparser.h>

Public Member Functions

 LinePartIterator (const Descriptor usage[])
 Creates an iterator for usage. More...
 
bool nextTable ()
 Moves iteration to the next table (if any). More...
 
void restartTable ()
 Reset iteration to the beginning of the current table. More...
 
bool nextRow ()
 Moves iteration to the next row (if any). More...
 
void restartRow ()
 Reset iteration to the beginning of the current row. More...
 
bool next ()
 Moves iteration to the next part (if any). More...
 
int column ()
 Returns the index (counting from 0) of the column in which the part pointed to by data() is located. More...
 
int line ()
 Returns the index (counting from 0) of the line within the current column this part belongs to. More...
 
int length ()
 Returns the length of the part pointed to by data() in raw chars (not UTF-8 characters). More...
 
int screenLength ()
 Returns the width in screen columns of the part pointed to by data(). More...
 
const char * data ()
 Returns the current part of the iteration. More...
 

Constructor & Destructor Documentation

OptionParser::PrintUsageImplementation::LinePartIterator::LinePartIterator ( const Descriptor  usage[])
inline

Creates an iterator for usage.

Member Function Documentation

int OptionParser::PrintUsageImplementation::LinePartIterator::column ( )
inline

Returns the index (counting from 0) of the column in which the part pointed to by data() is located.

const char* OptionParser::PrintUsageImplementation::LinePartIterator::data ( )
inline

Returns the current part of the iteration.

int OptionParser::PrintUsageImplementation::LinePartIterator::length ( )
inline

Returns the length of the part pointed to by data() in raw chars (not UTF-8 characters).

int OptionParser::PrintUsageImplementation::LinePartIterator::line ( )
inline

Returns the index (counting from 0) of the line within the current column this part belongs to.

bool OptionParser::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.

bool OptionParser::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.
bool OptionParser::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.
void OptionParser::PrintUsageImplementation::LinePartIterator::restartRow ( )
inline

Reset iteration to the beginning of the current row.

void OptionParser::PrintUsageImplementation::LinePartIterator::restartTable ( )
inline

Reset iteration to the beginning of the current table.

int OptionParser::PrintUsageImplementation::LinePartIterator::screenLength ( )
inline

Returns the width in screen columns of the part pointed to by data().

Takes multi-byte UTF-8 sequences and wide characters into account.


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