# General Functions

# Description

A series of general functions provided in the SDK, including pointer conversion template functions and export function macro definitions.

# How to Use

// Pointer type conversion
void* raw_ptr = get_some_data();
MyClass* typed_ptr = pointer_cast<MyClass>(raw_ptr);

// Declare exported function
NOBLE_API void my_exported_function();

# pointer_cast

template<typename T> T* pointer_cast(void* ptr)

Converts a void pointer to a pointer of the specified type.

Parameter Type Description
ptr void* The pointer to be converted
void* raw_ptr = get_some_data();
MyClass* typed_ptr = pointer_cast<MyClass>(raw_ptr);

# NOBLE_API

NOBLE_API

Macro definition used for declaring exported functions.

NOBLE_API void my_exported_function();