Program listing for file kernel/src/modelingTools/PluggedObject.hpp#
Return to documentation for this file
1#ifndef PluggedObject_H
2#define PluggedObject_H
3
4#include <string>
5#include "SiconosSerialization.hpp"
6#include "SiconosPointers.hpp"
7
8
9
10
11
12class PluggedObject
13{
14private:
15
16
17 ACCEPT_SERIALIZATION(PluggedObject);
18
19protected:
20
21
22 std::string _pluginName;
23
24public:
25
26
27 void * fPtr;
28
29
30 PluggedObject();
31
32
33 PluggedObject(const std::string& name);
34
35
36 PluggedObject(const PluggedObject & PO);
37
38
39 inline bool isPlugged() const
40 {
41 return (fPtr != nullptr);
42 };
43
44
45 virtual ~PluggedObject();
46
47
48 void setComputeFunction(const std::string& pluginPath, const std::string& functionName);
49
50
51 void setComputeFunction(const std::string& plugin);
52
53
54 void setComputeFunction(void);
55
56
57 inline void setComputeFunction(void* functionPtr)
58 {
59 fPtr = functionPtr;
60 _pluginName = "Unknown";
61 };
62
63
64 inline std::string pluginName(void) const
65 {
66 return _pluginName;
67 };
68
69};
70
71#endif