OpenDaVINCI  4.16.0
MessageResolver.h
Go to the documentation of this file.
1 
20 #ifndef MESSAGE_RESOLVER_H_
21 #define MESSAGE_RESOLVER_H_
22 
23 #include <map>
24 #include <string>
25 #include <vector>
26 
30 
31 namespace odcore {
32  namespace reflection {
33 
34  using namespace std;
35 
39  class HelperEntry {
40  public:
41  HelperEntry(const HelperEntry &/*obj*/);
42  HelperEntry& operator=(const HelperEntry &/*obj*/);
43 
44  public:
45  HelperEntry();
46  virtual ~HelperEntry();
47 
48  public:
49  string m_library;
52  };
53 
58  private:
66  MessageResolver(const MessageResolver &/*obj*/);
67 
76  MessageResolver& operator=(const MessageResolver &/*obj*/);
77 
78  public:
86  MessageResolver(const vector<string> &listOfAbsolutePathsToSearch, const string &libraryPrefixToMatch, const string &librarySuffixToMatch);
87 
88  virtual ~MessageResolver();
89 
97  odcore::reflection::Message resolve(odcore::data::Container &c, bool &successfullyMapped);
98 
99  private:
100  void findAndLoadSharedLibraries();
101  void unloadSharedLibraries();
102  vector<string> getListOfLibrariesToLoad(const vector<string> &paths);
103 
104  private:
105  string m_libraryPrefixToMatch;
106  string m_librarySuffixToMatch;
107  vector<string> m_listOfLibrariesToLoad;
108  vector<HelperEntry> m_listOfHelpers;
109  map<int32_t, HelperEntry> m_previouslyMatchedHelper;
110  };
111 
112  }
113 } // odcore::reflection
114 
115 #endif /*MESSAGE_RESOLVER_H_*/
Definition: MessageResolver.h:39
Definition: Container.h:40
void * m_dynamicObjectHandle
Definition: MessageResolver.h:50
Definition: Message.h:42
#define OPENDAVINCI_API
Definition: opendavinci.h:67
string m_library
Definition: MessageResolver.h:49
Definition: MessageResolver.h:57
odcore::reflection::Helper * m_helper
Definition: MessageResolver.h:51
Definition: Helper.h:35