HyperspaceExplorer 0.7.1
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
VertexData< D >::VertexDataPrinter Class Reference

Auxiliary class encapsulating printing and conversion to std::string. More...

Collaboration diagram for VertexData< D >::VertexDataPrinter:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

template<unsigned D>
class VertexData< D >::VertexDataPrinter

Auxiliary class encapsulating printing and conversion to std::string.

Todo:
This class is still a little chaotic.

Member Function Documentation

template<unsigned D>
std::string VertexData< D >::VertexDataPrinter::verticesToStringRow ( unsigned  base_index,
unsigned  num_columns 
) const [private]

Returns a line of num_columns vertices as string.

Parameters:
base_indexIndex of the first vertex that is printed.
num_columnsHow many vertices are printed in this row.

References std::ends().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:19 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo