-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRevMob.cpp
More file actions
46 lines (27 loc) · 849 Bytes
/
Copy pathRevMob.cpp
File metadata and controls
46 lines (27 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "RevMob.h"
#include "platform/CCPlatformMacros.h"
#ifndef CC_TARGET_PLATFORM
#error "CC_TARGET_PLATFORM should be defined!!!"
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "RevMobAds_iOS.h"
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "RevMobAds_Android.h"
#endif
namespace revmob{
RevMob* RevMob::sSharedInstance = 0;
RevMob::RevMob(){};
RevMob::~RevMob(){};
RevMob *RevMob::SharedInstance(){
if (RevMob::sSharedInstance == 0) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
RevMob::sSharedInstance = new RevMobAds_Android();
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
RevMob::sSharedInstance = new RevMobAds_iOS();
#else
RevMob::sSharedInstance = 0;
#endif
}
return RevMob::sSharedInstance;
};
}