AGX Dynamics  2.35.0.1
DynamicLibrary.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 #ifndef AGX_DYNAMIC_LIBRARY_H
17 #define AGX_DYNAMIC_LIBRARY_H
18 
19 
20 #include <agx/agxCore_export.h>
21 #include <agx/Referenced.h>
22 #include <string>
24 
25 namespace agx {
26 
27  class FilePathContainer;
28 
33  {
34  public:
35 
36  typedef void* HANDLE;
37  typedef void* PROC_ADDRESS;
38 
47  const agx::String& additionalDirectory="");
48 
52  const agx::String& getName() const { return m_name; }
53 
57  const agx::String& getFullName() const { return m_fullName; }
58 
62  HANDLE getHandle() const { return m_handle; }
63 
69 
70  protected:
71 
73  static HANDLE getLibraryHandle( const agx::String& libraryName);
74 
80  DynamicLibrary& operator == (const DynamicLibrary&) { return *this; }
81 
87  DynamicLibrary(const agx::String& name,HANDLE handle);
88  virtual ~DynamicLibrary();
89 
93 
94  };
95 
96 } // namespace agx
97 
98 
99 #endif //
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXCORE_EXPORT
class for locating files
agx::String m_fullName
virtual ~DynamicLibrary()
const agx::String & getName() const
DynamicLibrary(const agx::String &name, HANDLE handle)
Disallow public construction so that users have to go through loadLibrary() above which returns nullp...
DynamicLibrary(const DynamicLibrary &)
disallow copy constructor.
static DynamicLibrary * loadLibrary(const agx::String &libraryName, agxIO::FilePathContainer &fp, const agx::String &additionalDirectory="")
Load a named library (without file extension).
DynamicLibrary()
disallow default constructor.
HANDLE getHandle() const
const agx::String & getFullName() const
static HANDLE getLibraryHandle(const agx::String &libraryName)
get handle to library file
PROC_ADDRESS getProcAddress(const agx::String &procName)
Base class providing referencing counted objects.
Definition: Referenced.h:114
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool operator==(T val, InvalidIndexStruct)
Definition: agx.h:190