|
dlvhex
2.1.0
|
Helpers for printing objects to streams. More...
#include <boost/range/iterator_range.hpp>#include <boost/function.hpp>#include <boost/bind.hpp>#include <boost/optional.hpp>#include <iostream>#include <sstream>#include <set>#include <vector>

Go to the source code of this file.
Data Structures | |
| class | ostream_printable< T > |
| struct | print_container |
| struct | print_stream_container< T > |
| struct | print_method_container |
Functions | |
| std::ostream & | operator<< (std::ostream &o, print_container *c) |
| template<typename T > | |
| print_container * | print_method (const T &t) |
| print_container * | print_function (const print_method_container::PrintFn &fn) |
| template<typename T > | |
| print_container * | printopt (const boost::optional< T > &t) |
| template<typename T > | |
| print_container * | printptr (const boost::shared_ptr< T > &t) |
| template<typename T > | |
| print_container * | printptr (const boost::shared_ptr< const T > &t) |
| template<typename T > | |
| print_container * | printptr (const T *const t) |
| template<typename Range > | |
| print_container * | printrange (Range r, const char *open="<", const char *sep=",", const char *close=">") |
| template<typename T > | |
| print_container * | printset (const std::set< T > &t, const char *open="{", const char *sep=",", const char *close="}") |
| template<typename T > | |
| print_container * | printvector (const std::vector< T > &t, const char *open="[", const char *sep=",", const char *close="]") |
Helpers for printing objects to streams.
Definition in file Printhelpers.h.
| std::ostream& operator<< | ( | std::ostream & | o, |
| print_container * | c | ||
| ) | [inline] |
Definition at line 88 of file Printhelpers.h.
References print_container::print().
| print_container* print_function | ( | const print_method_container::PrintFn & | fn | ) | [inline] |
Definition at line 131 of file Printhelpers.h.
Referenced by State::changeState(), and OnlineModelBuilder< EvalGraphT >::printEUMBP().
| print_container* print_method | ( | const T & | t | ) | [inline] |
Definition at line 121 of file Printhelpers.h.
Referenced by OnlineModelBuilder< EvalGraphT >::advanceOModelForIModel().
| print_container* printopt | ( | const boost::optional< T > & | t | ) | [inline] |
| print_container* printptr | ( | const boost::shared_ptr< T > & | t | ) | [inline] |
Definition at line 147 of file Printhelpers.h.
Referenced by OfflineModelBuilder< EvalGraphT >::buildIModelsRecursively(), OfflineModelBuilder< EvalGraphT >::buildOModelsRecursively(), OnlineModelBuilder< EvalGraphT >::createIModelFromPredecessorOModels(), TestModelGeneratorFactory::createModelGenerator(), EvaluateState::evaluate(), ModelBuilder< EvalGraphT >::ModelProperties::print(), ExternalAtom::print(), OnlineModelBuilder< EvalGraphT >::printEUMBPhelper(), and OnlineModelBuilder< EvalGraphT >::printEvalGraphModelGraph().
| print_container* printptr | ( | const boost::shared_ptr< const T > & | t | ) | [inline] |
Definition at line 157 of file Printhelpers.h.
| print_container* printptr | ( | const T *const | t | ) | [inline] |
Definition at line 167 of file Printhelpers.h.
| print_container* printrange | ( | Range | r, |
| const char * | open = "<", |
||
| const char * | sep = ",", |
||
| const char * | close = ">" |
||
| ) | [inline] |
Definition at line 177 of file Printhelpers.h.
Referenced by BOOST_FIXTURE_TEST_CASE(), EvalHeuristicOldDlvhex::build(), EvalHeuristicEasy::build(), EvalHeuristicGreedy::build(), BaseModelGenerator::buildEAtomInputTuples(), ComponentGraph::calculateComponents(), EvalGraphBuilder::calculateNewEvalUnitInfos(), ComponentGraph::collapseComponents(), sem< StrongNegationParserModuleSemantics::stronglyNegatedPrefixAtom >::createAtom(), sem< HexGrammarSemantics::classicalAtomFromPrefix >::createAtom(), DependencyGraph::createAuxiliaryRuleIfRequired(), DumpingEvalGraphBuilder::createEvalUnit(), EvalGraphBuilder::createEvalUnit(), DependencyGraph::createHeadBodyUnifyingDependencies(), BaseModelGenerator::evaluateExternalAtom(), BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::output(), ComponentGraph::ComponentInfo::print(), ComfortInterpretation::print(), printset(), printvector(), ProgramCtx::processPluginOptions(), TestPluginAtomReach::retrieve(), TestSetMinusAtom::retrieve(), ComfortPluginAtom::retrieve(), internal::transitivePredecessorComponents(), internalgreedy::transitivePredecessorComponents(), and ComponentGraph::writeGraphVizComponentLabel().
| print_container* printset | ( | const std::set< T > & | t, |
| const char * | open = "{", |
||
| const char * | sep = ",", |
||
| const char * | close = "}" |
||
| ) | [inline] |
Definition at line 196 of file Printhelpers.h.
References printrange().
Referenced by FLPModelGeneratorFactoryBase::createEatomGuessingRules(), FLPModelGeneratorFactoryBase::createFLPRules(), CAUAlgorithms::AncestryMarkingVisitor< Graph >::examine_edge(), CAUAlgorithms::logAPM(), sem< QueryParserModuleSemantics::queryBody >::operator()(), ComfortPluginAtom::retrieve(), PredicateMask::updateMask(), and verifyModels().
| print_container* printvector | ( | const std::vector< T > & | t, |
| const char * | open = "[", |
||
| const char * | sep = ",", |
||
| const char * | close = "]" |
||
| ) | [inline] |
Definition at line 203 of file Printhelpers.h.
References printrange().
Referenced by MLPSolver::comp(), DependencyGraph::createAuxiliaryRuleIfRequired(), DependencyGraph::createHeadBodyUnifyingDependencies(), DependencyGraph::createHeadHeadUnifyingDependencies(), evalheur::executeBuildCommands(), ProcessBuf::open(), Rule::print(), OrdinaryAtom::print(), BuiltinAtom::print(), AggregateAtom::print(), Registry::print(), ExternalAtom::print(), ModuleAtom::print(), MLPSolver::replacedModuleAtoms(), OrdinaryAtom::unifiesWith(), and ComfortAtom::unifiesWith().