mirror of https://github.com/PrimeDecomp/prime.git
17 lines
423 B
C++
17 lines
423 B
C++
|
#ifndef _CFACTORYFNRETURN
|
||
|
#define _CFACTORYFNRETURN
|
||
|
#include <Kyoto/TToken.hpp>
|
||
|
|
||
|
class CFactoryFnReturn {
|
||
|
public:
|
||
|
template < typename T >
|
||
|
CFactoryFnReturn(T* ptr) : obj(TToken< T >::GetIObjObjectFor(ptr).release()) {}
|
||
|
|
||
|
const rstl::auto_ptr< CObjOwnerDerivedFromIObjUntyped >& GetObjForTransfer() const { return obj; }
|
||
|
|
||
|
private:
|
||
|
rstl::auto_ptr< CObjOwnerDerivedFromIObjUntyped > obj;
|
||
|
};
|
||
|
|
||
|
#endif // _CFACTORYFNRETURN
|