]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/ProcessObject.h
31379136eeb73f5d519420f9e8795c38593629ed
[cpPlugins.git] / lib / cpPlugins / Interface / ProcessObject.h
1 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
3
4 #include <map>
5 #include <string>
6 #include <cpPlugins/Interface/Object.h>
7
8 namespace cpPlugins
9 {
10   namespace Interface
11   {
12     class DataObject;
13
14     /**
15      */
16     class ProcessObject
17       : public Object
18     {
19     public:
20       typedef ProcessObject Self;
21       typedef Object        Superclass;
22
23       typedef std::pair< std::string, std::string > TParameter;
24       typedef std::map< std::string, TParameter >   TParameters;
25
26     public:
27       ProcessObject( );
28       virtual ~ProcessObject( );
29
30       virtual std::string GetClassName( ) const;
31       virtual const TParameters& GetDefaultParameters( ) const;
32       virtual void SetParameters( const TParameters& params );
33
34       virtual unsigned int GetNumberOfInputs( ) const;
35       virtual unsigned int GetNumberOfOutputs( ) const;
36
37       virtual void SetInput( unsigned int idx, const DataObject* dobj );
38       virtual DataObject* GetOutput( unsigned int idx ) const;
39
40       virtual std::string Update( );
41
42     protected:
43       virtual std::string _GenerateData( ) = 0;
44
45     protected:
46       TParameters m_DefaultParameters;
47       TParameters m_Parameters;
48
49       std::vector< const DataObject* > m_Inputs;
50       std::vector< DataObject* > m_Outputs;
51     };
52
53   } // ecapseman
54
55 } // ecapseman
56
57 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
58
59 // eof - $RCSfile$