mirror of https://github.com/PrimeDecomp/prime.git
Fix IObjectStore vtable shenanigans
Former-commit-id: 53c632b5a9744922da38b5df09d4cdedb79f7793
This commit is contained in:
parent
e4d1a69518
commit
f55e5a9edc
|
@ -12,9 +12,9 @@
|
||||||
class IFactory;
|
class IFactory;
|
||||||
class CSimplePool : public IObjectStore {
|
class CSimplePool : public IObjectStore {
|
||||||
public:
|
public:
|
||||||
CSimplePool(IFactory& factory) : x18_factory(factory) {}
|
CSimplePool(IFactory& factory);
|
||||||
~CSimplePool();
|
~CSimplePool();
|
||||||
|
void DumpDebugPool() const;
|
||||||
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer);
|
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer);
|
||||||
virtual CToken GetObj(const SObjectTag& tag);
|
virtual CToken GetObj(const SObjectTag& tag);
|
||||||
virtual CToken GetObj(const char* name);
|
virtual CToken GetObj(const char* name);
|
||||||
|
|
|
@ -1,8 +1,25 @@
|
||||||
#include "Kyoto/CSimplePool.hpp"
|
|
||||||
#include "Kyoto/CResFactory.hpp"
|
#include "Kyoto/CResFactory.hpp"
|
||||||
|
#include "Kyoto/IObjectStore.hpp"
|
||||||
|
|
||||||
TObjOwnerParam<IObjectStore*> DumbTest() {
|
struct CDummyFactory : public IObjectStore {
|
||||||
|
public:
|
||||||
|
CDummyFactory(IFactory& factory) : mFactory(factory){};
|
||||||
|
CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer) { return CToken(); }
|
||||||
|
CToken GetObj(const SObjectTag& tag) { return CToken(); };
|
||||||
|
CToken GetObj(const char* name){};
|
||||||
|
CToken GetObj(const char* name, CVParamTransfer xfer){};
|
||||||
|
bool HasObject(const SObjectTag& tag) { return false; }
|
||||||
|
bool ObjectIsLive(const SObjectTag& tag) { return false; }
|
||||||
|
IFactory& GetFactory() { return mFactory; }
|
||||||
|
void Flush(){};
|
||||||
|
void ObjectUnreferenced(const SObjectTag& tag){};
|
||||||
|
|
||||||
|
private:
|
||||||
|
IFactory& mFactory;
|
||||||
|
};
|
||||||
|
|
||||||
|
TObjOwnerParam< IObjectStore* > DumbTest() {
|
||||||
CResFactory tmp;
|
CResFactory tmp;
|
||||||
CSimplePool pool(tmp);
|
CDummyFactory pool(tmp);
|
||||||
return TObjOwnerParam<IObjectStore*>(&pool);
|
return TObjOwnerParam< IObjectStore* >(&pool);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue