2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CVPARAMTRANSFER
|
|
|
|
#define _CVPARAMTRANSFER
|
2022-10-01 08:32:56 +00:00
|
|
|
|
2023-01-14 09:26:24 +00:00
|
|
|
#include "Kyoto/IObj.hpp"
|
2022-10-01 08:32:56 +00:00
|
|
|
#include <rstl/rc_ptr.hpp>
|
|
|
|
|
2023-01-14 09:26:24 +00:00
|
|
|
class IVParamObj : public IObj {};
|
|
|
|
|
|
|
|
template < typename T >
|
|
|
|
class TObjOwnerParam : public IVParamObj {
|
|
|
|
public:
|
|
|
|
T* GetData() const { return static_cast<T*>(x4_data); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
T* x4_data;
|
|
|
|
};
|
2022-10-09 05:13:17 +00:00
|
|
|
|
2022-10-01 08:32:56 +00:00
|
|
|
class CVParamTransfer {
|
|
|
|
public:
|
2023-01-14 09:26:24 +00:00
|
|
|
template < typename T >
|
|
|
|
CVParamTransfer(TObjOwnerParam< T >* obj) : x0_obj(obj) {}
|
2022-10-01 08:32:56 +00:00
|
|
|
static CVParamTransfer Null();
|
|
|
|
|
2023-01-14 09:26:24 +00:00
|
|
|
const IVParamObj& operator*() const { return *x0_obj; }
|
|
|
|
|
2022-10-01 08:32:56 +00:00
|
|
|
private:
|
2023-01-14 09:26:24 +00:00
|
|
|
rstl::rc_ptr< IVParamObj > x0_obj;
|
2022-10-01 08:32:56 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CVPARAMTRANSFER
|