59 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
62 {
return new Impl( *
this ); }
67 : _pimpl( new
Impl() )
71 : _pimpl( new
Impl( std::move(description) ) )
75 : _pimpl( new
Impl( std::move(description), std::move(details) ) )
109 os <<
"Problem:" << endl;
110 os <<
"==============================" << endl;
113 os <<
"------------------------------" << endl;
115 os <<
"==============================" << endl;
120 {
return dumpRange( os, obj.begin(), obj.end(),
"",
"",
", ",
"",
"" ); }
std::list< ProblemSolution_Ptr > ProblemSolutionList
void addSolution(ProblemSolution_Ptr solution, bool inFront=false)
Add a solution to this problem.
~ResolverProblem()
Destructor.
const std::string & description() const
Return a one-line description of the problem.
Impl(std::string &&description, std::string &&details)
ResolverProblem implementation.
std::list< ResolverProblem_Ptr > ResolverProblemList
std::ostream & dumpRange(std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\n ", const std::string &sep="\n ", const std::string &sfx="\n", const std::string &extro="}")
Print range defined by iterators (multiline style).
std::ostream & operator<<(std::ostream &str, const Exception &obj)
void setDetails(std::string details)
Set detail description of the problem.
IMPL_PTR_TYPE(Application)
const std::string & details() const
Return a (possibly muti-line) detailed description of the problem or an empty string if there are no ...
Impl * clone() const
clone for RWCOW_pointer
RWCOW_pointer< Impl > _pimpl
ProblemSolutionList _solutions
Impl(std::string &&description)
Describe a solver problem and offer solutions.
ResolverProblem()
Constructor.
const ProblemSolutionList & solutions() const
Return the possible solutions to this problem.
void setDescription(std::string description)
Set description of the problem.