fw4spl
IObjectValidator.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2016-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "fwActivities/config.hpp"
10 #include "fwActivities/IValidator.hpp"
11 
12 #include <fwCore/base.hpp>
13 
14 #include <fwMedData/ActivitySeries.hpp>
15 
16 namespace fwData
17 {
18 class Object;
19 }
20 
21 namespace fwActivities
22 {
23 
30 class FWACTIVITIES_CLASS_API IObjectValidator : public ::fwActivities::IValidator
31 {
32 
33 public:
34 
36 
37 
38  FWACTIVITIES_API virtual ValidationType validate(
39  const ::fwActivities::registry::ActivityInfo&,
40  const CSPTR(::fwData::Vector)& ) const override
41  {
42  ValidationType validation;
43  validation.first = true;
44  validation.second = "This validator does not validate this selection of data.";
45  return validation;
46  }
47 
52  FWACTIVITIES_API virtual ValidationType validate(const CSPTR(::fwData::Object)& currentData ) const = 0;
53 
54 };
55 
56 } // namespace fwActivities
#define CSPTR(_cls_)
Contains fwAtomsFilter::registry details.
#define fwCoreNonInstanciableClassDefinitionsMacro(_classinfo_)
Generate common code for Non Instanciable classes (Interfaces, Abstract classes, ...)
std::pair< bool, std::string > ValidationType
Defines validation result of an activity. First element tells if the activity is validated or not by ...
Definition: IValidator.hpp:39
Base class for all fwActivities data validator&#39;s classes.
Base class for all fwActivities validator&#39;s classes.
Definition: IValidator.hpp:29
Base class for each data object.
Namespace containing activities data and builder.
Contains the representation of the data objects used in the framework.