Skip to content

Commit f296459

Browse files
[Sdk 912] Adding 'cly'namespace on 'Countly' class (#80)
* namespace added on countly classes * namespace 'cly' added on countly class * change log added * readme.me updated * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: ArtursKadikis <[email protected]>
1 parent dd0b194 commit f296459

File tree

6 files changed

+10
-1
lines changed

6 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
22.06.0
2-
* !! Major breaking change !! We are extracting the 'Event' class out of the 'Countly' class which will change how that class can be referenced.'Countly::Event' will not work, you will have to use 'cly::Event' instead.
2+
* !! Major breaking change !! We are adding the 'cly' namespace on 'Countly' class which will change how that class can be referenced. 'Countly::' will not work, you will have to use 'cly::Countly::' instead.
3+
* !! Major breaking change !! We are extracting the 'Event' class out of the 'Countly' class which will change how that class can be referenced. 'Countly::Event' will not work, you will have to use 'cly::Event' instead.
34

45
22.02.0
56
* Added 10-second time-outs for all windows HTTP transactions.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Typical use is:
6262

6363
```C++
6464
#include "countly.hpp"
65+
using namespace cly;
6566

6667
int main(int argc, char *argv[]) {
6768
Countly& ct = Countly::getInstance();

include/countly.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "countly/logger_module.hpp"
2626
#include "countly/views_module.hpp"
2727

28+
namespace cly {
2829
class Countly : public cly::CountlyDelegates {
2930
public:
3031
Countly();
@@ -262,5 +263,6 @@ class Countly : public cly::CountlyDelegates {
262263
bool remote_config_enabled = false;
263264
nlohmann::json remote_config;
264265
};
266+
} // namespace cly
265267

266268
#endif

src/countly.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "sqlite3.h"
2828
#endif
2929

30+
namespace cly {
3031
Countly::Countly() {
3132
views_module = nullptr;
3233
logger.reset(new cly::LoggerModule());
@@ -1072,3 +1073,4 @@ void Countly::updateRemoteConfigExcept(std::string *keys, size_t key_count) {
10721073
mutex.unlock();
10731074
}
10741075
}
1076+
} // namespace cly

tests/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "nlohmann/json.hpp"
1515
using json = nlohmann::json;
16+
using namespace cly;
1617

1718
#define COUNTLY_TEST_APP_KEY "a32cb06789a6e99958d628378ee66bf8583a454f"
1819
#define COUNTLY_TEST_DEVICE_ID "11732aa3-19a6-4272-9057-e3411f1938be"

tests/views.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <unistd.h>
77
#endif
88

9+
using namespace cly;
10+
911
/**
1012
* Validate view data.
1113
*

0 commit comments

Comments
 (0)