#ifndef __URDE_IFACTORY_HPP__ #define __URDE_IFACTORY_HPP__ #include #include "RetroTypes.hpp" namespace urde { class CVParamTransfer; class IObj; using CFactoryFnReturn = std::unique_ptr; using FFactoryFunc = std::function; using FMemFactoryFunc = std::function&& in, u32 len, const urde::CVParamTransfer& vparms)>; class IFactory { public: virtual ~IFactory() = default; virtual CFactoryFnReturn Build(const SObjectTag&, const CVParamTransfer&)=0; virtual void BuildAsync(const SObjectTag&, const CVParamTransfer&, IObj**)=0; virtual void CancelBuild(const SObjectTag&)=0; virtual bool CanBuild(const SObjectTag&)=0; virtual const SObjectTag* GetResourceIdByName(const char*) const=0; virtual FourCC GetResourceTypeById(ResId id) const=0; }; } #endif // __URDE_IFACTORY_HPP__