hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
path-validation-report.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
4 //
5 // This file is part of hpp-core
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_CORE_PATH_VALIDATION_REPORT_HH
20 # define HPP_CORE_PATH_VALIDATION_REPORT_HH
21 
22 # include <hpp/util/indent.hh>
24 
25 namespace hpp {
26  namespace core {
29 
34  struct HPP_CORE_DLLAPI PathValidationReport :
35  public ValidationReport
36  {
39  , configurationReport() {}
41  const ValidationReportPtr_t& report) :
42  parameter (param), configurationReport (report)
43  {}
44 
45  virtual ~PathValidationReport () {};
46 
47  virtual std::ostream& print (std::ostream& os) const
48  {
49  os << "Invalid configuration at parameter " << parameter << iendl
50  << incindent;
51  if (!configurationReport) os << "No ValidationReport";
52  else os << *configurationReport;
53  return os << decindent;
54  }
55 
57  {
58  return parameter;
59  }
60 
62  {
63  parameter = p;
64  }
65 
69  }; // class PathValidationReport
71  } // namespace core
72 } // namespace hpp
73 
74 #endif // HPP_CORE_PATH_VALIDATION_REPORT_HH
Definition: validation-report.hh:36
boost::shared_ptr< ValidationReport > ValidationReportPtr_t
Definition: fwd.hh:206
HPP_UTIL_DLLAPI std::ostream & incindent(std::ostream &o)
ValidationReportPtr_t configurationReport
Definition: path-validation-report.hh:68
HPP_UTIL_DLLAPI std::ostream & iendl(std::ostream &o)
value_type getParameter()
Definition: path-validation-report.hh:56
PathValidationReport()
Definition: path-validation-report.hh:37
pinocchio::value_type value_type
Definition: fwd.hh:157
HPP_UTIL_DLLAPI std::ostream & decindent(std::ostream &o)
Definition: path-validation-report.hh:34
virtual std::ostream & print(std::ostream &os) const
Write report in a stream.
Definition: path-validation-report.hh:47
PathValidationReport(const value_type &param, const ValidationReportPtr_t &report)
Definition: path-validation-report.hh:40
value_type parameter
Parameter of the path where a invalid configuration has been found.
Definition: path-validation-report.hh:67
virtual ~PathValidationReport()
Definition: path-validation-report.hh:45
void setParameter(value_type p)
Definition: path-validation-report.hh:61