From bb0977733f7553b68a253590989e2abee6b4fabd Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 16 Aug 2016 14:12:27 -0700 Subject: [PATCH] Add factory function --- Runtime/GuiSys/CStringTable.cpp | 7 +++++++ Runtime/GuiSys/CStringTable.hpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/Runtime/GuiSys/CStringTable.cpp b/Runtime/GuiSys/CStringTable.cpp index ede51dab2..4c0e1d8b0 100644 --- a/Runtime/GuiSys/CStringTable.cpp +++ b/Runtime/GuiSys/CStringTable.cpp @@ -1,4 +1,5 @@ #include "CStringTable.hpp" +#include "CToken.hpp" namespace urde { @@ -76,4 +77,10 @@ void CStringTable::SetLanguage(s32 lang) { mCurrentLanguage = skLanguages[lang]; } + +CFactoryFnReturn FStringTableFactory(const SObjectTag&, CInputStream& in, const CVParamTransfer&) +{ + return TToken::GetIObjObjectFor(std::make_unique(in)); +} + } diff --git a/Runtime/GuiSys/CStringTable.hpp b/Runtime/GuiSys/CStringTable.hpp index 45160c386..47697c463 100644 --- a/Runtime/GuiSys/CStringTable.hpp +++ b/Runtime/GuiSys/CStringTable.hpp @@ -2,6 +2,7 @@ #define __URDE_CSTRINGTABLE_HPP__ #include "RetroTypes.hpp" +#include "IFactory.hpp" namespace urde { @@ -19,5 +20,7 @@ public: std::wstring GetString(s32) const; static void SetLanguage(s32); }; + +CFactoryFnReturn FStringTableFactory(const SObjectTag&, CInputStream&, const CVParamTransfer&); } #endif // __URDE_CSTRINGTABLE_HPP__