fw4spl
|
Base class for all fwActivities activity validator's classes. More...
#include <IActivityValidator.hpp>
Public Member Functions | |
virtual bool | isA (const std::string &type) const override |
virtual FWACTIVITIES_API ValidationType | validate (const ::fwActivities::registry::ActivityInfo &, const std::shared_ptr< const ::fwData::Vector > &) const override |
Does nothing. | |
virtual FWACTIVITIES_API ValidationType | validate (const std::shared_ptr< const ::fwMedData::ActivitySeries > &activity) const =0 |
Performs the validation of the given activity data. More... | |
FWACTIVITIES_API ValidationType | checkRequirements (const std::shared_ptr< const ::fwMedData::ActivitySeries > &activity) const |
Checks if all the required data are present in the activity series. More... | |
FWACTIVITIES_API ValidationType | checkParameters (const std::shared_ptr< const ::fwMedData::ActivitySeries > &activity) const |
Checks if all the activity's AppConfig parameters are valid. More... | |
FWACTIVITIES_API ValidationType | checkObject (const std::shared_ptr< const ::fwData::Object > &object, const std::string &validatorImpl) const |
Calls the object validator if it is defined. More... | |
Public Member Functions inherited from fwActivities::IValidator | |
Public Member Functions inherited from fwCore::BaseObject | |
virtual const std::string & | getLeafClassname () const |
return object's classname without its namespace, i.e. BaseObject | |
Static Public Member Functions | |
static bool | isTypeOf (const std::string &type) |
Static Public Member Functions inherited from fwActivities::IValidator | |
static bool | isTypeOf (const std::string &type) |
static const std::string & | classname () |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
Static Public Member Functions inherited from fwCore::BaseObject | |
static bool | isTypeOf (const std::string &type) |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Demangling methods | |
virtual const std::string & | getClassname () const override |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
static const std::string & | classname () |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
Additional Inherited Members | |
Public Types inherited from fwActivities::IValidator | |
typedef std::pair< bool, std::string > | ValidationType |
Defines validation result of an activity. First element tells if the activity is validated or not by the IValidator implementation. Second element may contains information about the result of activity validation. | |
typedef ::fwActivities::validator::factory::Key | Key |
Base class for all fwActivities activity validator's classes.
This validator allows to check if all the required data are valid for the activity.
Definition at line 29 of file IActivityValidator.hpp.
IValidator::ValidationType fwActivities::IActivityValidator::checkObject | ( | const std::shared_ptr< const ::fwData::Object > & | object, |
const std::string & | validatorImpl | ||
) | const |
Calls the object validator if it is defined.
object | object to validate |
validatorImpl | implementation of the validator to apply (if it is empty, check is assumed as valid). |
Process object validator
Definition at line 240 of file IActivityValidator.cpp.
Referenced by checkRequirements().
IValidator::ValidationType fwActivities::IActivityValidator::checkParameters | ( | const std::shared_ptr< const ::fwMedData::ActivitySeries > & | activity | ) | const |
Checks if all the activity's AppConfig parameters are valid.
It checks if the object described with "camp" path are present in the activity.
Definition at line 204 of file IActivityValidator.cpp.
References fwActivities::registry::Activities::getDefault().
IValidator::ValidationType fwActivities::IActivityValidator::checkRequirements | ( | const std::shared_ptr< const ::fwMedData::ActivitySeries > & | activity | ) | const |
Checks if all the required data are present in the activity series.
Definition at line 23 of file IActivityValidator.cpp.
References checkObject(), fwActivities::registry::ActivityRequirement::container, fwActivities::registry::ActivityRequirement::create, fwActivities::registry::Activities::getDefault(), fwActivities::registry::ActivityRequirement::keys, fwActivities::registry::ActivityRequirement::maxOccurs, fwActivities::registry::ActivityRequirement::minOccurs, fwActivities::registry::ActivityRequirement::type, and fwActivities::registry::ActivityRequirement::validator.
|
pure virtual |
Performs the validation of the given activity data.
Implemented in fwActivities::validator::DefaultActivity.