dlvhex  2.5.0
include/dlvhex2/Printer.h File Reference

Printer classes for printing objects stored in registry given registry and ID. More...

#include "dlvhex2/PlatformDefinitions.h"
#include "dlvhex2/fwd.h"
#include "dlvhex2/ID.h"
#include <vector>
#include <string>
#include <iosfwd>
Include dependency graph for Printer.h:

Go to the source code of this file.

Data Structures

class  Printer
 Prints dlvhex IDs in differnt formats depending on the implementation in a subclass. More...
class  RawPrinter
 Prints IDs in human-readable format. More...

Functions

template<typename PrinterT >
std::string printToString (ID id, RegistryPtr reg)
 Prints an ID to a string.
template<typename PrinterT >
std::string printManyToString (const Tuple &ids, const std::string &separator, RegistryPtr reg)
 Prints multiple IDs to a string.

Detailed Description

Printer classes for printing objects stored in registry given registry and ID.

Author:
Peter Schueller
Date:

Definition in file Printer.h.


Function Documentation

template<typename PrinterT >
std::string printManyToString ( const Tuple ids,
const std::string &  separator,
RegistryPtr  reg 
)

Prints multiple IDs to a string.

Parameters:
idsVector of IDs to print.
separatorString to print between two IDs.
regRegistry used for resolving IDs.
Returns:
String representation of ids.

Definition at line 127 of file Printer.h.

template<typename PrinterT >
std::string printToString ( ID  id,
RegistryPtr  reg 
)

Prints an ID to a string.

Parameters:
regRegistry used for resolving IDs.
idID to print.
Returns:
String representation of id.

Definition at line 112 of file Printer.h.