You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/03 12:10:32 UTC
[5/7] ignite git commit: IGNITE-1364: Renaming GG_ -> IGNITE_
IGNITE-1364: Renaming GG_ -> IGNITE_
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96245bfa
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96245bfa
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96245bfa
Branch: refs/heads/ignite-1364
Commit: 96245bfa9e40c6b3a41b9bfeb7a58106e98467b9
Parents: 7c4165e
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Sep 3 13:03:45 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 3 13:03:45 2015 +0300
----------------------------------------------------------------------
.../main/cpp/core-test/src/cache_query_test.cpp | 16 +--
.../src/main/cpp/core-test/src/cache_test.cpp | 16 +--
.../src/portable_reader_writer_raw_test.cpp | 20 +--
.../src/portable_reader_writer_test.cpp | 20 +--
.../main/cpp/core/include/gridgain/grid_error.h | 14 +-
.../gridgain/impl/portable/portable_common.h | 74 +++++-----
.../impl/portable/portable_id_resolver.h | 2 +-
.../impl/portable/portable_reader_impl.h | 30 ++--
.../impl/portable/portable_writer_impl.h | 12 +-
.../include/gridgain/portable/portable_consts.h | 26 ++--
.../gridgain/portable/portable_raw_writer.h | 4 +-
.../include/gridgain/portable/portable_type.h | 32 ++---
.../include/gridgain/portable/portable_writer.h | 4 +-
.../src/impl/interop/interop_input_stream.cpp | 32 ++---
.../core/src/impl/interop/interop_memory.cpp | 2 +-
.../src/impl/interop/interop_output_stream.cpp | 24 ++--
.../src/impl/portable/portable_reader_impl.cpp | 128 ++++++++---------
.../src/impl/portable/portable_writer_impl.cpp | 138 +++++++++----------
18 files changed, 297 insertions(+), 297 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp b/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
index 5f3d79b..cc858ee 100644
--- a/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
@@ -135,13 +135,13 @@ namespace gridgain
/**
* Portable type definition.
*/
- GG_PORTABLE_TYPE_START(QueryPerson)
- GG_PORTABLE_GET_TYPE_ID_AS_HASH(QueryPerson)
- GG_PORTABLE_GET_TYPE_NAME_AS_IS(QueryPerson)
- GG_PORTABLE_GET_FIELD_ID_AS_HASH
- GG_PORTABLE_GET_HASH_CODE_ZERO(QueryPerson)
- GG_PORTABLE_IS_NULL_FALSE(QueryPerson)
- GG_PORTABLE_GET_NULL_DEFAULT_CTOR(QueryPerson)
+ IGNITE_PORTABLE_TYPE_START(QueryPerson)
+ IGNITE_PORTABLE_GET_TYPE_ID_AS_HASH(QueryPerson)
+ IGNITE_PORTABLE_GET_TYPE_NAME_AS_IS(QueryPerson)
+ IGNITE_PORTABLE_GET_FIELD_ID_AS_HASH
+ IGNITE_PORTABLE_GET_HASH_CODE_ZERO(QueryPerson)
+ IGNITE_PORTABLE_IS_NULL_FALSE(QueryPerson)
+ IGNITE_PORTABLE_GET_NULL_DEFAULT_CTOR(QueryPerson)
void Write(PortableWriter& writer, QueryPerson obj)
{
@@ -157,7 +157,7 @@ namespace gridgain
return QueryPerson(name, age);
}
- GG_PORTABLE_TYPE_END
+ IGNITE_PORTABLE_TYPE_END
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/cache_test.cpp b/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
index 134c118..9f870f9 100644
--- a/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
@@ -50,13 +50,13 @@ namespace gridgain
{
namespace portable
{
- GG_PORTABLE_TYPE_START(Person)
- GG_PORTABLE_GET_TYPE_ID_AS_HASH(Person)
- GG_PORTABLE_GET_TYPE_NAME_AS_IS(Person)
- GG_PORTABLE_GET_FIELD_ID_AS_HASH
- GG_PORTABLE_GET_HASH_CODE_ZERO(Person)
- GG_PORTABLE_IS_NULL_FALSE(Person)
- GG_PORTABLE_GET_NULL_DEFAULT_CTOR(Person)
+ IGNITE_PORTABLE_TYPE_START(Person)
+ IGNITE_PORTABLE_GET_TYPE_ID_AS_HASH(Person)
+ IGNITE_PORTABLE_GET_TYPE_NAME_AS_IS(Person)
+ IGNITE_PORTABLE_GET_FIELD_ID_AS_HASH
+ IGNITE_PORTABLE_GET_HASH_CODE_ZERO(Person)
+ IGNITE_PORTABLE_IS_NULL_FALSE(Person)
+ IGNITE_PORTABLE_GET_NULL_DEFAULT_CTOR(Person)
void Write(PortableWriter& writer, Person obj)
{
@@ -72,7 +72,7 @@ namespace gridgain
return Person(name, age);
}
- GG_PORTABLE_TYPE_END
+ IGNITE_PORTABLE_TYPE_END
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
index 3eb773e..59ee741 100644
--- a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
@@ -377,7 +377,7 @@ void CheckRawCollectionEmpty(CollectionType* colType)
if (colType)
BOOST_REQUIRE(colReader.GetType() == *colType);
else
- BOOST_REQUIRE(colReader.GetType() == GG_COLLECTION_UNDEFINED);
+ BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
BOOST_REQUIRE(colReader.GetSize() == 0);
BOOST_REQUIRE(!colReader.HasNext());
@@ -457,7 +457,7 @@ void CheckRawCollection(CollectionType* colType)
if (colType)
BOOST_REQUIRE(colReader.GetType() == *colType);
else
- BOOST_REQUIRE(colReader.GetType() == GG_COLLECTION_UNDEFINED);
+ BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
BOOST_REQUIRE(colReader.GetSize() == 3);
BOOST_REQUIRE(!colReader.IsNull());
@@ -537,7 +537,7 @@ void CheckRawMapEmpty(MapType* mapType)
if (mapType)
BOOST_REQUIRE(mapReader.GetType() == *mapType);
else
- BOOST_REQUIRE(mapReader.GetType() == GG_MAP_UNDEFINED);
+ BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
BOOST_REQUIRE(mapReader.GetSize() == 0);
BOOST_REQUIRE(!mapReader.HasNext());
@@ -620,7 +620,7 @@ void CheckRawMap(MapType* mapType)
if (mapType)
BOOST_REQUIRE(mapReader.GetType() == *mapType);
else
- BOOST_REQUIRE(mapReader.GetType() == GG_MAP_UNDEFINED);
+ BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
BOOST_REQUIRE(mapReader.GetSize() == 3);
BOOST_REQUIRE(!mapReader.IsNull());
@@ -1413,7 +1413,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionNull)
PortableCollectionReader<PortableInner> colReader = rawReader.ReadCollection<PortableInner>();
- BOOST_REQUIRE(colReader.GetType() == GG_COLLECTION_UNDEFINED);
+ BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
BOOST_REQUIRE(colReader.GetSize() == -1);
BOOST_REQUIRE(!colReader.HasNext());
BOOST_REQUIRE(colReader.IsNull());
@@ -1439,7 +1439,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionEmpty)
BOOST_AUTO_TEST_CASE(TestCollectionEmptyTyped)
{
- CollectionType typ = GG_COLLECTION_CONCURRENT_SKIP_LIST_SET;
+ CollectionType typ = IGNITE_COLLECTION_CONCURRENT_SKIP_LIST_SET;
CheckRawCollectionEmpty(&typ);
}
@@ -1451,7 +1451,7 @@ BOOST_AUTO_TEST_CASE(TestCollection)
BOOST_AUTO_TEST_CASE(testCollectionTyped)
{
- CollectionType typ = GG_COLLECTION_CONCURRENT_SKIP_LIST_SET;
+ CollectionType typ = IGNITE_COLLECTION_CONCURRENT_SKIP_LIST_SET;
CheckRawCollection(&typ);
}
@@ -1475,7 +1475,7 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
PortableMapReader<int8_t, PortableInner> mapReader = rawReader.ReadMap<int8_t, PortableInner>();
- BOOST_REQUIRE(mapReader.GetType() == GG_MAP_UNDEFINED);
+ BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
BOOST_REQUIRE(mapReader.GetSize() == -1);
BOOST_REQUIRE(!mapReader.HasNext());
BOOST_REQUIRE(mapReader.IsNull());
@@ -1504,7 +1504,7 @@ BOOST_AUTO_TEST_CASE(TestMapEmpty)
BOOST_AUTO_TEST_CASE(TestMapEmptyTyped)
{
- MapType typ = GG_MAP_CONCURRENT_HASH_MAP;
+ MapType typ = IGNITE_MAP_CONCURRENT_HASH_MAP;
CheckRawMapEmpty(&typ);
}
@@ -1516,7 +1516,7 @@ BOOST_AUTO_TEST_CASE(TestMap)
BOOST_AUTO_TEST_CASE(TestMapTyped)
{
- MapType typ = GG_MAP_CONCURRENT_HASH_MAP;
+ MapType typ = IGNITE_MAP_CONCURRENT_HASH_MAP;
CheckRawMap(&typ);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
index 11e2931..139addc 100644
--- a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
@@ -448,7 +448,7 @@ void CheckCollectionEmpty(CollectionType* colType)
if (colType)
BOOST_REQUIRE(colReader.GetType() == *colType);
else
- BOOST_REQUIRE(colReader.GetType() == GG_COLLECTION_UNDEFINED);
+ BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
BOOST_REQUIRE(colReader.GetSize() == 0);
BOOST_REQUIRE(!colReader.HasNext());
@@ -534,7 +534,7 @@ void CheckCollection(CollectionType* colType)
if (colType)
BOOST_REQUIRE(colReader.GetType() == *colType);
else
- BOOST_REQUIRE(colReader.GetType() == GG_COLLECTION_UNDEFINED);
+ BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
BOOST_REQUIRE(colReader.GetSize() == 3);
BOOST_REQUIRE(!colReader.IsNull());
@@ -620,7 +620,7 @@ void CheckMapEmpty(MapType* mapType)
if (mapType)
BOOST_REQUIRE(mapReader.GetType() == *mapType);
else
- BOOST_REQUIRE(mapReader.GetType() == GG_MAP_UNDEFINED);
+ BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
BOOST_REQUIRE(mapReader.GetSize() == 0);
BOOST_REQUIRE(!mapReader.HasNext());
@@ -709,7 +709,7 @@ void CheckMap(MapType* mapType)
if (mapType)
BOOST_REQUIRE(mapReader.GetType() == *mapType);
else
- BOOST_REQUIRE(mapReader.GetType() == GG_MAP_UNDEFINED);
+ BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
BOOST_REQUIRE(mapReader.GetSize() == 3);
BOOST_REQUIRE(!mapReader.IsNull());
@@ -1647,7 +1647,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionNull)
PortableCollectionReader<PortableInner> colReader = reader.ReadCollection<PortableInner>("field1");
- BOOST_REQUIRE(colReader.GetType() == GG_COLLECTION_UNDEFINED);
+ BOOST_REQUIRE(colReader.GetType() == IGNITE_COLLECTION_UNDEFINED);
BOOST_REQUIRE(colReader.GetSize() == -1);
BOOST_REQUIRE(!colReader.HasNext());
BOOST_REQUIRE(colReader.IsNull());
@@ -1673,7 +1673,7 @@ BOOST_AUTO_TEST_CASE(TestCollectionEmpty)
BOOST_AUTO_TEST_CASE(TestCollectionEmptyTyped)
{
- CollectionType typ = GG_COLLECTION_CONCURRENT_SKIP_LIST_SET;
+ CollectionType typ = IGNITE_COLLECTION_CONCURRENT_SKIP_LIST_SET;
CheckCollectionEmpty(&typ);
}
@@ -1685,7 +1685,7 @@ BOOST_AUTO_TEST_CASE(TestCollection)
BOOST_AUTO_TEST_CASE(testCollectionTyped)
{
- CollectionType typ = GG_COLLECTION_CONCURRENT_SKIP_LIST_SET;
+ CollectionType typ = IGNITE_COLLECTION_CONCURRENT_SKIP_LIST_SET;
CheckCollection(&typ);
}
@@ -1715,7 +1715,7 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
PortableMapReader<int8_t, PortableInner> mapReader = reader.ReadMap<int8_t, PortableInner>("field1");
- BOOST_REQUIRE(mapReader.GetType() == GG_MAP_UNDEFINED);
+ BOOST_REQUIRE(mapReader.GetType() == IGNITE_MAP_UNDEFINED);
BOOST_REQUIRE(mapReader.GetSize() == -1);
BOOST_REQUIRE(!mapReader.HasNext());
BOOST_REQUIRE(mapReader.IsNull());
@@ -1744,7 +1744,7 @@ BOOST_AUTO_TEST_CASE(TestMapEmpty)
BOOST_AUTO_TEST_CASE(TestMapEmptyTyped)
{
- MapType typ = GG_MAP_CONCURRENT_HASH_MAP;
+ MapType typ = IGNITE_MAP_CONCURRENT_HASH_MAP;
CheckMapEmpty(&typ);
}
@@ -1756,7 +1756,7 @@ BOOST_AUTO_TEST_CASE(TestMap)
BOOST_AUTO_TEST_CASE(TestMapTyped)
{
- MapType typ = GG_MAP_CONCURRENT_HASH_MAP;
+ MapType typ = IGNITE_MAP_CONCURRENT_HASH_MAP;
CheckMap(&typ);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/grid_error.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/grid_error.h b/modules/platform/src/main/cpp/core/include/gridgain/grid_error.h
index b8d1099..6774b45 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/grid_error.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/grid_error.h
@@ -23,43 +23,43 @@
#include <ignite/common/common.h>
-#define GG_ERROR_1(code, part1) { \
+#define IGNITE_ERROR_1(code, part1) { \
std::stringstream stream; \
stream << (part1); \
throw gridgain::GridError(code, stream.str().c_str()); \
}
-#define GG_ERROR_2(code, part1, part2) { \
+#define IGNITE_ERROR_2(code, part1, part2) { \
std::stringstream stream; \
stream << (part1) << (part2); \
throw gridgain::GridError(code, stream.str().c_str()); \
}
-#define GG_ERROR_3(code, part1, part2, part3) { \
+#define IGNITE_ERROR_3(code, part1, part2, part3) { \
std::stringstream stream; \
stream << (part1) << (part2) << (part3); \
throw gridgain::GridError(code, stream.str().c_str()); \
}
-#define GG_ERROR_FORMATTED_1(code, msg, key1, val1) { \
+#define IGNITE_ERROR_FORMATTED_1(code, msg, key1, val1) { \
std::stringstream stream; \
stream << msg << " [" << key1 << "=" << (val1) << "]"; \
throw gridgain::GridError(code, stream.str().c_str()); \
}
-#define GG_ERROR_FORMATTED_2(code, msg, key1, val1, key2, val2) { \
+#define IGNITE_ERROR_FORMATTED_2(code, msg, key1, val1, key2, val2) { \
std::stringstream stream; \
stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << "]"; \
throw gridgain::GridError(code, stream.str().c_str()); \
}
-#define GG_ERROR_FORMATTED_3(code, msg, key1, val1, key2, val2, key3, val3) { \
+#define IGNITE_ERROR_FORMATTED_3(code, msg, key1, val1, key2, val2, key3, val3) { \
std::stringstream stream; \
stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << "]"; \
throw gridgain::GridError(code, stream.str().c_str()); \
}
-#define GG_ERROR_FORMATTED_4(code, msg, key1, val1, key2, val2, key3, val3, key4, val4) { \
+#define IGNITE_ERROR_FORMATTED_4(code, msg, key1, val1, key2, val2, key3, val3, key4, val4) { \
std::stringstream stream; \
stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << ", " << key4 << "=" << (val4) << "]"; \
throw gridgain::GridError(code, stream.str().c_str()); \
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_common.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_common.h b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_common.h
index 1fd39fd..193340c 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_common.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_common.h
@@ -27,118 +27,118 @@ namespace gridgain
namespace portable
{
/** Header: null. */
- const int8_t GG_HDR_NULL = 101;
+ const int8_t IGNITE_HDR_NULL = 101;
/** Header: handle. */
- const int8_t GG_HDR_HND = 102;
+ const int8_t IGNITE_HDR_HND = 102;
/** Header: fulle form. */
- const int8_t GG_HDR_FULL = 103;
+ const int8_t IGNITE_HDR_FULL = 103;
/** Full header length. */
const int32_t GG_FULL_HDR_LEN = 18;
/** Type: object. */
- const int8_t GG_TYPE_OBJECT = GG_HDR_FULL;
+ const int8_t IGNITE_TYPE_OBJECT = IGNITE_HDR_FULL;
/** Type: unsigned byte. */
- const int8_t GG_TYPE_BYTE = 1;
+ const int8_t IGNITE_TYPE_BYTE = 1;
/** Type: short. */
- const int8_t GG_TYPE_SHORT = 2;
+ const int8_t IGNITE_TYPE_SHORT = 2;
/** Type: int. */
- const int8_t GG_TYPE_INT = 3;
+ const int8_t IGNITE_TYPE_INT = 3;
/** Type: long. */
- const int8_t GG_TYPE_LONG = 4;
+ const int8_t IGNITE_TYPE_LONG = 4;
/** Type: float. */
- const int8_t GG_TYPE_FLOAT = 5;
+ const int8_t IGNITE_TYPE_FLOAT = 5;
/** Type: double. */
- const int8_t GG_TYPE_DOUBLE = 6;
+ const int8_t IGNITE_TYPE_DOUBLE = 6;
/** Type: char. */
- const int8_t GG_TYPE_CHAR = 7;
+ const int8_t IGNITE_TYPE_CHAR = 7;
/** Type: boolean. */
- const int8_t GG_TYPE_BOOL = 8;
+ const int8_t IGNITE_TYPE_BOOL = 8;
/** Type: decimal. */
- const int8_t GG_TYPE_DECIMAL = 30;
+ const int8_t IGNITE_TYPE_DECIMAL = 30;
/** Type: string. */
- const int8_t GG_TYPE_STRING = 9;
+ const int8_t IGNITE_TYPE_STRING = 9;
/** Type: UUID. */
- const int8_t GG_TYPE_UUID = 10;
+ const int8_t IGNITE_TYPE_UUID = 10;
/** Type: date. */
- const int8_t GG_TYPE_DATE = 11;
+ const int8_t IGNITE_TYPE_DATE = 11;
/** Type: unsigned byte array. */
- const int8_t GG_TYPE_ARRAY_BYTE = 12;
+ const int8_t IGNITE_TYPE_ARRAY_BYTE = 12;
/** Type: short array. */
- const int8_t GG_TYPE_ARRAY_SHORT = 13;
+ const int8_t IGNITE_TYPE_ARRAY_SHORT = 13;
/** Type: int array. */
- const int8_t GG_TYPE_ARRAY_INT = 14;
+ const int8_t IGNITE_TYPE_ARRAY_INT = 14;
/** Type: long array. */
- const int8_t GG_TYPE_ARRAY_LONG = 15;
+ const int8_t IGNITE_TYPE_ARRAY_LONG = 15;
/** Type: float array. */
- const int8_t GG_TYPE_ARRAY_FLOAT = 16;
+ const int8_t IGNITE_TYPE_ARRAY_FLOAT = 16;
/** Type: double array. */
- const int8_t GG_TYPE_ARRAY_DOUBLE = 17;
+ const int8_t IGNITE_TYPE_ARRAY_DOUBLE = 17;
/** Type: char array. */
- const int8_t GG_TYPE_ARRAY_CHAR = 18;
+ const int8_t IGNITE_TYPE_ARRAY_CHAR = 18;
/** Type: boolean array. */
- const int8_t GG_TYPE_ARRAY_BOOL = 19;
+ const int8_t IGNITE_TYPE_ARRAY_BOOL = 19;
/** Type: decimal array. */
- const int8_t GG_TYPE_ARRAY_DECIMAL = 31;
+ const int8_t IGNITE_TYPE_ARRAY_DECIMAL = 31;
/** Type: string array. */
- const int8_t GG_TYPE_ARRAY_STRING = 20;
+ const int8_t IGNITE_TYPE_ARRAY_STRING = 20;
/** Type: UUID array. */
- const int8_t GG_TYPE_ARRAY_UUID = 21;
+ const int8_t IGNITE_TYPE_ARRAY_UUID = 21;
/** Type: date array. */
- const int8_t GG_TYPE_ARRAY_DATE = 22;
+ const int8_t IGNITE_TYPE_ARRAY_DATE = 22;
/** Type: object array. */
- const int8_t GG_TYPE_ARRAY = 23;
+ const int8_t IGNITE_TYPE_ARRAY = 23;
/** Type: collection. */
- const int8_t GG_TYPE_COLLECTION = 24;
+ const int8_t IGNITE_TYPE_COLLECTION = 24;
/** Type: map. */
- const int8_t GG_TYPE_MAP = 25;
+ const int8_t IGNITE_TYPE_MAP = 25;
/** Type: map entry. */
- const int8_t GG_TYPE_MAP_ENTRY = 26;
+ const int8_t IGNITE_TYPE_MAP_ENTRY = 26;
/** Type: portable object. */
- const int8_t GG_TYPE_PORTABLE = 27;
+ const int8_t IGNITE_TYPE_PORTABLE = 27;
/** Read/write single object. */
- const int32_t GG_PORTABLE_MODE_SINGLE = 0;
+ const int32_t IGNITE_PORTABLE_MODE_SINGLE = 0;
/** Read/write array. */
- const int32_t GG_PORTABLE_MODE_ARRAY = 1;
+ const int32_t IGNITE_PORTABLE_MODE_ARRAY = 1;
/** Read/write collection. */
- const int32_t GG_PORTABLE_MODE_COL = 2;
+ const int32_t IGNITE_PORTABLE_MODE_COL = 2;
/** Read/write map. */
- const int32_t GG_PORTABLE_MODE_MAP = 3;
+ const int32_t IGNITE_PORTABLE_MODE_MAP = 3;
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_id_resolver.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_id_resolver.h b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_id_resolver.h
index 4eaf481..825f919 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_id_resolver.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_id_resolver.h
@@ -90,7 +90,7 @@ namespace gridgain
virtual int32_t GetFieldId(const int32_t typeId, const char* name) {
if (!name)
{
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Field name cannot be NULL.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Field name cannot be NULL.");
}
return type.GetFieldId(name);
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_reader_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_reader_impl.h b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_reader_impl.h
index 4437e10..edee162 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_reader_impl.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_reader_impl.h
@@ -636,12 +636,12 @@ namespace gridgain
int32_t pos = stream->Position();
int8_t hdr = stream->ReadInt8();
- if (hdr == GG_HDR_NULL)
+ if (hdr == IGNITE_HDR_NULL)
return GetNull<T>();
- else if (hdr == GG_HDR_HND) {
- GG_ERROR_1(gridgain::GridError::IGNITE_ERR_PORTABLE, "Circular references are not supported.");
+ else if (hdr == IGNITE_HDR_HND) {
+ IGNITE_ERROR_1(gridgain::GridError::IGNITE_ERR_PORTABLE, "Circular references are not supported.");
}
- else if (hdr == GG_TYPE_PORTABLE)
+ else if (hdr == IGNITE_TYPE_PORTABLE)
{
int32_t portLen = stream->ReadInt32(); // Total length of portable object.
int32_t curPos = stream->Position();
@@ -798,11 +798,11 @@ namespace gridgain
if (typeId == expHdr)
return func(stream);
- else if (typeId != GG_HDR_NULL)
+ else if (typeId != IGNITE_HDR_NULL)
{
int32_t pos = stream->Position();
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid type ID",
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid type ID",
"position", pos, "expected", expHdr, "actual", typeId)
}
}
@@ -912,7 +912,7 @@ namespace gridgain
return realLen;
}
- else if (hdr != GG_HDR_NULL)
+ else if (hdr != IGNITE_HDR_NULL)
ThrowOnInvalidHeader(stream->Position() - 1, expHdr, hdr);
return -1;
@@ -938,7 +938,7 @@ namespace gridgain
if (hdr == expHdr)
return func(stream);
- else if (hdr == GG_HDR_NULL)
+ else if (hdr == IGNITE_HDR_NULL)
return Guid();
else {
ThrowOnInvalidHeader(stream->Position() - 1, expHdr, hdr);
@@ -1026,12 +1026,12 @@ namespace gridgain
if (typeId == expHdr)
return func(stream);
- else if (typeId == GG_HDR_NULL)
+ else if (typeId == IGNITE_HDR_NULL)
return GetNull<T>();
else {
int32_t pos = stream->Position() - 1;
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
}
}
@@ -1049,12 +1049,12 @@ namespace gridgain
if (typeId == expHdr)
return func(stream);
- else if (typeId == GG_HDR_NULL)
+ else if (typeId == IGNITE_HDR_NULL)
return dflt;
else {
int32_t pos = stream->Position() - 1;
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
}
}
};
@@ -1092,7 +1092,7 @@ namespace gridgain
{
int8_t typeId = stream->ReadInt8();
- if (typeId == GG_TYPE_STRING)
+ if (typeId == IGNITE_TYPE_STRING)
{
bool utf8Mode = stream->ReadBool();
int32_t realLen = stream->ReadInt32();
@@ -1115,12 +1115,12 @@ namespace gridgain
return std::string(arr.target);
}
- else if (typeId == GG_HDR_NULL)
+ else if (typeId == IGNITE_HDR_NULL)
return std::string();
else {
int32_t pos = stream->Position() - 1;
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", GG_TYPE_STRING, "actual", typeId)
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", IGNITE_TYPE_STRING, "actual", typeId)
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_writer_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_writer_impl.h b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_writer_impl.h
index d92a863..a27fdac 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_writer_impl.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/impl/portable/portable_writer_impl.h
@@ -524,7 +524,7 @@ namespace gridgain
CheckRawMode(false);
// 1. Write field ID.
- WriteFieldId(fieldName, GG_TYPE_OBJECT);
+ WriteFieldId(fieldName, IGNITE_TYPE_OBJECT);
// 2. Preserve space for length.
int32_t lenPos = stream->Position();
@@ -559,7 +559,7 @@ namespace gridgain
gridgain::portable::PortableType<T> type;
if (type.IsNull(obj))
- stream->WriteInt8(GG_HDR_NULL);
+ stream->WriteInt8(IGNITE_HDR_NULL);
else
{
TemplatedPortableIdResolver<T> idRslvr(type);
@@ -573,7 +573,7 @@ namespace gridgain
int32_t pos = stream->Position();
- stream->WriteInt8(GG_HDR_FULL);
+ stream->WriteInt8(IGNITE_HDR_FULL);
stream->WriteBool(true);
stream->WriteInt32(idRslvr.GetTypeId());
stream->WriteInt32(type.GetHashCode(obj));
@@ -675,7 +675,7 @@ namespace gridgain
func(stream, val, len);
}
else
- stream->WriteInt8(GG_HDR_NULL);
+ stream->WriteInt8(IGNITE_HDR_NULL);
}
/**
@@ -742,7 +742,7 @@ namespace gridgain
else
{
stream->WriteInt32(1);
- stream->WriteInt8(GG_HDR_NULL);
+ stream->WriteInt8(IGNITE_HDR_NULL);
}
}
@@ -848,7 +848,7 @@ namespace gridgain
int32_t len = static_cast<int32_t>(strlen(obj0));
- stream->WriteInt8(GG_TYPE_STRING);
+ stream->WriteInt8(IGNITE_TYPE_STRING);
PortableUtils::WriteString(stream, obj0, len);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_consts.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_consts.h b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_consts.h
index ef69d7f..2c1f6bc 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_consts.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_consts.h
@@ -32,37 +32,37 @@ namespace gridgain
/**
* Undefined. Maps to ArrayList in Java.
*/
- GG_COLLECTION_UNDEFINED = 0,
+ IGNITE_COLLECTION_UNDEFINED = 0,
/**
* Array list. Maps to ArrayList in Java.
*/
- GG_COLLECTION_ARRAY_LIST = 1,
+ IGNITE_COLLECTION_ARRAY_LIST = 1,
/**
* Linked list. Maps to LinkedList in Java.
*/
- GG_COLLECTION_LINKED_LIST = 2,
+ IGNITE_COLLECTION_LINKED_LIST = 2,
/**
* Hash set. Maps to HashSet in Java.
*/
- GG_COLLECTION_HASH_SET = 3,
+ IGNITE_COLLECTION_HASH_SET = 3,
/**
* Linked hash set. Maps to LinkedHashSet in Java.
*/
- GG_COLLECTION_LINKED_HASH_SET = 4,
+ IGNITE_COLLECTION_LINKED_HASH_SET = 4,
/**
* Tree set. Maps to TreeSet in Java.
*/
- GG_COLLECTION_TREE_SET = 5,
+ IGNITE_COLLECTION_TREE_SET = 5,
/**
* Concurrent skip list set. Maps to ConcurrentSkipListSet in Java.
*/
- GG_COLLECTION_CONCURRENT_SKIP_LIST_SET = 6
+ IGNITE_COLLECTION_CONCURRENT_SKIP_LIST_SET = 6
};
/**
@@ -73,32 +73,32 @@ namespace gridgain
/**
* Undefined. Maps to HashMap in Java.
*/
- GG_MAP_UNDEFINED = 0,
+ IGNITE_MAP_UNDEFINED = 0,
/**
* Hash map. Maps to HashMap in Java.
*/
- GG_MAP_HASH_MAP = 1,
+ IGNITE_MAP_HASH_MAP = 1,
/**
* Linked hash map. Maps to LinkedHashMap in Java.
*/
- GG_MAP_LINKED_HASH_MAP = 2,
+ IGNITE_MAP_LINKED_HASH_MAP = 2,
/**
* Tree map. Maps to TreeMap in Java.
*/
- GG_MAP_TREE_MAP = 3,
+ IGNITE_MAP_TREE_MAP = 3,
/**
* Concurrent hash map. Maps to ConcurrentHashMap in Java.
*/
- GG_MAP_CONCURRENT_HASH_MAP = 4,
+ IGNITE_MAP_CONCURRENT_HASH_MAP = 4,
/**
* Properties map. Maps to Properties in Java.
*/
- GG_MAP_PROPERTIES_MAP = 5
+ IGNITE_MAP_PROPERTIES_MAP = 5
};
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_raw_writer.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_raw_writer.h b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_raw_writer.h
index 5830e68..3a3ac38 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_raw_writer.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_raw_writer.h
@@ -237,7 +237,7 @@ namespace gridgain
template<typename T>
PortableCollectionWriter<T> WriteCollection()
{
- return WriteCollection<T>(GG_COLLECTION_UNDEFINED);
+ return WriteCollection<T>(IGNITE_COLLECTION_UNDEFINED);
}
/**
@@ -263,7 +263,7 @@ namespace gridgain
template<typename K, typename V>
PortableMapWriter<K, V> WriteMap()
{
- return WriteMap<K, V>(GG_MAP_UNDEFINED);
+ return WriteMap<K, V>(IGNITE_MAP_UNDEFINED);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_type.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_type.h b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_type.h
index ca8f6c9..c1fda73 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_type.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_type.h
@@ -27,7 +27,7 @@
/**
* Start portable type definition.
*/
-#define GG_PORTABLE_TYPE_START(T) \
+#define IGNITE_PORTABLE_TYPE_START(T) \
template<> \
struct PortableType<T> \
{
@@ -35,13 +35,13 @@ struct PortableType<T> \
/**
* End portable type definition.
*/
-#define GG_PORTABLE_TYPE_END \
+#define IGNITE_PORTABLE_TYPE_END \
};
/**
* Implementation of GetTypeId() which returns predefined constant.
*/
-#define GG_PORTABLE_GET_TYPE_ID_AS_CONST(id) \
+#define IGNITE_PORTABLE_GET_TYPE_ID_AS_CONST(id) \
int32_t GetTypeId() \
{ \
return id; \
@@ -50,7 +50,7 @@ int32_t GetTypeId() \
/**
* Implementation of GetTypeId() which returns hash of passed type name.
*/
-#define GG_PORTABLE_GET_TYPE_ID_AS_HASH(typeName) \
+#define IGNITE_PORTABLE_GET_TYPE_ID_AS_HASH(typeName) \
int32_t GetTypeId() \
{ \
return GetPortableStringHashCode(#typeName); \
@@ -59,7 +59,7 @@ int32_t GetTypeId() \
/**
* Implementation of GetTypeName() which returns type name as is.
*/
-#define GG_PORTABLE_GET_TYPE_NAME_AS_IS(typeName) \
+#define IGNITE_PORTABLE_GET_TYPE_NAME_AS_IS(typeName) \
std::string GetTypeName() \
{ \
return #typeName; \
@@ -68,7 +68,7 @@ std::string GetTypeName() \
/**
* Default implementation of GetFieldId() function which returns Java-way hash code of the string.
*/
-#define GG_PORTABLE_GET_FIELD_ID_AS_HASH \
+#define IGNITE_PORTABLE_GET_FIELD_ID_AS_HASH \
int32_t GetFieldId(const char* name) \
{ \
return GetPortableStringHashCode(name); \
@@ -77,7 +77,7 @@ int32_t GetFieldId(const char* name) \
/**
* Implementation of GetHashCode() function which always returns 0.
*/
-#define GG_PORTABLE_GET_HASH_CODE_ZERO(T) \
+#define IGNITE_PORTABLE_GET_HASH_CODE_ZERO(T) \
int32_t GetHashCode(const T& obj) \
{ \
return 0; \
@@ -86,7 +86,7 @@ int32_t GetHashCode(const T& obj) \
/**
* Implementation of IsNull() function which always returns false.
*/
-#define GG_PORTABLE_IS_NULL_FALSE(T) \
+#define IGNITE_PORTABLE_IS_NULL_FALSE(T) \
bool IsNull(const T& obj) \
{ \
return false; \
@@ -95,7 +95,7 @@ bool IsNull(const T& obj) \
/**
* Implementation of IsNull() function which return true if passed object is null pointer.
*/
-#define GG_PORTABLE_IS_NULL_IF_NULLPTR(T) \
+#define IGNITE_PORTABLE_IS_NULL_IF_NULLPTR(T) \
bool IsNull(const T& obj) \
{ \
return obj; \
@@ -104,7 +104,7 @@ bool IsNull(const T& obj) \
/**
* Implementation of GetNull() function which returns an instance created with defult constructor.
*/
-#define GG_PORTABLE_GET_NULL_DEFAULT_CTOR(T) \
+#define IGNITE_PORTABLE_GET_NULL_DEFAULT_CTOR(T) \
T GetNull() \
{ \
return T(); \
@@ -113,7 +113,7 @@ T GetNull() \
/**
* Implementation of GetNull() function which returns NULL pointer.
*/
-#define GG_PORTABLE_GET_NULL_NULLPTR(T) \
+#define IGNITE_PORTABLE_GET_NULL_NULLPTR(T) \
T GetNull() \
{ \
return NULL; \
@@ -147,7 +147,7 @@ namespace gridgain
*/
int32_t GetTypeId()
{
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetTypeId function is not defined for portable type.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetTypeId function is not defined for portable type.");
}
/**
@@ -157,7 +157,7 @@ namespace gridgain
*/
std::string GetTypeName()
{
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetTypeName function is not defined for portable type.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetTypeName function is not defined for portable type.");
}
/**
@@ -190,7 +190,7 @@ namespace gridgain
*/
void Write(PortableWriter& writer, const T& obj)
{
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Write function is not defined for portable type.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Write function is not defined for portable type.");
}
/**
@@ -201,7 +201,7 @@ namespace gridgain
*/
T Read(PortableReader& reader)
{
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Read function is not defined for portable type.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Read function is not defined for portable type.");
}
/**
@@ -222,7 +222,7 @@ namespace gridgain
*/
T GetNull()
{
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetNull function is not defined for portable type.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetNull function is not defined for portable type.");
}
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_writer.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_writer.h b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_writer.h
index 2a9c098..2cbc201 100644
--- a/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_writer.h
+++ b/modules/platform/src/main/cpp/core/include/gridgain/portable/portable_writer.h
@@ -261,7 +261,7 @@ namespace gridgain
template<typename T>
PortableCollectionWriter<T> WriteCollection(const char* fieldName)
{
- return WriteCollection<T>(fieldName, GG_COLLECTION_UNDEFINED);
+ return WriteCollection<T>(fieldName, IGNITE_COLLECTION_UNDEFINED);
}
/**
@@ -289,7 +289,7 @@ namespace gridgain
template<typename K, typename V>
PortableMapWriter<K, V> WriteMap(const char* fieldName)
{
- return WriteMap<K, V>(fieldName, GG_MAP_UNDEFINED);
+ return WriteMap<K, V>(fieldName, IGNITE_MAP_UNDEFINED);
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp b/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
index c146482..89fb5fa 100644
--- a/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
@@ -23,7 +23,7 @@
/**
* Common macro to read a single value.
*/
-#define GG_INTEROP_IN_READ(type, len) { \
+#define IGNITE_INTEROP_IN_READ(type, len) { \
EnsureEnoughData(len); \
type res = *reinterpret_cast<type*>(data + pos); \
Shift(len); \
@@ -33,7 +33,7 @@
/**
* Common macro to read an array.
*/
-#define GG_INTEROP_IN_READ_ARRAY(len, shift) { \
+#define IGNITE_INTEROP_IN_READ_ARRAY(len, shift) { \
CopyAndShift(reinterpret_cast<int8_t*>(res), 0, len << shift); \
}
@@ -66,12 +66,12 @@ namespace gridgain
int8_t InteropInputStream::ReadInt8()
{
- GG_INTEROP_IN_READ(int8_t, 1);
+ IGNITE_INTEROP_IN_READ(int8_t, 1);
}
void InteropInputStream::ReadInt8Array(int8_t* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 0);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 0);
}
bool InteropInputStream::ReadBool()
@@ -87,27 +87,27 @@ namespace gridgain
int16_t InteropInputStream::ReadInt16()
{
- GG_INTEROP_IN_READ(int16_t, 2);
+ IGNITE_INTEROP_IN_READ(int16_t, 2);
}
void InteropInputStream::ReadInt16Array(int16_t* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 1);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 1);
}
uint16_t InteropInputStream::ReadUInt16()
{
- GG_INTEROP_IN_READ(uint16_t, 2);
+ IGNITE_INTEROP_IN_READ(uint16_t, 2);
}
void InteropInputStream::ReadUInt16Array(uint16_t* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 1);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 1);
}
int32_t InteropInputStream::ReadInt32()
{
- GG_INTEROP_IN_READ(int32_t, 4);
+ IGNITE_INTEROP_IN_READ(int32_t, 4);
}
int32_t InteropInputStream::ReadInt32(int32_t pos)
@@ -122,17 +122,17 @@ namespace gridgain
void InteropInputStream::ReadInt32Array(int32_t* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 2);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 2);
}
int64_t InteropInputStream::ReadInt64()
{
- GG_INTEROP_IN_READ(int64_t, 8);
+ IGNITE_INTEROP_IN_READ(int64_t, 8);
}
void InteropInputStream::ReadInt64Array(int64_t* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 3);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 3);
}
float InteropInputStream::ReadFloat()
@@ -146,7 +146,7 @@ namespace gridgain
void InteropInputStream::ReadFloatArray(float* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 2);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 2);
}
double InteropInputStream::ReadDouble()
@@ -160,7 +160,7 @@ namespace gridgain
void InteropInputStream::ReadDoubleArray(double* const res, const int32_t len)
{
- GG_INTEROP_IN_READ_ARRAY(len, 3);
+ IGNITE_INTEROP_IN_READ_ARRAY(len, 3);
}
int32_t InteropInputStream::Remaining()
@@ -176,7 +176,7 @@ namespace gridgain
void InteropInputStream::Position(int32_t pos)
{
if (pos > len) {
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_MEMORY, "Requested input stream position is out of bounds",
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_MEMORY, "Requested input stream position is out of bounds",
"memPtr", mem->PointerLong(), "len", len, "pos", pos);
}
@@ -192,7 +192,7 @@ namespace gridgain
void InteropInputStream::EnsureEnoughData(int32_t cnt)
{
if (len - pos < cnt) {
- GG_ERROR_FORMATTED_4(GridError::IGNITE_ERR_MEMORY, "Not enough data in the stream",
+ IGNITE_ERROR_FORMATTED_4(GridError::IGNITE_ERR_MEMORY, "Not enough data in the stream",
"memPtr", mem->PointerLong(), "len", len, "pos", pos, "requested", cnt);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp b/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
index a8151f6..d0024d8 100644
--- a/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
@@ -173,7 +173,7 @@ namespace gridgain
void InteropExternalMemory::Reallocate(int32_t cap)
{
if (JniContext::Reallocate(reinterpret_cast<int64_t>(memPtr), cap) == -1) {
- GG_ERROR_FORMATTED_2(GridError::IGNITE_ERR_MEMORY, "Failed to reallocate external memory",
+ IGNITE_ERROR_FORMATTED_2(GridError::IGNITE_ERR_MEMORY, "Failed to reallocate external memory",
"memPtr", PointerLong(), "requestedCapacity", cap)
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp b/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
index e7e8601..27a47d3 100644
--- a/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
@@ -23,7 +23,7 @@
/**
* Common macro to write a single value.
*/
-#define GG_INTEROP_OUT_WRITE(val, type, len) { \
+#define IGNITE_INTEROP_OUT_WRITE(val, type, len) { \
EnsureCapacity(pos + len); \
*reinterpret_cast<type*>(data + pos) = val; \
Shift(len); \
@@ -32,7 +32,7 @@
/**
* Common macro to write an array.
*/
-#define GG_INTEROP_OUT_WRITE_ARRAY(val, len) { \
+#define IGNITE_INTEROP_OUT_WRITE_ARRAY(val, len) { \
CopyAndShift(reinterpret_cast<const int8_t*>(val), 0, len); \
}
@@ -65,7 +65,7 @@ namespace gridgain
void InteropOutputStream::WriteInt8(const int8_t val)
{
- GG_INTEROP_OUT_WRITE(val, int8_t, 1);
+ IGNITE_INTEROP_OUT_WRITE(val, int8_t, 1);
}
void InteropOutputStream::WriteInt8(const int8_t val, const int32_t pos)
@@ -77,7 +77,7 @@ namespace gridgain
void InteropOutputStream::WriteInt8Array(const int8_t* val, const int32_t len)
{
- GG_INTEROP_OUT_WRITE_ARRAY(val, len);
+ IGNITE_INTEROP_OUT_WRITE_ARRAY(val, len);
}
void InteropOutputStream::WriteBool(const bool val)
@@ -93,27 +93,27 @@ namespace gridgain
void InteropOutputStream::WriteInt16(const int16_t val)
{
- GG_INTEROP_OUT_WRITE(val, int16_t, 2);
+ IGNITE_INTEROP_OUT_WRITE(val, int16_t, 2);
}
void InteropOutputStream::WriteInt16Array(const int16_t* val, const int32_t len)
{
- GG_INTEROP_OUT_WRITE_ARRAY(val, len << 1);
+ IGNITE_INTEROP_OUT_WRITE_ARRAY(val, len << 1);
}
void InteropOutputStream::WriteUInt16(const uint16_t val)
{
- GG_INTEROP_OUT_WRITE(val, uint16_t, 2);
+ IGNITE_INTEROP_OUT_WRITE(val, uint16_t, 2);
}
void InteropOutputStream::WriteUInt16Array(const uint16_t* val, const int32_t len)
{
- GG_INTEROP_OUT_WRITE_ARRAY(val, len << 1);
+ IGNITE_INTEROP_OUT_WRITE_ARRAY(val, len << 1);
}
void InteropOutputStream::WriteInt32(const int32_t val)
{
- GG_INTEROP_OUT_WRITE(val, int32_t, 4);
+ IGNITE_INTEROP_OUT_WRITE(val, int32_t, 4);
}
void InteropOutputStream::WriteInt32(const int32_t pos, const int32_t val)
@@ -125,17 +125,17 @@ namespace gridgain
void InteropOutputStream::WriteInt32Array(const int32_t* val, const int32_t len)
{
- GG_INTEROP_OUT_WRITE_ARRAY(val, len << 2);
+ IGNITE_INTEROP_OUT_WRITE_ARRAY(val, len << 2);
}
void InteropOutputStream::WriteInt64(const int64_t val)
{
- GG_INTEROP_OUT_WRITE(val, int64_t, 8);
+ IGNITE_INTEROP_OUT_WRITE(val, int64_t, 8);
}
void InteropOutputStream::WriteInt64Array(const int64_t* val, const int32_t len)
{
- GG_INTEROP_OUT_WRITE_ARRAY(val, len << 3);
+ IGNITE_INTEROP_OUT_WRITE_ARRAY(val, len << 3);
}
void InteropOutputStream::WriteFloat(const float val)
http://git-wip-us.apache.org/repos/asf/ignite/blob/96245bfa/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
index d951070..5d6b845 100644
--- a/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
@@ -57,17 +57,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadInt8Array(int8_t* res, const int32_t len)
{
- return ReadRawArray<int8_t>(res, len, PortableUtils::ReadInt8Array, GG_TYPE_ARRAY_BYTE);
+ return ReadRawArray<int8_t>(res, len, PortableUtils::ReadInt8Array, IGNITE_TYPE_ARRAY_BYTE);
}
int8_t PortableReaderImpl::ReadInt8(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadInt8, GG_TYPE_BYTE, static_cast<int8_t>(0));
+ return Read(fieldName, PortableUtils::ReadInt8, IGNITE_TYPE_BYTE, static_cast<int8_t>(0));
}
int32_t PortableReaderImpl::ReadInt8Array(const char* fieldName, int8_t* res, const int32_t len)
{
- return ReadArray<int8_t>(fieldName, res, len,PortableUtils::ReadInt8Array, GG_TYPE_ARRAY_BYTE);
+ return ReadArray<int8_t>(fieldName, res, len,PortableUtils::ReadInt8Array, IGNITE_TYPE_ARRAY_BYTE);
}
bool PortableReaderImpl::ReadBool()
@@ -77,17 +77,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadBoolArray(bool* res, const int32_t len)
{
- return ReadRawArray<bool>(res, len, PortableUtils::ReadBoolArray, GG_TYPE_ARRAY_BOOL);
+ return ReadRawArray<bool>(res, len, PortableUtils::ReadBoolArray, IGNITE_TYPE_ARRAY_BOOL);
}
bool PortableReaderImpl::ReadBool(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadBool, GG_TYPE_BOOL, static_cast<bool>(0));
+ return Read(fieldName, PortableUtils::ReadBool, IGNITE_TYPE_BOOL, static_cast<bool>(0));
}
int32_t PortableReaderImpl::ReadBoolArray(const char* fieldName, bool* res, const int32_t len)
{
- return ReadArray<bool>(fieldName, res, len,PortableUtils::ReadBoolArray, GG_TYPE_ARRAY_BOOL);
+ return ReadArray<bool>(fieldName, res, len,PortableUtils::ReadBoolArray, IGNITE_TYPE_ARRAY_BOOL);
}
int16_t PortableReaderImpl::ReadInt16()
@@ -97,17 +97,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadInt16Array(int16_t* res, const int32_t len)
{
- return ReadRawArray<int16_t>(res, len, PortableUtils::ReadInt16Array, GG_TYPE_ARRAY_SHORT);
+ return ReadRawArray<int16_t>(res, len, PortableUtils::ReadInt16Array, IGNITE_TYPE_ARRAY_SHORT);
}
int16_t PortableReaderImpl::ReadInt16(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadInt16, GG_TYPE_SHORT, static_cast<int16_t>(0));
+ return Read(fieldName, PortableUtils::ReadInt16, IGNITE_TYPE_SHORT, static_cast<int16_t>(0));
}
int32_t PortableReaderImpl::ReadInt16Array(const char* fieldName, int16_t* res, const int32_t len)
{
- return ReadArray<int16_t>(fieldName, res, len, PortableUtils::ReadInt16Array, GG_TYPE_ARRAY_SHORT);
+ return ReadArray<int16_t>(fieldName, res, len, PortableUtils::ReadInt16Array, IGNITE_TYPE_ARRAY_SHORT);
}
uint16_t PortableReaderImpl::ReadUInt16()
@@ -117,17 +117,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadUInt16Array(uint16_t* res, const int32_t len)
{
- return ReadRawArray<uint16_t>(res, len, PortableUtils::ReadUInt16Array, GG_TYPE_ARRAY_CHAR);
+ return ReadRawArray<uint16_t>(res, len, PortableUtils::ReadUInt16Array, IGNITE_TYPE_ARRAY_CHAR);
}
uint16_t PortableReaderImpl::ReadUInt16(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadUInt16, GG_TYPE_CHAR, static_cast<uint16_t>(0));
+ return Read(fieldName, PortableUtils::ReadUInt16, IGNITE_TYPE_CHAR, static_cast<uint16_t>(0));
}
int32_t PortableReaderImpl::ReadUInt16Array(const char* fieldName, uint16_t* res, const int32_t len)
{
- return ReadArray<uint16_t>(fieldName, res, len,PortableUtils::ReadUInt16Array, GG_TYPE_ARRAY_CHAR);
+ return ReadArray<uint16_t>(fieldName, res, len,PortableUtils::ReadUInt16Array, IGNITE_TYPE_ARRAY_CHAR);
}
int32_t PortableReaderImpl::ReadInt32()
@@ -137,17 +137,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadInt32Array(int32_t* res, const int32_t len)
{
- return ReadRawArray<int32_t>(res, len, PortableUtils::ReadInt32Array, GG_TYPE_ARRAY_INT);
+ return ReadRawArray<int32_t>(res, len, PortableUtils::ReadInt32Array, IGNITE_TYPE_ARRAY_INT);
}
int32_t PortableReaderImpl::ReadInt32(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadInt32, GG_TYPE_INT, static_cast<int32_t>(0));
+ return Read(fieldName, PortableUtils::ReadInt32, IGNITE_TYPE_INT, static_cast<int32_t>(0));
}
int32_t PortableReaderImpl::ReadInt32Array(const char* fieldName, int32_t* res, const int32_t len)
{
- return ReadArray<int32_t>(fieldName, res, len,PortableUtils::ReadInt32Array, GG_TYPE_ARRAY_INT);
+ return ReadArray<int32_t>(fieldName, res, len,PortableUtils::ReadInt32Array, IGNITE_TYPE_ARRAY_INT);
}
int64_t PortableReaderImpl::ReadInt64()
@@ -157,17 +157,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadInt64Array(int64_t* res, const int32_t len)
{
- return ReadRawArray<int64_t>(res, len, PortableUtils::ReadInt64Array, GG_TYPE_ARRAY_LONG);
+ return ReadRawArray<int64_t>(res, len, PortableUtils::ReadInt64Array, IGNITE_TYPE_ARRAY_LONG);
}
int64_t PortableReaderImpl::ReadInt64(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadInt64, GG_TYPE_LONG, static_cast<int64_t>(0));
+ return Read(fieldName, PortableUtils::ReadInt64, IGNITE_TYPE_LONG, static_cast<int64_t>(0));
}
int32_t PortableReaderImpl::ReadInt64Array(const char* fieldName, int64_t* res, const int32_t len)
{
- return ReadArray<int64_t>(fieldName, res, len,PortableUtils::ReadInt64Array, GG_TYPE_ARRAY_LONG);
+ return ReadArray<int64_t>(fieldName, res, len,PortableUtils::ReadInt64Array, IGNITE_TYPE_ARRAY_LONG);
}
float PortableReaderImpl::ReadFloat()
@@ -177,17 +177,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadFloatArray(float* res, const int32_t len)
{
- return ReadRawArray<float>(res, len, PortableUtils::ReadFloatArray, GG_TYPE_ARRAY_FLOAT);
+ return ReadRawArray<float>(res, len, PortableUtils::ReadFloatArray, IGNITE_TYPE_ARRAY_FLOAT);
}
float PortableReaderImpl::ReadFloat(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadFloat, GG_TYPE_FLOAT, static_cast<float>(0));
+ return Read(fieldName, PortableUtils::ReadFloat, IGNITE_TYPE_FLOAT, static_cast<float>(0));
}
int32_t PortableReaderImpl::ReadFloatArray(const char* fieldName, float* res, const int32_t len)
{
- return ReadArray<float>(fieldName, res, len,PortableUtils::ReadFloatArray, GG_TYPE_ARRAY_FLOAT);
+ return ReadArray<float>(fieldName, res, len,PortableUtils::ReadFloatArray, IGNITE_TYPE_ARRAY_FLOAT);
}
double PortableReaderImpl::ReadDouble()
@@ -197,17 +197,17 @@ namespace gridgain
int32_t PortableReaderImpl::ReadDoubleArray(double* res, const int32_t len)
{
- return ReadRawArray<double>(res, len, PortableUtils::ReadDoubleArray, GG_TYPE_ARRAY_DOUBLE);
+ return ReadRawArray<double>(res, len, PortableUtils::ReadDoubleArray, IGNITE_TYPE_ARRAY_DOUBLE);
}
double PortableReaderImpl::ReadDouble(const char* fieldName)
{
- return Read(fieldName, PortableUtils::ReadDouble, GG_TYPE_DOUBLE, static_cast<double>(0));
+ return Read(fieldName, PortableUtils::ReadDouble, IGNITE_TYPE_DOUBLE, static_cast<double>(0));
}
int32_t PortableReaderImpl::ReadDoubleArray(const char* fieldName, double* res, const int32_t len)
{
- return ReadArray<double>(fieldName, res, len,PortableUtils::ReadDoubleArray, GG_TYPE_ARRAY_DOUBLE);
+ return ReadArray<double>(fieldName, res, len,PortableUtils::ReadDoubleArray, IGNITE_TYPE_ARRAY_DOUBLE);
}
Guid PortableReaderImpl::ReadGuid()
@@ -215,7 +215,7 @@ namespace gridgain
CheckRawMode(true);
CheckSingleMode(true);
- return ReadNullable(stream, PortableUtils::ReadGuid, GG_TYPE_UUID);
+ return ReadNullable(stream, PortableUtils::ReadGuid, IGNITE_TYPE_UUID);
}
int32_t PortableReaderImpl::ReadGuidArray(Guid* res, const int32_t len)
@@ -223,7 +223,7 @@ namespace gridgain
CheckRawMode(true);
CheckSingleMode(true);
- return ReadArrayInternal<Guid>(res, len, stream, ReadGuidArrayInternal, GG_TYPE_ARRAY_UUID);
+ return ReadArrayInternal<Guid>(res, len, stream, ReadGuidArrayInternal, IGNITE_TYPE_ARRAY_UUID);
}
Guid PortableReaderImpl::ReadGuid(const char* fieldName)
@@ -235,7 +235,7 @@ namespace gridgain
int32_t fieldLen = SeekField(fieldId);
if (fieldLen > 0)
- return ReadNullable(stream, PortableUtils::ReadGuid, GG_TYPE_UUID);
+ return ReadNullable(stream, PortableUtils::ReadGuid, IGNITE_TYPE_UUID);
return Guid();
}
@@ -251,7 +251,7 @@ namespace gridgain
int32_t fieldLen = SeekField(fieldId);
if (fieldLen > 0) {
- int32_t realLen = ReadArrayInternal<Guid>(res, len, stream, ReadGuidArrayInternal, GG_TYPE_ARRAY_UUID);
+ int32_t realLen = ReadArrayInternal<Guid>(res, len, stream, ReadGuidArrayInternal, IGNITE_TYPE_ARRAY_UUID);
// If actual read didn't occur return to initial position so that we do not perform
// N jumps to find the field again, where N is total amount of fields.
@@ -267,7 +267,7 @@ namespace gridgain
void PortableReaderImpl::ReadGuidArrayInternal(InteropInputStream* stream, Guid* res, const int32_t len)
{
for (int i = 0; i < len; i++)
- *(res + i) = ReadNullable<Guid>(stream, PortableUtils::ReadGuid, GG_TYPE_UUID);
+ *(res + i) = ReadNullable<Guid>(stream, PortableUtils::ReadGuid, IGNITE_TYPE_UUID);
}
int32_t PortableReaderImpl::ReadString(char* res, const int32_t len)
@@ -304,7 +304,7 @@ namespace gridgain
int32_t PortableReaderImpl::ReadStringArray(int32_t* size)
{
- return StartContainerSession(true, GG_TYPE_ARRAY_STRING, size);
+ return StartContainerSession(true, IGNITE_TYPE_ARRAY_STRING, size);
}
int32_t PortableReaderImpl::ReadStringArray(const char* fieldName, int32_t* size)
@@ -316,7 +316,7 @@ namespace gridgain
int32_t fieldLen = SeekField(fieldId);
if (fieldLen > 0)
- return StartContainerSession(false, GG_TYPE_ARRAY_STRING, size);
+ return StartContainerSession(false, IGNITE_TYPE_ARRAY_STRING, size);
else {
*size = -1;
@@ -347,7 +347,7 @@ namespace gridgain
{
int8_t hdr = stream->ReadInt8();
- if (hdr == GG_TYPE_STRING) {
+ if (hdr == IGNITE_TYPE_STRING) {
bool utf8Mode = stream->ReadBool();
int32_t realLen = stream->ReadInt32();
@@ -371,15 +371,15 @@ namespace gridgain
return realLen;
}
- else if (hdr != GG_HDR_NULL)
- ThrowOnInvalidHeader(GG_TYPE_ARRAY, hdr);
+ else if (hdr != IGNITE_HDR_NULL)
+ ThrowOnInvalidHeader(IGNITE_TYPE_ARRAY, hdr);
return -1;
}
int32_t PortableReaderImpl::ReadArray(int32_t* size)
{
- return StartContainerSession(true, GG_TYPE_ARRAY, size);
+ return StartContainerSession(true, IGNITE_TYPE_ARRAY, size);
}
int32_t PortableReaderImpl::ReadArray(const char* fieldName, int32_t* size)
@@ -391,7 +391,7 @@ namespace gridgain
int32_t fieldLen = SeekField(fieldId);
if (fieldLen > 0)
- return StartContainerSession(false, GG_TYPE_ARRAY, size);
+ return StartContainerSession(false, IGNITE_TYPE_ARRAY, size);
else {
*size = -1;
@@ -401,10 +401,10 @@ namespace gridgain
int32_t PortableReaderImpl::ReadCollection(CollectionType* typ, int32_t* size)
{
- int32_t id = StartContainerSession(true, GG_TYPE_COLLECTION, size);
+ int32_t id = StartContainerSession(true, IGNITE_TYPE_COLLECTION, size);
if (*size == -1)
- *typ = GG_COLLECTION_UNDEFINED;
+ *typ = IGNITE_COLLECTION_UNDEFINED;
else
*typ = static_cast<CollectionType>(stream->ReadInt8());
@@ -421,17 +421,17 @@ namespace gridgain
if (fieldLen > 0)
{
- int32_t id = StartContainerSession(false, GG_TYPE_COLLECTION, size);
+ int32_t id = StartContainerSession(false, IGNITE_TYPE_COLLECTION, size);
if (*size == -1)
- *typ = GG_COLLECTION_UNDEFINED;
+ *typ = IGNITE_COLLECTION_UNDEFINED;
else
*typ = static_cast<CollectionType>(stream->ReadInt8());
return id;
}
else {
- *typ = GG_COLLECTION_UNDEFINED;
+ *typ = IGNITE_COLLECTION_UNDEFINED;
*size = -1;
return ++elemIdGen;
@@ -440,10 +440,10 @@ namespace gridgain
int32_t PortableReaderImpl::ReadMap(MapType* typ, int32_t* size)
{
- int32_t id = StartContainerSession(true, GG_TYPE_MAP, size);
+ int32_t id = StartContainerSession(true, IGNITE_TYPE_MAP, size);
if (*size == -1)
- *typ = GG_MAP_UNDEFINED;
+ *typ = IGNITE_MAP_UNDEFINED;
else
*typ = static_cast<MapType>(stream->ReadInt8());
@@ -460,17 +460,17 @@ namespace gridgain
if (fieldLen > 0)
{
- int32_t id = StartContainerSession(false, GG_TYPE_MAP, size);
+ int32_t id = StartContainerSession(false, IGNITE_TYPE_MAP, size);
if (*size == -1)
- *typ = GG_MAP_UNDEFINED;
+ *typ = IGNITE_MAP_UNDEFINED;
else
*typ = static_cast<MapType>(stream->ReadInt8());
return id;
}
else {
- *typ = GG_MAP_UNDEFINED;
+ *typ = IGNITE_MAP_UNDEFINED;
*size = -1;
return ++elemIdGen;
@@ -494,49 +494,49 @@ namespace gridgain
template <>
int8_t PortableReaderImpl::ReadTopObject<int8_t>()
{
- return ReadTopObject0(GG_TYPE_BYTE, PortableUtils::ReadInt8, static_cast<int8_t>(0));
+ return ReadTopObject0(IGNITE_TYPE_BYTE, PortableUtils::ReadInt8, static_cast<int8_t>(0));
}
template <>
bool PortableReaderImpl::ReadTopObject<bool>()
{
- return ReadTopObject0(GG_TYPE_BOOL, PortableUtils::ReadBool, static_cast<bool>(0));
+ return ReadTopObject0(IGNITE_TYPE_BOOL, PortableUtils::ReadBool, static_cast<bool>(0));
}
template <>
int16_t PortableReaderImpl::ReadTopObject<int16_t>()
{
- return ReadTopObject0(GG_TYPE_SHORT, PortableUtils::ReadInt16, static_cast<int16_t>(0));
+ return ReadTopObject0(IGNITE_TYPE_SHORT, PortableUtils::ReadInt16, static_cast<int16_t>(0));
}
template <>
uint16_t PortableReaderImpl::ReadTopObject<uint16_t>()
{
- return ReadTopObject0(GG_TYPE_CHAR, PortableUtils::ReadUInt16, static_cast<uint16_t>(0));
+ return ReadTopObject0(IGNITE_TYPE_CHAR, PortableUtils::ReadUInt16, static_cast<uint16_t>(0));
}
template <>
int32_t PortableReaderImpl::ReadTopObject<int32_t>()
{
- return ReadTopObject0(GG_TYPE_INT, PortableUtils::ReadInt32, static_cast<int32_t>(0));
+ return ReadTopObject0(IGNITE_TYPE_INT, PortableUtils::ReadInt32, static_cast<int32_t>(0));
}
template <>
int64_t PortableReaderImpl::ReadTopObject<int64_t>()
{
- return ReadTopObject0(GG_TYPE_LONG, PortableUtils::ReadInt64, static_cast<int64_t>(0));
+ return ReadTopObject0(IGNITE_TYPE_LONG, PortableUtils::ReadInt64, static_cast<int64_t>(0));
}
template <>
float PortableReaderImpl::ReadTopObject<float>()
{
- return ReadTopObject0(GG_TYPE_FLOAT, PortableUtils::ReadFloat, static_cast<float>(0));
+ return ReadTopObject0(IGNITE_TYPE_FLOAT, PortableUtils::ReadFloat, static_cast<float>(0));
}
template <>
double PortableReaderImpl::ReadTopObject<double>()
{
- return ReadTopObject0(GG_TYPE_DOUBLE, PortableUtils::ReadDouble, static_cast<double>(0));
+ return ReadTopObject0(IGNITE_TYPE_DOUBLE, PortableUtils::ReadDouble, static_cast<double>(0));
}
template <>
@@ -544,14 +544,14 @@ namespace gridgain
{
int8_t typeId = stream->ReadInt8();
- if (typeId == GG_TYPE_UUID)
+ if (typeId == IGNITE_TYPE_UUID)
return PortableUtils::ReadGuid(stream);
- else if (typeId == GG_HDR_NULL)
+ else if (typeId == IGNITE_HDR_NULL)
return Guid();
else {
int32_t pos = stream->Position() - 1;
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", GG_TYPE_UUID, "actual", typeId)
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", IGNITE_TYPE_UUID, "actual", typeId)
}
}
@@ -603,20 +603,20 @@ namespace gridgain
void PortableReaderImpl::CheckRawMode(bool expected)
{
if (expected && !rawMode) {
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.")
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.")
}
else if (!expected && rawMode) {
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed in raw mode.")
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed in raw mode.")
}
}
void PortableReaderImpl::CheckSingleMode(bool expected)
{
if (expected && elemId != 0) {
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being read.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being read.");
}
else if (!expected && elemId == 0) {
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only when container is being read.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only when container is being read.");
}
}
@@ -648,7 +648,7 @@ namespace gridgain
return ++elemIdGen;
}
}
- else if (hdr == GG_HDR_NULL) {
+ else if (hdr == IGNITE_HDR_NULL) {
*size = -1;
return ++elemIdGen;
@@ -663,13 +663,13 @@ namespace gridgain
void PortableReaderImpl::CheckSession(int32_t expSes)
{
if (elemId != expSes) {
- GG_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Containter read session has been finished or is not started yet.");
+ IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Containter read session has been finished or is not started yet.");
}
}
void PortableReaderImpl::ThrowOnInvalidHeader(int32_t pos, int8_t expHdr, int8_t hdr)
{
- GG_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", hdr)
+ IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", hdr)
}
void PortableReaderImpl::ThrowOnInvalidHeader(int8_t expHdr, int8_t hdr)