fw4spl
NumericOverflow.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-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 "fwAtomsPatch/conditions/Abstract.hpp"
10 #include "fwAtomsPatch/config.hpp"
11 
12 #include <fwAtoms/Numeric.hpp>
13 
14 namespace fwAtomsPatch
15 {
16 namespace conditions
17 {
21 class FWATOMSPATCH_CLASS_API NumericOverflow : public Abstract
22 {
23 public:
26 
28  FWATOMSPATCH_API virtual bool test(::fwAtoms::Base::sptr old, ::fwAtoms::Base::sptr newValue) override;
29 
31  FWATOMSPATCH_API virtual bool test(::fwAtoms::Base::sptr old) override;
32 
34  FWATOMSPATCH_API virtual void setTreshold(::fwAtoms::Numeric::sptr treshold);
35 
37  FWATOMSPATCH_API static NumericOverflow::sptr New(::fwAtoms::Base::sptr defaultValue);
38 
39 protected:
41  {
42  }
43  NumericOverflow(::fwAtoms::Base::sptr defaultValue);
44 
45  ::fwAtoms::Numeric::sptr m_treshold;
46 };
47 
48 } // namesapce conditions
49 } // namesapce fwAtomsPatch
fwAtoms contains basic objects to represent any other kind of object
Contains functions used to control patching process by defining conditions on objects.
Definition: Abstract.hpp:18
Contains base functionalities used to transform objects from a version to another.
Definition: Abstract.hpp:16
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
Defines a condition in the patch.
Definition: Abstract.hpp:25
Applies condition on numeric value.