plugify 1.0.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
plugify::MethodHandle Class Reference

A handle class for the Method structure. More...

#include <method.hpp>

Inheritance diagram for plugify::MethodHandle:
Inheritance graph
[legend]
Collaboration diagram for plugify::MethodHandle:
Collaboration graph
[legend]

Public Member Functions

std::string_view GetName () const noexcept
 Retrieves the method name.
 
std::string_view GetFunctionName () const noexcept
 Retrieves the function name of the method.
 
std::string_view GetCallingConvention () const noexcept
 Retrieves the calling convention of the method.
 
std::span< const PropertyHandleGetParamTypes () const noexcept
 Retrieves the parameter types for the method.
 
PropertyHandle GetReturnType () const noexcept
 Retrieves the return type of the method.
 
uint8_t GetVarIndex () const noexcept
 Retrieves the variable index for the method.
 
MethodHandle FindPrototype (std::string_view name) const noexcept
 Attempts to find a prototype method by its name in the current method's parameters or return type.
 
- Public Member Functions inherited from plugify::Handle< const Method >
 Handle () noexcept
 Default constructor. Initializes the handle with a null pointer.
 
 Handle (const Method &impl) noexcept
 Constructs a Handle object from an instance of type T.
 
 Handle (const Handle &)=default
 Copy constructor. Creates a new Handle object from another Handle object.
 
 Handle (Handle &&)=default
 Move constructor. Transfers ownership from another Handle object.
 
auto operator<=> (const Handle &) const=default
 Comparison operator (<=>) for comparing two Handle objects.
 
Handleoperator= (const Handle &) &=default
 Copy assignment operator. Copies the handle from another Handle object.
 
Handleoperator= (const Handle &) &&=delete
 Copy assignment operator for rvalue references is deleted.
 
Handleoperator= (Handle &&) &=default
 Move assignment operator. Transfers ownership from another Handle object.
 
Handleoperator= (Handle &&) &&=delete
 Move assignment operator for rvalue references is deleted.
 
 operator bool () const noexcept
 Explicit conversion operator to bool, indicating if the pointer is non-zero.
 
 operator uintptr_t () const noexcept
 Converts the Handle object to a uintptr_t.
 
 operator void * () const noexcept
 Converts the Handle object to a void pointer.
 

Additional Inherited Members

- Protected Attributes inherited from plugify::Handle< const Method >
const Method * _impl
 A pointer to the referenced implementation of type T.
 

Detailed Description

A handle class for the Method structure.

Definition at line 105 of file method.hpp.

Member Function Documentation

◆ FindPrototype()

MethodHandle plugify::MethodHandle::FindPrototype ( std::string_view  name) const
noexcept

Attempts to find a prototype method by its name in the current method's parameters or return type.

This method searches through the parameter types (paramTypes) and return type (retType) of the current method to find a method prototype with the given name. The search is recursive, meaning it will also look into the prototypes of parameter and return types if they themselves have prototypes.

Parameters
nameThe name of the prototype method to search for.
Returns
MethodHandle
  • A MethodHandle containing the found prototype if a method with the specified name exists, or
  • An empty MethodHandle if no matching prototype is found.

Example usage:

MethodHandle prototype = method.FindPrototype("targetMethodName");
if (prototype) {
// Process the found prototype
}
A handle class for the Method structure.
Definition method.hpp:105
MethodHandle FindPrototype(std::string_view name) const noexcept
Attempts to find a prototype method by its name in the current method's parameters or return type.

◆ GetCallingConvention()

std::string_view plugify::MethodHandle::GetCallingConvention ( ) const
noexcept

Retrieves the calling convention of the method.

Returns
A string view representing the calling convention.

◆ GetFunctionName()

std::string_view plugify::MethodHandle::GetFunctionName ( ) const
noexcept

Retrieves the function name of the method.

Returns
A string view representing the function name of the method.

◆ GetName()

std::string_view plugify::MethodHandle::GetName ( ) const
noexcept

Retrieves the method name.

Returns
A string view representing the name of the method.

◆ GetParamTypes()

std::span< const PropertyHandle > plugify::MethodHandle::GetParamTypes ( ) const
noexcept

Retrieves the parameter types for the method.

Returns
A span of PropertyRef objects representing the parameter types.

◆ GetReturnType()

PropertyHandle plugify::MethodHandle::GetReturnType ( ) const
noexcept

Retrieves the return type of the method.

Returns
A PropertyRef representing the return type of the method.

◆ GetVarIndex()

uint8_t plugify::MethodHandle::GetVarIndex ( ) const
noexcept

Retrieves the variable index for the method.

Returns
An 8-bit unsigned integer representing the variable index.

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