plugify
1.0.0.0
|
A reference class for the Method
structure.
More...
#include <method.hpp>
Public Member Functions | |
std::string_view | GetName () const noexcept |
< Inherit constructors from Ref<const Method>. More... | |
std::string_view | GetFunctionName () const noexcept |
Retrieves the function name of the method. More... | |
std::string_view | GetCallingConvention () const noexcept |
Retrieves the calling convention of the method. More... | |
std::span< const PropertyRef > | GetParamTypes () const noexcept |
Retrieves the parameter types for the method. More... | |
PropertyRef | GetReturnType () const noexcept |
Retrieves the return type of the method. More... | |
uint8_t | GetVarIndex () const noexcept |
Retrieves the variable index for the method. More... | |
std::optional< MethodRef > | 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. More... | |
Public Member Functions inherited from plugify::Ref< const Method > | |
Ref (const Method &impl) noexcept | |
Ref (Ref const &)=default | |
Ref (Ref &&)=default | |
bool | operator== (const Ref &other) const noexcept |
bool | operator== (const const Method *impl) const noexcept |
Ref & | operator= (const Ref &) &=default |
Ref & | operator= (const Ref &) &&=delete |
Ref & | operator= (Ref &&) &=default |
Ref & | operator= (Ref &&) &&=delete |
operator bool () const noexcept | |
Additional Inherited Members | |
Protected Attributes inherited from plugify::Ref< const Method > | |
const Method * | _impl |
A reference class for the Method
structure.
This class holds a reference to a Method
object, allowing users to retrieve information such as its name, function name, calling convention, parameter types, return type, and variable index.
Definition at line 118 of file method.hpp.
|
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.
name | The name of the prototype method to search for. |
std::optional<MethodRef>
containing the found prototype if a method with the specified name exists, orstd::optional
if no matching prototype is found.Example usage:
|
noexcept |
Retrieves the calling convention of the method.
|
noexcept |
Retrieves the function name of the method.
|
noexcept |
< Inherit constructors from Ref<const Method>.
Retrieves the method name.
|
noexcept |
Retrieves the parameter types for the method.
PropertyRef
objects representing the parameter types.
|
noexcept |
Retrieves the return type of the method.
PropertyRef
representing the return type of the method.
|
noexcept |
Retrieves the variable index for the method.