mirror of https://github.com/AxioDL/metaforce.git
37 lines
977 B
C++
37 lines
977 B
C++
#ifndef __PSHAG_CSIMPLEPOOL_HPP__
|
|
#define __PSHAG_CSIMPLEPOOL_HPP__
|
|
|
|
#include "IObjectStore.hpp"
|
|
#include "RetroTypes.hpp"
|
|
#include "IVParamObj.hpp"
|
|
#include <unordered_map>
|
|
|
|
namespace urde
|
|
{
|
|
class IFactory;
|
|
class CObjectReference;
|
|
|
|
class CSimplePool : public IObjectStore
|
|
{
|
|
protected:
|
|
std::list<std::pair<SObjectTag, CObjectReference*>> x4_resources;
|
|
//std::unordered_map<SObjectTag, CObjectReference*> x4_resources;
|
|
IFactory& x30_factory;
|
|
CVParamTransfer x34_paramXfer;
|
|
public:
|
|
CSimplePool(IFactory& factory);
|
|
CToken GetObj(const SObjectTag&, const CVParamTransfer&);
|
|
CToken GetObj(const SObjectTag&);
|
|
CToken GetObj(char const*);
|
|
CToken GetObj(char const*, const CVParamTransfer&);
|
|
bool HasObject(const SObjectTag&) const;
|
|
bool ObjectIsLive(const SObjectTag&) const;
|
|
IFactory& GetFactory() const {return x30_factory;}
|
|
void Flush();
|
|
void ObjectUnreferenced(const SObjectTag&);
|
|
};
|
|
|
|
}
|
|
|
|
#endif // __PSHAG_CSIMPLEPOOL_HPP__
|