prime/include/Kyoto/CFactoryMgr.hpp
Phillip Stephens 6f43b5056f Use proper return for CFactoryFnReturn::GetObjForTransfer
Former-commit-id: d7a435fb5b437ce62b4a0e026c61ecc032bd1f59
2023-01-13 22:40:19 -08:00

30 lines
708 B
C++

#ifndef _CFACTORYMGR
#define _CFACTORYMGR
#include "types.h"
#include "Kyoto/IObjectStore.hpp"
#include "Kyoto/Streams/CInputStream.hpp"
#include "Kyoto/TToken.hpp"
class CFactoryMgr {
public:
private:
uchar pad[0x38];
};
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;
};
CFactoryFnReturn FStringTableFactory(const SObjectTag& tag, CInputStream& in,
const CVParamTransfer& xfer);
#endif // _CFACTORYMGR