YARP
Yet Another Robot Platform
SharedLibrary.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_OS_SHAREDLIBRARY_H
7 #define YARP_OS_SHAREDLIBRARY_H
8 
9 #include <yarp/os/api.h>
10 
11 #include <string>
12 
13 #ifndef DOXYGEN_SHOULD_SKIP_THIS
14 namespace yarp {
15 namespace os {
16 namespace impl {
17 class SharedLibraryImpl;
18 }
19 } // namespace os
20 } // namespace yarp
21 #endif // DOXYGEN_SHOULD_SKIP_THIS
22 
23 namespace yarp {
24 namespace os {
25 
31 {
32 public:
36  SharedLibrary();
37 
43  SharedLibrary(const char* filename);
44 
45  SharedLibrary(const SharedLibrary&) = delete;
47 
51  virtual ~SharedLibrary();
52 
62  bool open(const char* filename);
63 
68  bool close();
69 
76  std::string error();
77 
81  void* getSymbol(const char* symbolName);
82 
88  bool isValid() const;
89 
90 #ifndef DOXYGEN_SHOULD_SKIP_THIS
91 private:
93 #endif // DOXYGEN_SHOULD_SKIP_THIS
94 };
95 
96 } // namespace os
97 } // namespace yarp
98 
99 #endif // YARP_OS_SHAREDLIBRARY_H
RandScalar * implementation(void *t)
Definition: RandnScalar.cpp:17
Low-level wrapper for loading shared libraries (DLLs) and accessing symbols within it.
Definition: SharedLibrary.h:31
SharedLibrary(const SharedLibrary &)=delete
SharedLibrary & operator=(const SharedLibrary &)=delete
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:314
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18