source: XMLIO_V2/dev/common/src/xmlio/functor.cpp @ 219

Last change on this file since 219 was 219, checked in by hozdoba, 13 years ago

Préparation nouvelle arborescence

File size: 1.6 KB
Line 
1#include "functor.hpp"
2
3namespace xmlioserver
4{
5   namespace func
6   {
7      /// ////////////////////// Définitions ////////////////////// ///
8
9      CFunctor::CFunctor(const StdString & id, ARRAY(double, 1) doutput)
10         : SuperClass(id), doutput(doutput)
11      { /* Ne rien faire de plus */  }
12
13      CFunctor::~CFunctor(void)
14      { /* Ne rien faire de plus */ }
15
16      //---------------------------------------------------------------
17
18      ARRAY(double, 1) CFunctor::getDataOutput(void) const
19      { 
20         return (this->doutput);
21      }
22
23      //---------------------------------------------------------------
24
25      StdString CFunctor::toString(void) const
26      {
27         ERROR("CFunctor::toString()", << "Not implemented yet !");
28         return (SuperClass::getId());
29      }
30
31      void CFunctor::fromString(const StdString & str)
32      {
33         ERROR("CFunctor::fromString(str)",
34                << "[ str = " << str << "] Not implemented yet !");
35      }
36
37      //---------------------------------------------------------------
38
39      ARRAY(double, 1) CFunctor::operator ()(const ARRAY(double, 1) dinput)
40      {
41         if (dinput->size() != this->doutput->size())
42            ERROR("CFunctor::operator ()(dinput)",
43                   << "[ input size = "  << dinput->size()
44                   << ", output size = " << this->doutput->size() << " ]"
45                   << " size of input array !=  size of output array !");
46         this->apply(dinput, this->doutput);
47         return (this->doutput);
48      }
49
50      //---------------------------------------------------------------
51
52   } // namespace func
53} // namespace xmlioserver
Note: See TracBrowser for help on using the repository browser.