Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
castor3d::Plugin Class Reference

#include <Plugin.hpp>

Inheritance diagram for castor3d::Plugin:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Plugin:
Collaboration graph
[legend]

Public Types

using OnLoadFunction = void ( * )( Engine *, Plugin * )
 < Signature for the plug-in's loading function
 
using OnUnloadFunction = void ( * )( Engine * )noexcept
 Signature for the plug-in's type retrieval function.
 
using GetTypeFunction = void ( * )( PluginType * )
 Signature for the plug-in's version checking function.
 
using GetRequiredVersionFunction = void ( * )( Version * version )
 Signature for the plug-in's name retrieval function.
 
using GetNameFunction = void ( * )( char const ** )
 

Public Member Functions

virtual C3D_API ~Plugin () noexcept=default
 Destructor.
 
C3D_API void getRequiredVersion (Version &version) const
 Retrieves the required version for the plug-in to work correctly.
 
C3D_API castor::String getName () const
 Retrieves the plug-in name.
 
PluginType getType () const
 Retrieves the plug-in type.
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Protected Member Functions

C3D_API Plugin (PluginType type, castor::DynamicLibraryUPtr library, Engine &engine)
 Constructor.
 
void load ()
 Calls load function for the plug-in.
 
void unload () const noexcept
 Calls unload function for the plug-in.
 
- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 

Protected Attributes

castor::DynamicLibraryUPtr m_library {}
 
GetRequiredVersionFunction m_pfnGetRequiredVersion {}
 
GetNameFunction m_pfnGetName {}
 
OnLoadFunction m_pfnOnLoad {}
 
OnUnloadFunction m_pfnOnUnload {}
 
PluginType m_type {}
 

Member Typedef Documentation

◆ GetNameFunction

using castor3d::Plugin::GetNameFunction = void ( * )( char const ** )

◆ GetRequiredVersionFunction

using castor3d::Plugin::GetRequiredVersionFunction = void ( * )( Version * version )

Signature for the plug-in's name retrieval function.

◆ GetTypeFunction

Signature for the plug-in's version checking function.

◆ OnLoadFunction

using castor3d::Plugin::OnLoadFunction = void ( * )( Engine *, Plugin * )

< Signature for the plug-in's loading function

Signature for the plug-in's unloading function

◆ OnUnloadFunction

using castor3d::Plugin::OnUnloadFunction = void ( * )( Engine * )noexcept

Signature for the plug-in's type retrieval function.

Constructor & Destructor Documentation

◆ Plugin()

C3D_API castor3d::Plugin::Plugin ( PluginType type,
castor::DynamicLibraryUPtr library,
Engine & engine )
protected

Constructor.

Parameters
[in]typeThe plug-in type
[in]libraryThe shared library holding the plug-in
[in]engineThe engine

◆ ~Plugin()

virtual C3D_API castor3d::Plugin::~Plugin ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ getName()

C3D_API castor::String castor3d::Plugin::getName ( ) const

Retrieves the plug-in name.

Returns
The name

◆ getRequiredVersion()

C3D_API void castor3d::Plugin::getRequiredVersion ( Version & version) const

Retrieves the required version for the plug-in to work correctly.

Parameters
[out]versionReceives the version.

◆ getType()

PluginType castor3d::Plugin::getType ( ) const
inline

Retrieves the plug-in type.

Returns
The type

References m_type.

◆ load()

void castor3d::Plugin::load ( )
protected

Calls load function for the plug-in.

◆ unload()

void castor3d::Plugin::unload ( ) const
protectednoexcept

Calls unload function for the plug-in.

Member Data Documentation

◆ m_library

castor::DynamicLibraryUPtr castor3d::Plugin::m_library {}
protected

The plug-in library.

◆ m_pfnGetName

GetNameFunction castor3d::Plugin::m_pfnGetName {}
protected

The plug-in's name retrieval function.

◆ m_pfnGetRequiredVersion

GetRequiredVersionFunction castor3d::Plugin::m_pfnGetRequiredVersion {}
protected

The plug-in's version checking function.

◆ m_pfnOnLoad

OnLoadFunction castor3d::Plugin::m_pfnOnLoad {}
protected

The plug-in's loading function.

◆ m_pfnOnUnload

OnUnloadFunction castor3d::Plugin::m_pfnOnUnload {}
protected

The plug-in's unloading function

◆ m_type

PluginType castor3d::Plugin::m_type {}
protected

The plug-in type.

Referenced by getType().


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