prime/include/Kyoto/CVParamTransfer.hpp

32 lines
614 B
C++
Raw Normal View History

#ifndef _CVPARAMTRANSFER
#define _CVPARAMTRANSFER
2023-01-14 09:26:24 +00:00
#include "Kyoto/IObj.hpp"
#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;
};
class CVParamTransfer {
public:
CVParamTransfer() {}
2023-01-14 09:26:24 +00:00
template < typename T >
CVParamTransfer(TObjOwnerParam< T >* obj) : x0_obj(obj) {}
static CVParamTransfer Null();
2023-01-14 09:26:24 +00:00
const IVParamObj& operator*() const { return *x0_obj; }
private:
2023-01-14 09:26:24 +00:00
rstl::rc_ptr< IVParamObj > x0_obj;
};
#endif // _CVPARAMTRANSFER