diff --git a/projects/mtg/include/CacheEngine.h b/projects/mtg/include/CacheEngine.h index 67b70cff6..f150f65e2 100644 --- a/projects/mtg/include/CacheEngine.h +++ b/projects/mtg/include/CacheEngine.h @@ -51,8 +51,10 @@ public: template static void Create(WCache& inCache) { - LOG("Creating ThreadedCardRetriever"); + LOG("Creating Card Retriever instance"); sInstance = NEW T(inCache); + ThreadedCardRetriever* test = dynamic_cast(sInstance); + sIsThreaded = (test != NULL); } static CardRetrieverBase* Instance() @@ -65,11 +67,18 @@ public: SAFE_DELETE(sInstance); } + static bool IsThreaded() + { + return sIsThreaded; + } + static CardRetrieverBase* sInstance; + static bool sIsThreaded; }; CardRetrieverBase* CacheEngine::sInstance = NULL; +bool CacheEngine::sIsThreaded = false; /* **