HyperspaceExplorer 0.7.1
|
Auxiliary class encapsulating printing and conversion to std::string. More...
Public Member Functions | |
VertexDataPrinter (VertexData *vertexData) | |
Initializes a VertexDataPrinter with a VertexData object. | |
void | printToStream (std::ostream &out) const |
Prints the VertexData object on stream out . | |
Private Member Functions | |
std::string | verticesToString (unsigned num_columns) const |
Returns all vertices as a string, sorted in num_columns columns. | |
void | printVertices (unsigned num_columns=PRINT_VERTICES_NUM_COLUMNS, std::ostream &out=std::cout) const |
Print vertices to an arbitrary std::ostream. | |
std::string | verticesToStringRow (unsigned base_index, unsigned num_columns) const |
Returns a line of num_columns vertices as string. | |
void | printVerticesRow (unsigned base_index, unsigned num_columns=PRINT_VERTICES_NUM_COLUMNS, std::ostream &out=std::cout) const |
Prints a line of num_columns vertices on out . | |
Private Attributes | |
VertexData * | _vertexData |
The VertexData object that is printed. | |
Static Private Attributes | |
static const int | PRINT_VERTICES_COLUMN_WIDTH = 40 |
How many characters fit in a column. | |
static const int | PRINT_VERTICES_NUM_COLUMNS = 2 |
In how many columns the output is ordered. |
Auxiliary class encapsulating printing and conversion to std::string.
std::string VertexData< D >::VertexDataPrinter::verticesToStringRow | ( | unsigned | base_index, |
unsigned | num_columns | ||
) | const [private] |
Returns a line of num_columns
vertices as string.
base_index | Index of the first vertex that is printed. |
num_columns | How many vertices are printed in this row. |
References std::ends().