Match and link CFactoryStore in a really dumb way

Former-commit-id: ad21202340
This commit is contained in:
Phillip Stephens 2023-01-14 02:00:14 -08:00
parent 0d2f5f6527
commit cf5562d509
5 changed files with 14 additions and 4 deletions

View File

@ -610,7 +610,7 @@ LIBS = [
["Kyoto/Streams/CZipInputStream", True],
["Kyoto/Streams/CZipOutputStream", True],
["Kyoto/Streams/CZipSupport", True],
"Kyoto/CFactoryStore",
["Kyoto/CFactoryStore", True],
["Kyoto/CObjectReference", True],
"Kyoto/CSimplePool",
["Kyoto/CToken", True],

View File

@ -12,7 +12,7 @@
class IFactory;
class CSimplePool : public IObjectStore {
public:
CSimplePool(IFactory& factory);
CSimplePool(IFactory& factory) : x18_factory(factory) {}
~CSimplePool();
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer);

View File

@ -10,10 +10,11 @@ template < typename T >
class TObjOwnerParam : public IVParamObj {
public:
~TObjOwnerParam() {}
T* GetData() const { return static_cast<T*>(x4_data); }
TObjOwnerParam(T data) : x4_data(data) {}
T GetData() const { return static_cast<T>(x4_data); }
private:
T* x4_data;
T x4_data;
};
class CVParamTransfer {

View File

@ -11,6 +11,7 @@
class IFactory;
class IObjectStore {
public:
IObjectStore() {}
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) = 0;
virtual CToken GetObj(const SObjectTag& tag) = 0;
virtual CToken GetObj(const char* name) = 0;

View File

@ -0,0 +1,8 @@
#include "Kyoto/CSimplePool.hpp"
#include "Kyoto/CResFactory.hpp"
TObjOwnerParam<IObjectStore*> DumbTest() {
CResFactory tmp;
CSimplePool pool(tmp);
return TObjOwnerParam<IObjectStore*>(&pool);
}