mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-15 06:06:08 +00:00
Start CModelData, cleanup CFactoryFnReturn usage
This commit is contained in:
16
include/Kyoto/CFactoryFnReturn.hpp
Normal file
16
include/Kyoto/CFactoryFnReturn.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user