libER 0.1.4.2
ELDEN RING API library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
from::DLRF::DLRuntimeClass Class Referenceabstract

Type reflection object for an implementing class. More...

#include <reflection.hpp>

Inheritance diagram for from::DLRF::DLRuntimeClass:
from::DLRF::DLRuntimeClassImpl< Impl >

Public Member Functions

virtual const charclass_name () const noexcept=0
 Get the name of the type.
 
virtual const wchar_tclass_name_w () const noexcept=0
 Get the name of the type (wide).
 
virtual size_t class_size () const noexcept=0
 Size of the type.
 
virtual LIBERAPI void add_constructor_invoker (DLMethodInvoker *invoker, const char *method_name, const wchar_t *method_name_w)
 Add an invoker to a vector of invokers for the class's constructor.
 
virtual LIBERAPI void add_method_invoker (DLMethodInvoker *invoker, const char *method_name, const wchar_t *method_name_w)
 Add an invoker to a vector of invokers for a given method.
 
const DLRuntimeClassget_base () const noexcept
 Get a derived class's base class.
 
liber::optref< const DLRuntimeMethodget_constructor () const noexcept
 Get the constructor method (if bound)
 
const from::vector< DLRuntimeMethodHolder > & get_methods () const noexcept
 Get every bound method.
 
LIBERAPI liber::optref< DLRuntimeMethodfind_method (const std::string_view &method_name) noexcept
 Find a bound method by name (if it exists).
 

Static Public Member Functions

static LIBERAPI const from::vector< DLRuntimeClassHolder > & get_registered_classes () noexcept
 Get a vector of all globally registered DLRuntimeClasses.
 
static LIBERAPI const from::vector< DLRuntimeClassPair > & get_runtime_pairs () noexcept
 Get a vector of all globally registered DLRuntimeClass pairs.
 

Detailed Description

Type reflection object for an implementing class.

Allows for runtime type introspection and for binding method invokers.

Typically statically allocated, widely used in ELDEN RING.

Member Function Documentation

◆ add_constructor_invoker()

virtual LIBERAPI void from::DLRF::DLRuntimeClass::add_constructor_invoker ( DLMethodInvoker invoker,
const char method_name,
const wchar_t method_name_w 
)
virtual

Add an invoker to a vector of invokers for the class's constructor.

Parameters
invokerthe invoker for the method
method_namethe name of the method
method_name_wthe name of the method (wide)

◆ add_method_invoker()

virtual LIBERAPI void from::DLRF::DLRuntimeClass::add_method_invoker ( DLMethodInvoker invoker,
const char method_name,
const wchar_t method_name_w 
)
virtual

Add an invoker to a vector of invokers for a given method.

Parameters
invokerthe invoker for the method
method_namethe name of the method
method_name_wthe name of the method (wide)

◆ class_name()

virtual const char * from::DLRF::DLRuntimeClass::class_name ( ) const
pure virtualnoexcept

Get the name of the type.

Returns
const char* name of the type

Implemented in from::DLRF::DLRuntimeClassImpl< Impl >.

◆ class_name_w()

virtual const wchar_t * from::DLRF::DLRuntimeClass::class_name_w ( ) const
pure virtualnoexcept

Get the name of the type (wide).

Returns
const wchar_t* name of the type

Implemented in from::DLRF::DLRuntimeClassImpl< Impl >.

◆ class_size()

virtual size_t from::DLRF::DLRuntimeClass::class_size ( ) const
pure virtualnoexcept

Size of the type.

Returns
size_t size

Implemented in from::DLRF::DLRuntimeClassImpl< Impl >.

◆ find_method()

LIBERAPI liber::optref< DLRuntimeMethod > from::DLRF::DLRuntimeClass::find_method ( const std::string_view &  method_name)
noexcept

Find a bound method by name (if it exists).

Parameters
method_namethe name of the method
Returns
liber::optref<DLRuntimeMethod> (may be std::nullopt)

◆ get_base()

const DLRuntimeClass * from::DLRF::DLRuntimeClass::get_base ( ) const
inlinenoexcept

Get a derived class's base class.

Returns
const DLRuntimeClass* (may be null if not derived)

◆ get_constructor()

liber::optref< const DLRuntimeMethod > from::DLRF::DLRuntimeClass::get_constructor ( ) const
inlinenoexcept

Get the constructor method (if bound)

Returns
liber::optref<const DLRuntimeMethod> (may be std::nullopt)

◆ get_methods()

const from::vector< DLRuntimeMethodHolder > & from::DLRF::DLRuntimeClass::get_methods ( ) const
inlinenoexcept

Get every bound method.

Returns
const from::vector<DLRuntimeMethodHolder>& vector of bound methods

◆ get_registered_classes()

static LIBERAPI const from::vector< DLRuntimeClassHolder > & from::DLRF::DLRuntimeClass::get_registered_classes ( )
staticnoexcept

Get a vector of all globally registered DLRuntimeClasses.

The returned vector contains every DLRuntimeClass that has been registered so far by ELDEN RING. Be aware that classes are registered during the static initialization phase, so this vector will not be initialized before that point.

Returns
from::vector<DLRuntimeClassHolder>& vector of DLRuntimeClassHolder objects

◆ get_runtime_pairs()

static LIBERAPI const from::vector< DLRuntimeClassPair > & from::DLRF::DLRuntimeClass::get_runtime_pairs ( )
staticnoexcept

Get a vector of all globally registered DLRuntimeClass pairs.

The returned vector contains every DLRuntimeClass pair that has been registered so far by ELDEN RING. Be aware that classes are registered during the static initialization phase, so this vector will not be initialized before that point.

Returns
from::vector<DLRuntimeClassPair>& vector of DLRuntimeClassPair objects

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