first draft of ad code for iOS. Not adding admob/adwhirl/adSesnse libs to this commit. You will need to download them to get the port to build under XCode
This commit is contained in:
@@ -44,42 +44,6 @@ protected:
|
||||
WCache<WCachedTexture,JTexture>& mTextureCache;
|
||||
};
|
||||
|
||||
|
||||
class CacheEngine
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
static void Create(WCache<WCachedTexture,JTexture>& inCache)
|
||||
{
|
||||
LOG("Creating Card Retriever instance");
|
||||
sInstance = NEW T(inCache);
|
||||
ThreadedCardRetriever* test = dynamic_cast<ThreadedCardRetriever*>(sInstance);
|
||||
sIsThreaded = (test != NULL);
|
||||
}
|
||||
|
||||
static CardRetrieverBase* Instance()
|
||||
{
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static void Terminate()
|
||||
{
|
||||
SAFE_DELETE(sInstance);
|
||||
}
|
||||
|
||||
static bool IsThreaded()
|
||||
{
|
||||
return sIsThreaded;
|
||||
}
|
||||
|
||||
|
||||
static CardRetrieverBase* sInstance;
|
||||
static bool sIsThreaded;
|
||||
};
|
||||
|
||||
CardRetrieverBase* CacheEngine::sInstance = NULL;
|
||||
bool CacheEngine::sIsThreaded = false;
|
||||
|
||||
/*
|
||||
**
|
||||
*/
|
||||
@@ -206,3 +170,41 @@ protected:
|
||||
volatile bool mProcessing;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class CacheEngine
|
||||
{
|
||||
public:
|
||||
template <class T>
|
||||
static void Create(WCache<WCachedTexture,JTexture>& inCache)
|
||||
{
|
||||
LOG("Creating Card Retriever instance");
|
||||
sInstance = NEW T(inCache);
|
||||
ThreadedCardRetriever* test = dynamic_cast<ThreadedCardRetriever*>(sInstance);
|
||||
sIsThreaded = (test != NULL);
|
||||
}
|
||||
|
||||
static CardRetrieverBase* Instance()
|
||||
{
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static void Terminate()
|
||||
{
|
||||
SAFE_DELETE(sInstance);
|
||||
}
|
||||
|
||||
static bool IsThreaded()
|
||||
{
|
||||
return sIsThreaded;
|
||||
}
|
||||
|
||||
|
||||
static CardRetrieverBase* sInstance;
|
||||
static bool sIsThreaded;
|
||||
};
|
||||
|
||||
CardRetrieverBase* CacheEngine::sInstance = NULL;
|
||||
bool CacheEngine::sIsThreaded = false;
|
||||
|
||||
Reference in New Issue
Block a user