dlvhex
2.5.0
|
Prints dlvhex IDs in differnt formats depending on the implementation in a subclass. More...
#include <include/dlvhex2/Printer.h>
Public Member Functions | |
Printer (std::ostream &out, Registry *registry) | |
Constructor. | |
Printer (std::ostream &out, RegistryPtr registry) | |
Constructor. | |
virtual | ~Printer () |
Destructor. | |
void | printmany (const Tuple &ids, const std::string &separator) |
Prints multiple IDs. | |
virtual void | print (ID id)=0 |
Prints a single ID. | |
Protected Attributes | |
std::ostream & | out |
Output stream to print to. | |
Registry * | registry |
Registry used for resolving IDs. |
Prints dlvhex IDs in differnt formats depending on the implementation in a subclass.
Printer::Printer | ( | std::ostream & | out, |
Registry * | registry | ||
) | [inline] |
Constructor.
out | See Printer::out. |
registry | See Printer::registry. |
Printer::Printer | ( | std::ostream & | out, |
RegistryPtr | registry | ||
) | [inline] |
Constructor.
out | See Printer::out. |
registry | See Printer::registry. |
virtual Printer::~Printer | ( | ) | [inline, virtual] |
virtual void Printer::print | ( | ID | id | ) | [pure virtual] |
Prints a single ID.
id | ID to print. |
Implemented in RawPrinter.
Referenced by printmany().
DLVHEX_NAMESPACE_BEGIN void Printer::printmany | ( | const Tuple & | ids, |
const std::string & | separator | ||
) |
Prints multiple IDs.
ids | Vector of IDs. |
separator | String to print between two IDs. |
Definition at line 46 of file Printer.cpp.
Referenced by DependencyGraph::createAuxiliaryRuleIfRequired(), GenuinePlainModelGeneratorFactory::GenuinePlainModelGeneratorFactory(), ParseState::parse(), PlainModelGeneratorFactory::PlainModelGeneratorFactory(), RawPrinter::print(), GuessAndCheckModelGeneratorFactory::print(), WellfoundedModelGeneratorFactory::print(), PlainModelGeneratorFactory::print(), GenuineWellfoundedModelGeneratorFactory::print(), GenuinePlainModelGeneratorFactory::print(), GenuineGuessAndCheckModelGeneratorFactory::print(), RewriteEDBIDBState::rewriteEDBIDB(), and QueryPlugin::setupProgramCtx().
std::ostream& Printer::out [protected] |
Output stream to print to.
Definition at line 53 of file Printer.h.
Referenced by RawPrinter::print(), printmany(), and RawPrinter::printWithoutPrefix().
Registry* Printer::registry [protected] |
Registry used for resolving IDs.
Definition at line 55 of file Printer.h.
Referenced by RawPrinter::print(), and RawPrinter::printWithoutPrefix().