]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/ComponentInterface.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / ComponentInterface.h
1 /* =========================================================================
2  * @author ??? (???@javeriana.edu.co)
3  * @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
4  * =========================================================================
5  */
6 #ifndef __cpPlugins__Interface__ComponentInterface__h__
7 #define __cpPlugins__Interface__ComponentInterface__h__
8
9 /* TODO
10    #include <memory>
11    #include <string>
12    #include <dlfcn.h>
13    #include <cpPlugins/cpplugins_export.h>
14
15    namespace cpPlugins
16    {
17    namespace Interface
18    {
19    class CPPLUGINS_EXPORT ComponentInterface
20    : public std::enable_shared_from_this< ComponentInterface >
21    {
22    public:
23    typedef ComponentInterface Self;
24    typedef std::enable_shared_from_this< ComponentInterface > Superclass;
25
26    typedef void(*TDestructor)(char*, void*);
27    typedef void(*TUpdater)(char*, void*);
28    typedef void*(*TOutput)(char*, void*);
29    typedef void(*TInput)(char*, void*, void*);
30
31    // Variable definition
32    private:
33    TDestructor destructor;
34    TUpdater    updater;
35    TOutput  getOutput;
36    TInput   setInput;
37    std::string          lib_name;
38    std::string          component_name;
39    void*                component_reference;
40
41    // Method definition
42    public:
43    ComponentInterface(void* lib_handle, void* component_reference,
44    std::string component_name, std::string lib_name);
45    virtual ~ComponentInterface();
46    void        Update();
47    void        SetInput(void* input);
48    void*       GetOutput();
49    void*       GetComponent();
50    void        SetComponent(void* reference);
51    std::string GetLibraryName();
52    void        SetLibraryName(std::string lib_name);
53    std::string GetComponentName();
54    void        SetComponentName(std::string component_name);
55    void        SetComponentDestructor(void* lib_handle);
56    void        SetComponentUpdater(void* lib_handle);
57    };
58
59    } // ecapseman
60
61    } // ecapseman
62 */
63
64 #endif // __cpPlugins__Interface__ComponentInterface__h__
65
66 // eof - $RCSfile$