From c50004e8c83d18589167d1bb263b47c31238e776 Mon Sep 17 00:00:00 2001 From: Florent Lamiraux <florent@laas.fr> Date: Wed, 10 Dec 2014 13:48:53 +0100 Subject: [PATCH] Update to commit 07c3141 in hpp-core Add validation report classes for config and path validations. --- include/hpp/manipulation/fwd.hh | 1 + include/hpp/manipulation/graph-path-validation.hh | 13 +++++++++++++ src/graph-path-validation.cc | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/include/hpp/manipulation/fwd.hh b/include/hpp/manipulation/fwd.hh index b4bb59c..81189fd 100644 --- a/include/hpp/manipulation/fwd.hh +++ b/include/hpp/manipulation/fwd.hh @@ -96,6 +96,7 @@ namespace hpp { typedef core::DifferentiableFunctionPtr_t DifferentiableFunctionPtr_t; typedef core::ConfigurationShooter ConfigurationShooter; typedef core::ConfigurationShooterPtr_t ConfigurationShooterPtr_t; + typedef core::ValidationReport ValidationReport; typedef std::pair< GripperPtr_t, HandlePtr_t> Grasp_t; typedef boost::shared_ptr <Grasp_t> GraspPtr_t; diff --git a/include/hpp/manipulation/graph-path-validation.hh b/include/hpp/manipulation/graph-path-validation.hh index 402c007..15d9295 100644 --- a/include/hpp/manipulation/graph-path-validation.hh +++ b/include/hpp/manipulation/graph-path-validation.hh @@ -49,6 +49,19 @@ namespace hpp { /// the encapsulated PathValidation::validate. bool validate (const PathPtr_t& path, bool reverse, PathPtr_t& validPart); + /// Call the GraphPathValidation::validate without validation report. + /// + /// \param path the path to check for validity, + /// \param reverse if true check from the end, + /// \retval the extracted valid part of the path, pointer to path if + /// path is valid, + /// \retval report information about the validation process. unused in + /// this case, + /// \return whether the whole path is valid. + virtual bool validate (const PathPtr_t& path, bool reverse, + PathPtr_t& validPart, + ValidationReport& report); + /// Set the encapsulated path validator. void innerValidation (const PathValidationPtr_t& pathValidation) { diff --git a/src/graph-path-validation.cc b/src/graph-path-validation.cc index 99b216b..9104c20 100644 --- a/src/graph-path-validation.cc +++ b/src/graph-path-validation.cc @@ -39,6 +39,14 @@ namespace hpp { return success; } + bool GraphPathValidation::validate + (const PathPtr_t& path, bool reverse, PathPtr_t& validPart, + ValidationReport&) + { + assert (path); + return impl_validate (path, reverse, validPart); + } + bool GraphPathValidation::impl_validate ( const PathVectorPtr_t& path, bool reverse, PathPtr_t& validPart) { -- GitLab