diff --git a/configure.py b/configure.py index 302fcc9f..213f8b5e 100755 --- a/configure.py +++ b/configure.py @@ -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], diff --git a/include/Kyoto/CSimplePool.hpp b/include/Kyoto/CSimplePool.hpp index 29302093..5cd60592 100644 --- a/include/Kyoto/CSimplePool.hpp +++ b/include/Kyoto/CSimplePool.hpp @@ -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); diff --git a/include/Kyoto/CVParamTransfer.hpp b/include/Kyoto/CVParamTransfer.hpp index 1d884fd9..9f3945db 100644 --- a/include/Kyoto/CVParamTransfer.hpp +++ b/include/Kyoto/CVParamTransfer.hpp @@ -10,10 +10,11 @@ template < typename T > class TObjOwnerParam : public IVParamObj { public: ~TObjOwnerParam() {} - T* GetData() const { return static_cast(x4_data); } + TObjOwnerParam(T data) : x4_data(data) {} + T GetData() const { return static_cast(x4_data); } private: - T* x4_data; + T x4_data; }; class CVParamTransfer { diff --git a/include/Kyoto/IObjectStore.hpp b/include/Kyoto/IObjectStore.hpp index b673f9d3..3a03193f 100644 --- a/include/Kyoto/IObjectStore.hpp +++ b/include/Kyoto/IObjectStore.hpp @@ -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; diff --git a/src/Kyoto/CFactoryStore.cpp b/src/Kyoto/CFactoryStore.cpp new file mode 100644 index 00000000..fcb2a3c3 --- /dev/null +++ b/src/Kyoto/CFactoryStore.cpp @@ -0,0 +1,8 @@ +#include "Kyoto/CSimplePool.hpp" +#include "Kyoto/CResFactory.hpp" + +TObjOwnerParam DumbTest() { + CResFactory tmp; + CSimplePool pool(tmp); + return TObjOwnerParam(&pool); +}