OpenTTD Source 20241224-master-gee860a5c8e
LibraryLoader::Function Class Reference

A function loaded from a library. More...

#include <library_loader.h>

Public Member Functions

 Function (void *p)
 
template<typename T , typename = std::enable_if_t<std::is_function_v<T>>>
 operator T* () const
 

Private Attributes

void * p
 

Detailed Description

A function loaded from a library.

Will automatically cast to the correct function pointer type on retrieval.

Definition at line 20 of file library_loader.h.

Constructor & Destructor Documentation

◆ Function()

LibraryLoader::Function::Function ( void *  p)
inlineexplicit

Definition at line 22 of file library_loader.h.

Member Function Documentation

◆ operator T*()

template<typename T , typename = std::enable_if_t<std::is_function_v<T>>>
LibraryLoader::Function::operator T* ( ) const
inline

Definition at line 25 of file library_loader.h.

Field Documentation

◆ p

void* LibraryLoader::Function::p
private

Definition at line 31 of file library_loader.h.


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