2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CSIMPLEPOOL
|
|
|
|
#define _CSIMPLEPOOL
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
#include "rstl/hash_map.hpp"
|
|
|
|
#include "rstl/rc_ptr.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
#include "Kyoto/CToken.hpp"
|
2022-08-09 23:03:51 +00:00
|
|
|
#include "Kyoto/IObjectStore.hpp"
|
2022-04-10 00:17:06 +00:00
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
class IFactory;
|
|
|
|
class CSimplePool : public IObjectStore {
|
2022-04-10 00:17:06 +00:00
|
|
|
public:
|
2023-10-19 17:06:53 +00:00
|
|
|
CSimplePool(IFactory& factory);
|
2022-10-01 06:19:09 +00:00
|
|
|
~CSimplePool();
|
2023-10-19 17:06:53 +00:00
|
|
|
void DumpDebugPool() const;
|
2022-08-13 01:26:00 +00:00
|
|
|
virtual CToken GetObj(const SObjectTag& tag, CVParamTransfer xfer);
|
|
|
|
virtual CToken GetObj(const SObjectTag& tag);
|
|
|
|
virtual CToken GetObj(const char* name);
|
|
|
|
virtual CToken GetObj(const char* name, CVParamTransfer xfer);
|
|
|
|
virtual bool HasObject(const SObjectTag& tag);
|
|
|
|
virtual bool ObjectIsLive(const SObjectTag& tag);
|
2023-01-14 06:27:43 +00:00
|
|
|
virtual IFactory& GetFactory() { return x18_factory; }
|
2022-08-13 01:26:00 +00:00
|
|
|
virtual void Flush();
|
|
|
|
virtual void ObjectUnreferenced(const SObjectTag& tag);
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
private:
|
2022-10-09 05:37:23 +00:00
|
|
|
uchar x4_;
|
|
|
|
uchar x5_;
|
2022-09-13 04:26:54 +00:00
|
|
|
rstl::hash_map< unkptr, unkptr, void, void > x8_resources;
|
2023-01-14 06:27:43 +00:00
|
|
|
IFactory& x18_factory;
|
2022-09-13 04:26:54 +00:00
|
|
|
rstl::rc_ptr< CVParamTransfer > x1c_paramXfr;
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
2022-09-13 04:26:54 +00:00
|
|
|
CHECK_SIZEOF(CSimplePool, 0x20)
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
extern CSimplePool* gpSimplePool;
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CSIMPLEPOOL
|