prime/include/Kyoto/CVParamTransfer.hpp

34 lines
678 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:
~TObjOwnerParam() {}
TObjOwnerParam(T data) : x4_data(data) {}
T GetData() const { return static_cast<T>(x4_data); }
2023-01-14 09:26:24 +00:00
private:
T x4_data;
2023-01-14 09:26:24 +00:00
};
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