AGX Dynamics  2.38.0.2
DynamicLibrary.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 
46  static DynamicLibrary* loadLibrary(const agx::String& libraryName, agxIO::FilePathContainer &fp,
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 
68  PROC_ADDRESS getProcAddress(const agx::String& procName);
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 //
AGXCORE_EXPORT
#define AGXCORE_EXPORT
agx::DynamicLibrary::m_handle
HANDLE m_handle
Definition: DynamicLibrary.h:90
agx::DynamicLibrary::HANDLE
void * HANDLE
Definition: DynamicLibrary.h:36
Referenced.h
agx::DynamicLibrary
Definition: DynamicLibrary.h:32
agx::DynamicLibrary::m_fullName
agx::String m_fullName
Definition: DynamicLibrary.h:92
agxIO::FilePathContainer
class for locating files
Definition: FilePathContainer.h:32
agx::DynamicLibrary::PROC_ADDRESS
void * PROC_ADDRESS
Definition: DynamicLibrary.h:37
agx::DynamicLibrary::DynamicLibrary
DynamicLibrary()
disallow default constructor.
Definition: DynamicLibrary.h:76
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agx::DynamicLibrary::m_name
agx::String m_name
Definition: DynamicLibrary.h:91
agx::DynamicLibrary::getFullName
const agx::String & getFullName() const
Definition: DynamicLibrary.h:57
agx::DynamicLibrary::getHandle
HANDLE getHandle() const
Definition: DynamicLibrary.h:62
FilePathContainer.h
agxCore_export.h
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:119
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agx::DynamicLibrary::getName
const agx::String & getName() const
Definition: DynamicLibrary.h:52
agx::operator==
bool operator==(T val, InvalidIndexStruct)
Definition: agx.h:201
agx::AgXString< std::string >
HANDLE
void * HANDLE
Definition: VideoFFMPEGPipeCapture.h:24
agx::DynamicLibrary::DynamicLibrary
DynamicLibrary(const DynamicLibrary &)
disallow copy constructor.
Definition: DynamicLibrary.h:78