PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::Plugin Class Reference

Class form managing and encapsulating shared libraries loading. More...

#include <PluginManager.h>

Collaboration diagram for dyno::Plugin:

Public Member Functions

 Plugin ()
 
 ~Plugin ()
 
 Plugin (Plugin const &)=delete
 
Pluginoperator= (const Plugin &)=delete
 
 Plugin (Plugin &&rhs)
 
Pluginoperator= (Plugin &&rhs)
 
PluginEntrygetInfo () const
 
bool isLoaded () const
 
void unload ()
 

Static Public Member Functions

static std::shared_ptr< Pluginload (std::string file)
 

Private Types

using PluginEntryFunc = PluginEntry * (*) ()
 Function pointer to DLL entry-point.
 

Private Attributes

void * mHnd = nullptr
 Shared library handle.
 
std::string mFile = ""
 Shared library file name.
 
bool mIsLoaded = false
 Flag to indicate whether plugin (shared library) is loaded into current process.
 
PluginEntrymEntryPoint = nullptr
 Pointer to shared library factory class returned by the DLL entry-point function.
 

Static Private Attributes

static constexpr const char * PluginEntryName = "initDynoPlugin"
 Name of DLL entry point that a Plugin should export.
 

Detailed Description

Class form managing and encapsulating shared libraries loading.

Definition at line 24 of file PluginManager.h.

Member Typedef Documentation

◆ PluginEntryFunc

using dyno::Plugin::PluginEntryFunc = PluginEntry * (*) ()
private

Function pointer to DLL entry-point.

Definition at line 48 of file PluginManager.h.

Constructor & Destructor Documentation

◆ Plugin() [1/3]

dyno::Plugin::Plugin ( )
inline

Definition at line 27 of file PluginManager.h.

Here is the caller graph for this function:

◆ ~Plugin()

dyno::Plugin::~Plugin ( )

Definition at line 80 of file PluginManager.cpp.

Here is the call graph for this function:

◆ Plugin() [2/3]

dyno::Plugin::Plugin ( Plugin const & )
delete
Here is the call graph for this function:

◆ Plugin() [3/3]

dyno::Plugin::Plugin ( Plugin && rhs)

Definition at line 40 of file PluginManager.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getInfo()

PluginEntry * dyno::Plugin::getInfo ( ) const

Definition at line 48 of file PluginManager.cpp.

◆ isLoaded()

bool dyno::Plugin::isLoaded ( ) const

Definition at line 53 of file PluginManager.cpp.

◆ load()

std::shared_ptr< Plugin > dyno::Plugin::load ( std::string file)
static

Definition at line 9 of file PluginManager.cpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

Plugin & dyno::Plugin::operator= ( const Plugin & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

Plugin & dyno::Plugin::operator= ( Plugin && rhs)

Definition at line 71 of file PluginManager.cpp.

Here is the call graph for this function:

◆ unload()

void dyno::Plugin::unload ( )

Definition at line 58 of file PluginManager.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ mEntryPoint

PluginEntry* dyno::Plugin::mEntryPoint = nullptr
private

Pointer to shared library factory class returned by the DLL entry-point function.

Definition at line 63 of file PluginManager.h.

◆ mFile

std::string dyno::Plugin::mFile = ""
private

Shared library file name.

Definition at line 57 of file PluginManager.h.

◆ mHnd

void* dyno::Plugin::mHnd = nullptr
private

Shared library handle.

Definition at line 54 of file PluginManager.h.

◆ mIsLoaded

bool dyno::Plugin::mIsLoaded = false
private

Flag to indicate whether plugin (shared library) is loaded into current process.

Definition at line 60 of file PluginManager.h.

◆ PluginEntryName

const char* dyno::Plugin::PluginEntryName = "initDynoPlugin"
staticconstexprprivate

Name of DLL entry point that a Plugin should export.

Definition at line 51 of file PluginManager.h.


The documentation for this class was generated from the following files: