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/11/09 11:45:44 UTC
[14/14] ignite git commit: IGNITE-1846: CPP: "portable" -> "binary",
"metadata" -> "type".
IGNITE-1846: CPP: "portable" -> "binary", "metadata" -> "type".
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/303d79eb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/303d79eb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/303d79eb
Branch: refs/heads/ignite-1282
Commit: 303d79ebebb5c2400940b09bf2ca01467ac615bc
Parents: 80be22b
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Nov 9 13:45:56 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Nov 9 13:45:56 2015 +0300
----------------------------------------------------------------------
modules/platforms/cpp/README.txt | 2 +-
modules/platforms/cpp/core-test/Makefile.am | 8 +-
.../platforms/cpp/core-test/include/Makefile.am | 4 +-
.../core-test/include/ignite/binary_test_defs.h | 320 +++
.../include/ignite/binary_test_utils.h | 516 ++++
.../include/ignite/portable_test_defs.h | 320 ---
.../include/ignite/portable_test_utils.h | 516 ----
.../cpp/core-test/project/vs/core-test.vcxproj | 12 +-
.../project/vs/core-test.vcxproj.filters | 32 +-
.../src/binary_reader_writer_raw_test.cpp | 1593 ++++++++++++
.../core-test/src/binary_reader_writer_test.cpp | 2373 ++++++++++++++++++
.../cpp/core-test/src/binary_session_test.cpp | 257 ++
.../cpp/core-test/src/binary_test_defs.cpp | 65 +
.../cpp/core-test/src/cache_query_test.cpp | 26 +-
.../platforms/cpp/core-test/src/cache_test.cpp | 24 +-
.../src/portable_reader_writer_raw_test.cpp | 1593 ------------
.../src/portable_reader_writer_test.cpp | 2373 ------------------
.../cpp/core-test/src/portable_session_test.cpp | 257 --
.../cpp/core-test/src/portable_test_defs.cpp | 65 -
modules/platforms/cpp/core/Makefile.am | 30 +-
modules/platforms/cpp/core/include/Makefile.am | 38 +-
.../cpp/core/include/ignite/binary/binary.h | 29 +
.../core/include/ignite/binary/binary_consts.h | 106 +
.../include/ignite/binary/binary_containers.h | 525 ++++
.../include/ignite/binary/binary_raw_reader.h | 350 +++
.../include/ignite/binary/binary_raw_writer.h | 326 +++
.../core/include/ignite/binary/binary_reader.h | 384 +++
.../core/include/ignite/binary/binary_type.h | 293 +++
.../core/include/ignite/binary/binary_writer.h | 362 +++
.../include/ignite/cache/query/query_argument.h | 6 +-
.../include/ignite/cache/query/query_scan.h | 4 +-
.../core/include/ignite/cache/query/query_sql.h | 4 +-
.../ignite/cache/query/query_sql_fields.h | 4 +-
.../include/ignite/cache/query/query_text.h | 4 +-
.../cpp/core/include/ignite/ignite_error.h | 4 +-
.../include/ignite/impl/binary/binary_common.h | 182 ++
.../ignite/impl/binary/binary_id_resolver.h | 106 +
.../ignite/impl/binary/binary_reader_impl.h | 1311 ++++++++++
.../include/ignite/impl/binary/binary_schema.h | 136 +
.../ignite/impl/binary/binary_type_handler.h | 102 +
.../ignite/impl/binary/binary_type_manager.h | 120 +
.../ignite/impl/binary/binary_type_snapshot.h | 122 +
.../ignite/impl/binary/binary_type_updater.h | 53 +
.../impl/binary/binary_type_updater_impl.h | 65 +
.../include/ignite/impl/binary/binary_utils.h | 344 +++
.../ignite/impl/binary/binary_writer_impl.h | 913 +++++++
.../core/include/ignite/impl/cache/cache_impl.h | 4 +-
.../impl/cache/query/query_fields_row_impl.h | 2 +-
.../include/ignite/impl/ignite_environment.h | 12 +-
.../cpp/core/include/ignite/impl/operations.h | 30 +-
.../ignite/impl/portable/portable_common.h | 182 --
.../ignite/impl/portable/portable_id_resolver.h | 106 -
.../impl/portable/portable_metadata_handler.h | 102 -
.../impl/portable/portable_metadata_manager.h | 120 -
.../impl/portable/portable_metadata_snapshot.h | 122 -
.../impl/portable/portable_metadata_updater.h | 53 -
.../portable/portable_metadata_updater_impl.h | 65 -
.../ignite/impl/portable/portable_reader_impl.h | 1311 ----------
.../ignite/impl/portable/portable_schema.h | 136 -
.../ignite/impl/portable/portable_utils.h | 344 ---
.../ignite/impl/portable/portable_writer_impl.h | 912 -------
.../cpp/core/include/ignite/portable/portable.h | 29 -
.../include/ignite/portable/portable_consts.h | 106 -
.../ignite/portable/portable_containers.h | 525 ----
.../ignite/portable/portable_raw_reader.h | 350 ---
.../ignite/portable/portable_raw_writer.h | 326 ---
.../include/ignite/portable/portable_reader.h | 384 ---
.../include/ignite/portable/portable_type.h | 293 ---
.../include/ignite/portable/portable_writer.h | 362 ---
.../platforms/cpp/core/project/vs/core.vcxproj | 68 +-
.../cpp/core/project/vs/core.vcxproj.filters | 200 +-
.../cpp/core/src/binary/binary_containers.cpp | 76 +
.../cpp/core/src/binary/binary_raw_reader.cpp | 145 ++
.../cpp/core/src/binary/binary_raw_writer.cpp | 147 ++
.../cpp/core/src/binary/binary_reader.cpp | 152 ++
.../cpp/core/src/binary/binary_type.cpp | 51 +
.../cpp/core/src/binary/binary_writer.cpp | 154 ++
.../core/src/impl/binary/binary_reader_impl.cpp | 760 ++++++
.../cpp/core/src/impl/binary/binary_schema.cpp | 135 +
.../src/impl/binary/binary_type_handler.cpp | 78 +
.../src/impl/binary/binary_type_manager.cpp | 201 ++
.../src/impl/binary/binary_type_snapshot.cpp | 70 +
.../src/impl/binary/binary_type_updater.cpp | 32 +
.../impl/binary/binary_type_updater_impl.cpp | 94 +
.../cpp/core/src/impl/binary/binary_utils.cpp | 211 ++
.../core/src/impl/binary/binary_writer_impl.cpp | 622 +++++
.../cpp/core/src/impl/cache/cache_impl.cpp | 18 +-
.../core/src/impl/cache/query/query_impl.cpp | 6 +-
.../cpp/core/src/impl/ignite_environment.cpp | 14 +-
.../src/impl/interop/interop_input_stream.cpp | 8 +-
.../src/impl/interop/interop_output_stream.cpp | 8 +-
.../impl/portable/portable_metadata_handler.cpp | 78 -
.../impl/portable/portable_metadata_manager.cpp | 201 --
.../portable/portable_metadata_snapshot.cpp | 70 -
.../impl/portable/portable_metadata_updater.cpp | 32 -
.../portable/portable_metadata_updater_impl.cpp | 94 -
.../src/impl/portable/portable_reader_impl.cpp | 760 ------
.../core/src/impl/portable/portable_schema.cpp | 135 -
.../core/src/impl/portable/portable_utils.cpp | 211 --
.../src/impl/portable/portable_writer_impl.cpp | 622 -----
.../core/src/portable/portable_containers.cpp | 76 -
.../core/src/portable/portable_raw_reader.cpp | 145 --
.../core/src/portable/portable_raw_writer.cpp | 147 --
.../cpp/core/src/portable/portable_reader.cpp | 152 --
.../cpp/core/src/portable/portable_type.cpp | 51 -
.../cpp/core/src/portable/portable_writer.cpp | 154 --
.../cpp/examples/config/example-cache.xml | 2 +-
.../examples/include/ignite/examples/address.h | 14 +-
.../include/ignite/examples/organization.h | 14 +-
109 files changed, 14182 insertions(+), 14181 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/README.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/README.txt b/modules/platforms/cpp/README.txt
index b71dfe7..7053964 100644
--- a/modules/platforms/cpp/README.txt
+++ b/modules/platforms/cpp/README.txt
@@ -6,7 +6,7 @@ Using Apache Ignite C++ APIs you can execute perform concurrent operations on
the data stored in cache.
Apache Ignite C++ can access cluster and share data with .Net and
-Java applications using portable object format.
+Java applications using binary object format.
Support for the following will be added in next releases:
* ACID transactions management.
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/Makefile.am b/modules/platforms/cpp/core-test/Makefile.am
index 9ed3111..aa81c65 100644
--- a/modules/platforms/cpp/core-test/Makefile.am
+++ b/modules/platforms/cpp/core-test/Makefile.am
@@ -30,10 +30,10 @@ ignite_tests_SOURCES = src/cache_test.cpp \
src/concurrent_test.cpp \
src/ignition_test.cpp \
src/handle_registry_test.cpp \
- src/portable_test_defs.cpp \
- src/portable_reader_writer_raw_test.cpp \
- src/portable_reader_writer_test.cpp \
- src/portable_session_test.cpp \
+ src/binary_test_defs.cpp \
+ src/binary_reader_writer_raw_test.cpp \
+ src/binary_reader_writer_test.cpp \
+ src/binary_session_test.cpp \
src/teamcity_messages.cpp \
src/teamcity_boost.cpp
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/Makefile.am b/modules/platforms/cpp/core-test/include/Makefile.am
index c43103e..cc0ab5e 100644
--- a/modules/platforms/cpp/core-test/include/Makefile.am
+++ b/modules/platforms/cpp/core-test/include/Makefile.am
@@ -18,5 +18,5 @@
ACLOCAL_AMFLAGS = "-Im4"
nobase_include_HEADERS = teamcity_messages.h \
- ignite/portable_test_defs.h \
- ignite/portable_test_utils.h
+ ignite/binary_test_defs.h \
+ ignite/binary_test_utils.h
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h b/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
new file mode 100644
index 0000000..00b17e2
--- /dev/null
+++ b/modules/platforms/cpp/core-test/include/ignite/binary_test_defs.h
@@ -0,0 +1,320 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE_BINARY_TEST_DEFS
+#define _IGNITE_BINARY_TEST_DEFS
+
+#include <stdexcept>
+#include <stdint.h>
+
+#include "ignite/binary/binary.h"
+
+namespace ignite_test
+{
+ namespace core
+ {
+ namespace binary
+ {
+ class BinaryDummy
+ {
+ // No-op.
+ };
+
+ class BinaryInner
+ {
+ public:
+ BinaryInner();
+
+ BinaryInner(int32_t val);
+
+ int32_t GetValue() const;
+ private:
+ int32_t val;
+ };
+
+ class BinaryOuter
+ {
+ public:
+ BinaryOuter(int32_t valIn, int32_t valOut);
+
+ BinaryInner GetInner() const;
+
+ int32_t GetValue() const;
+ private:
+ BinaryInner inner;
+ int32_t val;
+ };
+
+ struct BinaryFields
+ {
+ int32_t val1;
+ int32_t val2;
+ int32_t rawVal1;
+ int32_t rawVal2;
+
+ BinaryFields() : val1(0), val2(0), rawVal1(0), rawVal2(0)
+ {
+ // No-op.
+ }
+
+ BinaryFields(int32_t val1, int32_t val2, int32_t rawVal1, int32_t rawVal2) :
+ val1(val1), val2(val2), rawVal1(rawVal1), rawVal2(rawVal2)
+ {
+ // No-op.
+ }
+ };
+ }
+ }
+}
+
+namespace ignite
+{
+ namespace binary
+ {
+ namespace gt = ignite_test::core::binary;
+
+ template<>
+ struct BinaryType<gt::BinaryDummy>
+ {
+ /** <inheritdoc /> */
+ int32_t GetTypeId()
+ {
+ return GetBinaryStringHashCode("BinaryDummy");
+ }
+
+ /** <inheritdoc /> */
+ std::string GetTypeName()
+ {
+ return "BinaryDummy";
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetFieldId(const char* name)
+ {
+ return GetBinaryStringHashCode(name);
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetHashCode(const gt::BinaryInner& obj)
+ {
+ return obj.GetValue();
+ }
+
+ /** <inheritdoc /> */
+ bool IsNull(const gt::BinaryInner& obj)
+ {
+ return obj.GetValue() == 0;
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryInner GetNull()
+ {
+ return gt::BinaryInner(0);
+ }
+
+ /** <inheritdoc /> */
+ void Write(BinaryWriter& writer, const gt::BinaryDummy& obj)
+ {
+ // No-op.
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryDummy Read(BinaryReader& reader)
+ {
+ return gt::BinaryDummy();
+ }
+ };
+
+ template<>
+ struct BinaryType<gt::BinaryInner>
+ {
+ /** <inheritdoc /> */
+ int32_t GetTypeId()
+ {
+ return GetBinaryStringHashCode("BinaryInner");
+ }
+
+ /** <inheritdoc /> */
+ std::string GetTypeName()
+ {
+ return "BinaryInner";
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetFieldId(const char* name)
+ {
+ return GetBinaryStringHashCode(name);
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetHashCode(const gt::BinaryInner& obj)
+ {
+ return obj.GetValue();
+ }
+
+ /** <inheritdoc /> */
+ bool IsNull(const gt::BinaryInner& obj)
+ {
+ return obj.GetValue() == 0;
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryInner GetNull()
+ {
+ return gt::BinaryInner(0);
+ }
+
+ /** <inheritdoc /> */
+ void Write(BinaryWriter& writer, const gt::BinaryInner& obj)
+ {
+ writer.WriteInt32("val", obj.GetValue());
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryInner Read(BinaryReader& reader)
+ {
+ int val = reader.ReadInt32("val");
+
+ return gt::BinaryInner(val);
+ }
+ };
+
+ template<>
+ struct BinaryType<gt::BinaryOuter>
+ {
+ /** <inheritdoc /> */
+ int32_t GetTypeId()
+ {
+ return GetBinaryStringHashCode("BinaryOuter");
+ }
+
+ /** <inheritdoc /> */
+ std::string GetTypeName()
+ {
+ return "BinaryOuter";
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetFieldId(const char* name)
+ {
+ return GetBinaryStringHashCode(name);
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetHashCode(const gt::BinaryOuter& obj)
+ {
+ return obj.GetValue() + obj.GetInner().GetValue();
+ }
+
+ /** <inheritdoc /> */
+ bool IsNull(const gt::BinaryOuter& obj)
+ {
+ return obj.GetValue() == 0 && obj.GetInner().GetValue();
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryOuter GetNull()
+ {
+ return gt::BinaryOuter(0, 0);
+ }
+
+ /** <inheritdoc /> */
+ void Write(BinaryWriter& writer, const gt::BinaryOuter& obj)
+ {
+ writer.WriteObject("inner", obj.GetInner());
+ writer.WriteInt32("val", obj.GetValue());
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryOuter Read(BinaryReader& reader)
+ {
+ gt::BinaryInner inner = reader.ReadObject<gt::BinaryInner>("inner");
+ int val = reader.ReadInt32("val");
+
+ return gt::BinaryOuter(inner.GetValue(), val);
+ }
+ };
+
+ template<>
+ struct BinaryType<gt::BinaryFields>
+ {
+ /** <inheritdoc /> */
+ int32_t GetTypeId()
+ {
+ return GetBinaryStringHashCode("BinaryFields");
+ }
+
+ /** <inheritdoc /> */
+ std::string GetTypeName()
+ {
+ return "BinaryFields";
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetFieldId(const char* name)
+ {
+ return GetBinaryStringHashCode(name);
+ }
+
+ /** <inheritdoc /> */
+ int32_t GetHashCode(const gt::BinaryFields& obj)
+ {
+ return obj.val1 + obj.val2 + obj.rawVal1 + obj.rawVal2;
+ }
+
+ /** <inheritdoc /> */
+ bool IsNull(const gt::BinaryFields& obj)
+ {
+ return false;
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryFields GetNull()
+ {
+ throw std::runtime_error("Must not be called.");
+ }
+
+ /** <inheritdoc /> */
+ void Write(BinaryWriter& writer, const gt::BinaryFields& obj)
+ {
+ writer.WriteInt32("val1", obj.val1);
+ writer.WriteInt32("val2", obj.val2);
+
+ BinaryRawWriter rawWriter = writer.RawWriter();
+
+ rawWriter.WriteInt32(obj.rawVal1);
+ rawWriter.WriteInt32(obj.rawVal2);
+ }
+
+ /** <inheritdoc /> */
+ gt::BinaryFields Read(BinaryReader& reader)
+ {
+ int32_t val1 = reader.ReadInt32("val1");
+ int32_t val2 = reader.ReadInt32("val2");
+
+ BinaryRawReader rawReader = reader.RawReader();
+
+ int32_t rawVal1 = rawReader.ReadInt32();
+ int32_t rawVal2 = rawReader.ReadInt32();
+
+ return gt::BinaryFields(val1, val2, rawVal1, rawVal2);
+ }
+ };
+ }
+}
+
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/include/ignite/binary_test_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/ignite/binary_test_utils.h b/modules/platforms/cpp/core-test/include/ignite/binary_test_utils.h
new file mode 100644
index 0000000..19965a0
--- /dev/null
+++ b/modules/platforms/cpp/core-test/include/ignite/binary_test_utils.h
@@ -0,0 +1,516 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE_BINARY_TEST_UTILS
+#define _IGNITE_BINARY_TEST_UTILS
+
+#include "ignite/binary/binary.h"
+
+using namespace ignite;
+using namespace ignite::binary;
+using namespace ignite::impl::binary;
+
+namespace ignite_test
+{
+ namespace core
+ {
+ namespace binary
+ {
+ template<typename T>
+ inline void Write(BinaryRawWriter& writer, T val)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<typename T>
+ inline T Read(BinaryRawReader& reader)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, int8_t val)
+ {
+ writer.WriteInt8(val);
+ }
+
+ template<>
+ inline int8_t Read(BinaryRawReader& reader)
+ {
+ return reader.ReadInt8();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, bool val)
+ {
+ writer.WriteBool(val);
+ }
+
+ template<>
+ inline bool Read(BinaryRawReader& reader)
+ {
+ return reader.ReadBool();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, int16_t val)
+ {
+ writer.WriteInt16(val);
+ }
+
+ template<>
+ inline int16_t Read(BinaryRawReader& reader)
+ {
+ return reader.ReadInt16();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, uint16_t val)
+ {
+ writer.WriteUInt16(val);
+ }
+
+ template<>
+ inline uint16_t Read(BinaryRawReader& reader)
+ {
+ return reader.ReadUInt16();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, int32_t val)
+ {
+ writer.WriteInt32(val);
+ }
+
+ template<>
+ inline int32_t Read(BinaryRawReader& reader)
+ {
+ return reader.ReadInt32();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, int64_t val)
+ {
+ writer.WriteInt64(val);
+ }
+
+ template<>
+ inline int64_t Read(BinaryRawReader& reader)
+ {
+ return reader.ReadInt64();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, float val)
+ {
+ writer.WriteFloat(val);
+ }
+
+ template<>
+ inline float Read(BinaryRawReader& reader)
+ {
+ return reader.ReadFloat();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, double val)
+ {
+ writer.WriteDouble(val);
+ }
+
+ template<>
+ inline double Read(BinaryRawReader& reader)
+ {
+ return reader.ReadDouble();
+ }
+
+ template<>
+ inline void Write(BinaryRawWriter& writer, Guid val)
+ {
+ writer.WriteGuid(val);
+ }
+
+ template<>
+ inline Guid Read(BinaryRawReader& reader)
+ {
+ return reader.ReadGuid();
+ }
+
+ template<typename T>
+ inline void WriteArray(BinaryRawWriter& writer, T* val, int32_t len)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<typename T>
+ inline int32_t ReadArray(BinaryRawReader& reader, T* val, int32_t len)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, int8_t* val, int32_t len)
+ {
+ writer.WriteInt8Array(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, int8_t* val, int32_t len)
+ {
+ return reader.ReadInt8Array(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, bool* val, int32_t len)
+ {
+ writer.WriteBoolArray(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, bool* val, int32_t len)
+ {
+ return reader.ReadBoolArray(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, int16_t* val, int32_t len)
+ {
+ writer.WriteInt16Array(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, int16_t* val, int32_t len)
+ {
+ return reader.ReadInt16Array(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, uint16_t* val, int32_t len)
+ {
+ writer.WriteUInt16Array(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, uint16_t* val, int32_t len)
+ {
+ return reader.ReadUInt16Array(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, int32_t* val, int32_t len)
+ {
+ writer.WriteInt32Array(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, int32_t* val, int32_t len)
+ {
+ return reader.ReadInt32Array(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, int64_t* val, int32_t len)
+ {
+ writer.WriteInt64Array(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, int64_t* val, int32_t len)
+ {
+ return reader.ReadInt64Array(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, float* val, int32_t len)
+ {
+ writer.WriteFloatArray(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, float* val, int32_t len)
+ {
+ return reader.ReadFloatArray(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, double* val, int32_t len)
+ {
+ writer.WriteDoubleArray(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, double* val, int32_t len)
+ {
+ return reader.ReadDoubleArray(val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryRawWriter& writer, Guid* val, int32_t len)
+ {
+ writer.WriteGuidArray(val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryRawReader& reader, Guid* val, int32_t len)
+ {
+ return reader.ReadGuidArray(val, len);
+ }
+
+ template<typename T>
+ inline void Write(BinaryWriter& writer, const char* fieldName, T val)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<typename T>
+ inline T Read(BinaryReader& reader, const char* fieldName)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, int8_t val)
+ {
+ writer.WriteInt8(fieldName, val);
+ }
+
+ template<>
+ inline int8_t Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadInt8(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, bool val)
+ {
+ writer.WriteBool(fieldName, val);
+ }
+
+ template<>
+ inline bool Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadBool(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, int16_t val)
+ {
+ writer.WriteInt16(fieldName, val);
+ }
+
+ template<>
+ inline int16_t Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadInt16(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, uint16_t val)
+ {
+ writer.WriteUInt16(fieldName, val);
+ }
+
+ template<>
+ inline uint16_t Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadUInt16(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, int32_t val)
+ {
+ writer.WriteInt32(fieldName, val);
+ }
+
+ template<>
+ inline int32_t Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadInt32(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, int64_t val)
+ {
+ writer.WriteInt64(fieldName, val);
+ }
+
+ template<>
+ inline int64_t Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadInt64(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, float val)
+ {
+ writer.WriteFloat(fieldName, val);
+ }
+
+ template<>
+ inline float Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadFloat(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, double val)
+ {
+ writer.WriteDouble(fieldName, val);
+ }
+
+ template<>
+ inline double Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadDouble(fieldName);
+ }
+
+ template<>
+ inline void Write(BinaryWriter& writer, const char* fieldName, Guid val)
+ {
+ writer.WriteGuid(fieldName, val);
+ }
+
+ template<>
+ inline Guid Read(BinaryReader& reader, const char* fieldName)
+ {
+ return reader.ReadGuid(fieldName);
+ }
+
+ template<typename T>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, T* val, int32_t len)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<typename T>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, T* val, int32_t len)
+ {
+ throw std::runtime_error("Function is not defined");
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, int8_t* val, int32_t len)
+ {
+ writer.WriteInt8Array(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, int8_t* val, int32_t len)
+ {
+ return reader.ReadInt8Array(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, bool* val, int32_t len)
+ {
+ writer.WriteBoolArray(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, bool* val, int32_t len)
+ {
+ return reader.ReadBoolArray(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, int16_t* val, int32_t len)
+ {
+ writer.WriteInt16Array(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, int16_t* val, int32_t len)
+ {
+ return reader.ReadInt16Array(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, uint16_t* val, int32_t len)
+ {
+ writer.WriteUInt16Array(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, uint16_t* val, int32_t len)
+ {
+ return reader.ReadUInt16Array(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, int32_t* val, int32_t len)
+ {
+ writer.WriteInt32Array(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, int32_t* val, int32_t len)
+ {
+ return reader.ReadInt32Array(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, int64_t* val, int32_t len)
+ {
+ writer.WriteInt64Array(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, int64_t* val, int32_t len)
+ {
+ return reader.ReadInt64Array(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, float* val, int32_t len)
+ {
+ writer.WriteFloatArray(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, float* val, int32_t len)
+ {
+ return reader.ReadFloatArray(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, double* val, int32_t len)
+ {
+ writer.WriteDoubleArray(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, double* val, int32_t len)
+ {
+ return reader.ReadDoubleArray(fieldName, val, len);
+ }
+
+ template<>
+ inline void WriteArray(BinaryWriter& writer, const char* fieldName, Guid* val, int32_t len)
+ {
+ writer.WriteGuidArray(fieldName, val, len);
+ }
+
+ template<>
+ inline int32_t ReadArray(BinaryReader& reader, const char* fieldName, Guid* val, int32_t len)
+ {
+ return reader.ReadGuidArray(fieldName, val, len);
+ }
+ }
+ }
+}
+
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/include/ignite/portable_test_defs.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/ignite/portable_test_defs.h b/modules/platforms/cpp/core-test/include/ignite/portable_test_defs.h
deleted file mode 100644
index bae0118..0000000
--- a/modules/platforms/cpp/core-test/include/ignite/portable_test_defs.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_PORTABLE_TEST_DEFS
-#define _IGNITE_PORTABLE_TEST_DEFS
-
-#include <stdexcept>
-#include <stdint.h>
-
-#include "ignite/portable/portable.h"
-
-namespace ignite_test
-{
- namespace core
- {
- namespace portable
- {
- class PortableDummy
- {
- // No-op.
- };
-
- class PortableInner
- {
- public:
- PortableInner();
-
- PortableInner(int32_t val);
-
- int32_t GetValue() const;
- private:
- int32_t val;
- };
-
- class PortableOuter
- {
- public:
- PortableOuter(int32_t valIn, int32_t valOut);
-
- PortableInner GetInner() const;
-
- int32_t GetValue() const;
- private:
- PortableInner inner;
- int32_t val;
- };
-
- struct PortableFields
- {
- int32_t val1;
- int32_t val2;
- int32_t rawVal1;
- int32_t rawVal2;
-
- PortableFields() : val1(0), val2(0), rawVal1(0), rawVal2(0)
- {
- // No-op.
- }
-
- PortableFields(int32_t val1, int32_t val2, int32_t rawVal1, int32_t rawVal2) :
- val1(val1), val2(val2), rawVal1(rawVal1), rawVal2(rawVal2)
- {
- // No-op.
- }
- };
- }
- }
-}
-
-namespace ignite
-{
- namespace portable
- {
- namespace gt = ignite_test::core::portable;
-
- template<>
- struct PortableType<gt::PortableDummy>
- {
- /** <inheritdoc /> */
- int32_t GetTypeId()
- {
- return GetPortableStringHashCode("PortableDummy");
- }
-
- /** <inheritdoc /> */
- std::string GetTypeName()
- {
- return "PortableDummy";
- }
-
- /** <inheritdoc /> */
- int32_t GetFieldId(const char* name)
- {
- return GetPortableStringHashCode(name);
- }
-
- /** <inheritdoc /> */
- int32_t GetHashCode(const gt::PortableInner& obj)
- {
- return obj.GetValue();
- }
-
- /** <inheritdoc /> */
- bool IsNull(const gt::PortableInner& obj)
- {
- return obj.GetValue() == 0;
- }
-
- /** <inheritdoc /> */
- gt::PortableInner GetNull()
- {
- return gt::PortableInner(0);
- }
-
- /** <inheritdoc /> */
- void Write(PortableWriter& writer, const gt::PortableDummy& obj)
- {
- // No-op.
- }
-
- /** <inheritdoc /> */
- gt::PortableDummy Read(PortableReader& reader)
- {
- return gt::PortableDummy();
- }
- };
-
- template<>
- struct PortableType<gt::PortableInner>
- {
- /** <inheritdoc /> */
- int32_t GetTypeId()
- {
- return GetPortableStringHashCode("PortableInner");
- }
-
- /** <inheritdoc /> */
- std::string GetTypeName()
- {
- return "PortableInner";
- }
-
- /** <inheritdoc /> */
- int32_t GetFieldId(const char* name)
- {
- return GetPortableStringHashCode(name);
- }
-
- /** <inheritdoc /> */
- int32_t GetHashCode(const gt::PortableInner& obj)
- {
- return obj.GetValue();
- }
-
- /** <inheritdoc /> */
- bool IsNull(const gt::PortableInner& obj)
- {
- return obj.GetValue() == 0;
- }
-
- /** <inheritdoc /> */
- gt::PortableInner GetNull()
- {
- return gt::PortableInner(0);
- }
-
- /** <inheritdoc /> */
- void Write(PortableWriter& writer, const gt::PortableInner& obj)
- {
- writer.WriteInt32("val", obj.GetValue());
- }
-
- /** <inheritdoc /> */
- gt::PortableInner Read(PortableReader& reader)
- {
- int val = reader.ReadInt32("val");
-
- return gt::PortableInner(val);
- }
- };
-
- template<>
- struct PortableType<gt::PortableOuter>
- {
- /** <inheritdoc /> */
- int32_t GetTypeId()
- {
- return GetPortableStringHashCode("PortableOuter");
- }
-
- /** <inheritdoc /> */
- std::string GetTypeName()
- {
- return "PortableOuter";
- }
-
- /** <inheritdoc /> */
- int32_t GetFieldId(const char* name)
- {
- return GetPortableStringHashCode(name);
- }
-
- /** <inheritdoc /> */
- int32_t GetHashCode(const gt::PortableOuter& obj)
- {
- return obj.GetValue() + obj.GetInner().GetValue();
- }
-
- /** <inheritdoc /> */
- bool IsNull(const gt::PortableOuter& obj)
- {
- return obj.GetValue() == 0 && obj.GetInner().GetValue();
- }
-
- /** <inheritdoc /> */
- gt::PortableOuter GetNull()
- {
- return gt::PortableOuter(0, 0);
- }
-
- /** <inheritdoc /> */
- void Write(PortableWriter& writer, const gt::PortableOuter& obj)
- {
- writer.WriteObject("inner", obj.GetInner());
- writer.WriteInt32("val", obj.GetValue());
- }
-
- /** <inheritdoc /> */
- gt::PortableOuter Read(PortableReader& reader)
- {
- gt::PortableInner inner = reader.ReadObject<gt::PortableInner>("inner");
- int val = reader.ReadInt32("val");
-
- return gt::PortableOuter(inner.GetValue(), val);
- }
- };
-
- template<>
- struct PortableType<gt::PortableFields>
- {
- /** <inheritdoc /> */
- int32_t GetTypeId()
- {
- return GetPortableStringHashCode("PortableFields");
- }
-
- /** <inheritdoc /> */
- std::string GetTypeName()
- {
- return "PortableFields";
- }
-
- /** <inheritdoc /> */
- int32_t GetFieldId(const char* name)
- {
- return GetPortableStringHashCode(name);
- }
-
- /** <inheritdoc /> */
- int32_t GetHashCode(const gt::PortableFields& obj)
- {
- return obj.val1 + obj.val2 + obj.rawVal1 + obj.rawVal2;
- }
-
- /** <inheritdoc /> */
- bool IsNull(const gt::PortableFields& obj)
- {
- return false;
- }
-
- /** <inheritdoc /> */
- gt::PortableFields GetNull()
- {
- throw std::runtime_error("Must not be called.");
- }
-
- /** <inheritdoc /> */
- void Write(PortableWriter& writer, const gt::PortableFields& obj)
- {
- writer.WriteInt32("val1", obj.val1);
- writer.WriteInt32("val2", obj.val2);
-
- PortableRawWriter rawWriter = writer.RawWriter();
-
- rawWriter.WriteInt32(obj.rawVal1);
- rawWriter.WriteInt32(obj.rawVal2);
- }
-
- /** <inheritdoc /> */
- gt::PortableFields Read(PortableReader& reader)
- {
- int32_t val1 = reader.ReadInt32("val1");
- int32_t val2 = reader.ReadInt32("val2");
-
- PortableRawReader rawReader = reader.RawReader();
-
- int32_t rawVal1 = rawReader.ReadInt32();
- int32_t rawVal2 = rawReader.ReadInt32();
-
- return gt::PortableFields(val1, val2, rawVal1, rawVal2);
- }
- };
- }
-}
-
-#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/include/ignite/portable_test_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/include/ignite/portable_test_utils.h b/modules/platforms/cpp/core-test/include/ignite/portable_test_utils.h
deleted file mode 100644
index 62f99f9..0000000
--- a/modules/platforms/cpp/core-test/include/ignite/portable_test_utils.h
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_PORTABLE_TEST_UTILS
-#define _IGNITE_PORTABLE_TEST_UTILS
-
-#include "ignite/portable/portable.h"
-
-using namespace ignite;
-using namespace ignite::portable;
-using namespace ignite::impl::portable;
-
-namespace ignite_test
-{
- namespace core
- {
- namespace portable
- {
- template<typename T>
- inline void Write(PortableRawWriter& writer, T val)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<typename T>
- inline T Read(PortableRawReader& reader)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, int8_t val)
- {
- writer.WriteInt8(val);
- }
-
- template<>
- inline int8_t Read(PortableRawReader& reader)
- {
- return reader.ReadInt8();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, bool val)
- {
- writer.WriteBool(val);
- }
-
- template<>
- inline bool Read(PortableRawReader& reader)
- {
- return reader.ReadBool();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, int16_t val)
- {
- writer.WriteInt16(val);
- }
-
- template<>
- inline int16_t Read(PortableRawReader& reader)
- {
- return reader.ReadInt16();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, uint16_t val)
- {
- writer.WriteUInt16(val);
- }
-
- template<>
- inline uint16_t Read(PortableRawReader& reader)
- {
- return reader.ReadUInt16();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, int32_t val)
- {
- writer.WriteInt32(val);
- }
-
- template<>
- inline int32_t Read(PortableRawReader& reader)
- {
- return reader.ReadInt32();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, int64_t val)
- {
- writer.WriteInt64(val);
- }
-
- template<>
- inline int64_t Read(PortableRawReader& reader)
- {
- return reader.ReadInt64();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, float val)
- {
- writer.WriteFloat(val);
- }
-
- template<>
- inline float Read(PortableRawReader& reader)
- {
- return reader.ReadFloat();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, double val)
- {
- writer.WriteDouble(val);
- }
-
- template<>
- inline double Read(PortableRawReader& reader)
- {
- return reader.ReadDouble();
- }
-
- template<>
- inline void Write(PortableRawWriter& writer, Guid val)
- {
- writer.WriteGuid(val);
- }
-
- template<>
- inline Guid Read(PortableRawReader& reader)
- {
- return reader.ReadGuid();
- }
-
- template<typename T>
- inline void WriteArray(PortableRawWriter& writer, T* val, int32_t len)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<typename T>
- inline int32_t ReadArray(PortableRawReader& reader, T* val, int32_t len)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, int8_t* val, int32_t len)
- {
- writer.WriteInt8Array(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, int8_t* val, int32_t len)
- {
- return reader.ReadInt8Array(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, bool* val, int32_t len)
- {
- writer.WriteBoolArray(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, bool* val, int32_t len)
- {
- return reader.ReadBoolArray(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, int16_t* val, int32_t len)
- {
- writer.WriteInt16Array(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, int16_t* val, int32_t len)
- {
- return reader.ReadInt16Array(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, uint16_t* val, int32_t len)
- {
- writer.WriteUInt16Array(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, uint16_t* val, int32_t len)
- {
- return reader.ReadUInt16Array(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, int32_t* val, int32_t len)
- {
- writer.WriteInt32Array(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, int32_t* val, int32_t len)
- {
- return reader.ReadInt32Array(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, int64_t* val, int32_t len)
- {
- writer.WriteInt64Array(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, int64_t* val, int32_t len)
- {
- return reader.ReadInt64Array(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, float* val, int32_t len)
- {
- writer.WriteFloatArray(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, float* val, int32_t len)
- {
- return reader.ReadFloatArray(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, double* val, int32_t len)
- {
- writer.WriteDoubleArray(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, double* val, int32_t len)
- {
- return reader.ReadDoubleArray(val, len);
- }
-
- template<>
- inline void WriteArray(PortableRawWriter& writer, Guid* val, int32_t len)
- {
- writer.WriteGuidArray(val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableRawReader& reader, Guid* val, int32_t len)
- {
- return reader.ReadGuidArray(val, len);
- }
-
- template<typename T>
- inline void Write(PortableWriter& writer, const char* fieldName, T val)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<typename T>
- inline T Read(PortableReader& reader, const char* fieldName)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, int8_t val)
- {
- writer.WriteInt8(fieldName, val);
- }
-
- template<>
- inline int8_t Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadInt8(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, bool val)
- {
- writer.WriteBool(fieldName, val);
- }
-
- template<>
- inline bool Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadBool(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, int16_t val)
- {
- writer.WriteInt16(fieldName, val);
- }
-
- template<>
- inline int16_t Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadInt16(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, uint16_t val)
- {
- writer.WriteUInt16(fieldName, val);
- }
-
- template<>
- inline uint16_t Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadUInt16(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, int32_t val)
- {
- writer.WriteInt32(fieldName, val);
- }
-
- template<>
- inline int32_t Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadInt32(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, int64_t val)
- {
- writer.WriteInt64(fieldName, val);
- }
-
- template<>
- inline int64_t Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadInt64(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, float val)
- {
- writer.WriteFloat(fieldName, val);
- }
-
- template<>
- inline float Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadFloat(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, double val)
- {
- writer.WriteDouble(fieldName, val);
- }
-
- template<>
- inline double Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadDouble(fieldName);
- }
-
- template<>
- inline void Write(PortableWriter& writer, const char* fieldName, Guid val)
- {
- writer.WriteGuid(fieldName, val);
- }
-
- template<>
- inline Guid Read(PortableReader& reader, const char* fieldName)
- {
- return reader.ReadGuid(fieldName);
- }
-
- template<typename T>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, T* val, int32_t len)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<typename T>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, T* val, int32_t len)
- {
- throw std::runtime_error("Function is not defined");
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, int8_t* val, int32_t len)
- {
- writer.WriteInt8Array(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, int8_t* val, int32_t len)
- {
- return reader.ReadInt8Array(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, bool* val, int32_t len)
- {
- writer.WriteBoolArray(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, bool* val, int32_t len)
- {
- return reader.ReadBoolArray(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, int16_t* val, int32_t len)
- {
- writer.WriteInt16Array(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, int16_t* val, int32_t len)
- {
- return reader.ReadInt16Array(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, uint16_t* val, int32_t len)
- {
- writer.WriteUInt16Array(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, uint16_t* val, int32_t len)
- {
- return reader.ReadUInt16Array(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, int32_t* val, int32_t len)
- {
- writer.WriteInt32Array(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, int32_t* val, int32_t len)
- {
- return reader.ReadInt32Array(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, int64_t* val, int32_t len)
- {
- writer.WriteInt64Array(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, int64_t* val, int32_t len)
- {
- return reader.ReadInt64Array(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, float* val, int32_t len)
- {
- writer.WriteFloatArray(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, float* val, int32_t len)
- {
- return reader.ReadFloatArray(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, double* val, int32_t len)
- {
- writer.WriteDoubleArray(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, double* val, int32_t len)
- {
- return reader.ReadDoubleArray(fieldName, val, len);
- }
-
- template<>
- inline void WriteArray(PortableWriter& writer, const char* fieldName, Guid* val, int32_t len)
- {
- writer.WriteGuidArray(fieldName, val, len);
- }
-
- template<>
- inline int32_t ReadArray(PortableReader& reader, const char* fieldName, Guid* val, int32_t len)
- {
- return reader.ReadGuidArray(fieldName, val, len);
- }
- }
- }
-}
-
-#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
index 6323ac5..422199a 100644
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
@@ -35,17 +35,17 @@
<ClCompile Include="..\..\src\concurrent_test.cpp" />
<ClCompile Include="..\..\src\ignition_test.cpp" />
<ClCompile Include="..\..\src\handle_registry_test.cpp" />
- <ClCompile Include="..\..\src\portable_reader_writer_raw_test.cpp" />
- <ClCompile Include="..\..\src\portable_reader_writer_test.cpp" />
- <ClCompile Include="..\..\src\portable_session_test.cpp" />
- <ClCompile Include="..\..\src\portable_test_defs.cpp" />
+ <ClCompile Include="..\..\src\binary_reader_writer_raw_test.cpp" />
+ <ClCompile Include="..\..\src\binary_reader_writer_test.cpp" />
+ <ClCompile Include="..\..\src\binary_session_test.cpp" />
+ <ClCompile Include="..\..\src\binary_test_defs.cpp" />
<ClCompile Include="..\..\src\cache_query_test.cpp" />
<ClCompile Include="..\..\src\teamcity_boost.cpp" />
<ClCompile Include="..\..\src\teamcity_messages.cpp" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\..\include\ignite\portable_test_defs.h" />
- <ClInclude Include="..\..\include\ignite\portable_test_utils.h" />
+ <ClInclude Include="..\..\include\ignite\binary_test_defs.h" />
+ <ClInclude Include="..\..\include\ignite\binary_test_utils.h" />
<ClInclude Include="..\..\include\teamcity_messages.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
http://git-wip-us.apache.org/repos/asf/ignite/blob/303d79eb/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
index 7e8dd95..32737be 100644
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
@@ -13,37 +13,37 @@
<ClCompile Include="..\..\src\handle_registry_test.cpp">
<Filter>Code</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\portable_reader_writer_raw_test.cpp">
+ <ClCompile Include="..\..\src\cache_query_test.cpp">
<Filter>Code</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\portable_reader_writer_test.cpp">
- <Filter>Code</Filter>
+ <ClCompile Include="..\..\src\teamcity_boost.cpp">
+ <Filter>TeamCity</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\portable_session_test.cpp">
- <Filter>Code</Filter>
+ <ClCompile Include="..\..\src\teamcity_messages.cpp">
+ <Filter>TeamCity</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\portable_test_defs.cpp">
+ <ClCompile Include="..\..\src\binary_test_defs.cpp">
<Filter>Code</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\cache_query_test.cpp">
+ <ClCompile Include="..\..\src\binary_session_test.cpp">
<Filter>Code</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\teamcity_boost.cpp">
- <Filter>TeamCity</Filter>
+ <ClCompile Include="..\..\src\binary_reader_writer_test.cpp">
+ <Filter>Code</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\teamcity_messages.cpp">
- <Filter>TeamCity</Filter>
+ <ClCompile Include="..\..\src\binary_reader_writer_raw_test.cpp">
+ <Filter>Code</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\..\include\ignite\portable_test_defs.h">
- <Filter>Code</Filter>
+ <ClInclude Include="..\..\include\teamcity_messages.h">
+ <Filter>TeamCity</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\ignite\portable_test_utils.h">
+ <ClInclude Include="..\..\include\ignite\binary_test_defs.h">
<Filter>Code</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\teamcity_messages.h">
- <Filter>TeamCity</Filter>
+ <ClInclude Include="..\..\include\ignite\binary_test_utils.h">
+ <Filter>Code</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>