Match and link CFactoryStore in a really dumb way

This commit is contained in:
Phillip Stephens 2023-01-14 02:00:14 -08:00
parent 93082a4a13
commit ad21202340
5 changed files with 14 additions and 4 deletions

View File

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

View File

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

View File

@ -10,10 +10,11 @@ template < typename T >
class TObjOwnerParam : public IVParamObj { class TObjOwnerParam : public IVParamObj {
public: public:
~TObjOwnerParam() {} ~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: private:
T* x4_data; T x4_data;
}; };
class CVParamTransfer { class CVParamTransfer {

View File

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