]> Creatis software - cpPlugins.git/blob - lib/cpPluginsBase/BinaryAddFunctor.cxx
Moved to version 1.0
[cpPlugins.git] / lib / cpPluginsBase / BinaryAddFunctor.cxx
1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4
5 #include <random>
6 #include <cpPluginsBase/BinaryAddFunctor.h>
7
8 // -------------------------------------------------------------------------
9 cpPluginsBase::BinaryAddFunctor::
10 BinaryAddFunctor( )
11   : Superclass( )
12 {
13 }
14
15 // -------------------------------------------------------------------------
16 cpPluginsBase::BinaryAddFunctor::
17 ~BinaryAddFunctor( )
18 {
19 }
20
21 // -------------------------------------------------------------------------
22 void cpPluginsBase::BinaryAddFunctor::
23  _Configure( )
24 {
25   this->ConfigureInValue< TReal >( "FirstNumber" );
26   this->ConfigureInValue< TReal >( "SecondNumber" );
27   this->ConfigureOutValue< TReal >( "Result" );
28 }
29
30 // -------------------------------------------------------------------------
31 void cpPluginsBase::BinaryAddFunctor::
32 _GenerateData( )
33 {
34   TReal a = TReal( this->GetInValue( "FirstNumber" ) );
35   TReal b = TReal( this->GetInValue( "SecondNumber" ) );
36
37   // Configure a random number as output
38   this->SetOutValue( "Result", a + b );
39 }
40
41 // eof - $RCSfile$