mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
* Implemented guest-to-host function pointers (WIP) Co-Authored-By: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com> * function: support more types for function pointers * api: ported BlueBlur headers and misc. research * Move over function-pointers changes from options-menu branch. --------- Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
45 lines
828 B
C++
45 lines
828 B
C++
namespace Chao::CSD
|
|
{
|
|
template<typename T>
|
|
void RCPtr<T>::Attach(T* in_pObject)
|
|
{
|
|
RCPtrAbs::AttachAbs(in_pObject);
|
|
}
|
|
|
|
template<typename T>
|
|
T* RCPtr<T>::Get() const
|
|
{
|
|
return static_cast<T*>(RCPtrAbs::GetAbs());
|
|
}
|
|
|
|
template<typename T>
|
|
void RCPtr<T>::Set(const RCPtr& in_rOther)
|
|
{
|
|
RCPtrAbs::SetAbs(in_rOther);
|
|
}
|
|
|
|
template<typename T>
|
|
T* RCPtr<T>::operator*() const
|
|
{
|
|
return Get();
|
|
}
|
|
|
|
template<typename T>
|
|
T* RCPtr<T>::operator->() const
|
|
{
|
|
return Get();
|
|
}
|
|
|
|
template<typename T>
|
|
RCPtr<T>& RCPtr<T>::operator=(const RCPtr& in_rOther)
|
|
{
|
|
Set(in_rOther);
|
|
return *this;
|
|
}
|
|
|
|
template<typename T>
|
|
RCPtr<T>::operator bool() const
|
|
{
|
|
return m_pObject != nullptr;
|
|
}
|
|
}
|