ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: IGNITE-1460: Improved "const" keyword usage. This closes #121.
Date Thu, 01 Oct 2015 12:01:43 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1282 a4342d9ff -> 8a3d68a38


IGNITE-1460: Improved "const" keyword usage. This closes #121.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8a3d68a3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8a3d68a3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8a3d68a3

Branch: refs/heads/ignite-1282
Commit: 8a3d68a3816a08926d2002b5cf91dc559b0d9197
Parents: a4342d9
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Oct 1 15:02:25 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Oct 1 15:02:25 2015 +0300

----------------------------------------------------------------------
 .../common/include/ignite/common/concurrent.h   | 17 +++++++++
 .../cpp/core/include/ignite/cache/cache.h       |  2 +-
 .../cpp/core/include/ignite/cache/cache_entry.h |  4 +--
 .../include/ignite/cache/query/query_argument.h |  8 ++---
 .../include/ignite/cache/query/query_scan.h     |  6 ++--
 .../core/include/ignite/cache/query/query_sql.h | 14 ++++----
 .../include/ignite/cache/query/query_text.h     | 15 ++++----
 .../platforms/cpp/core/include/ignite/ignite.h  |  3 +-
 .../cpp/core/include/ignite/ignite_error.h      |  4 +--
 .../core/include/ignite/impl/cache/cache_impl.h |  2 +-
 .../include/ignite/impl/ignite_environment.h    |  2 +-
 .../cpp/core/include/ignite/impl/ignite_impl.h  |  2 +-
 .../ignite/impl/interop/interop_input_stream.h  |  6 ++--
 .../ignite/impl/interop/interop_memory.h        | 18 +++++-----
 .../ignite/impl/interop/interop_output_stream.h |  2 +-
 .../ignite/impl/portable/portable_reader_impl.h | 12 +++----
 .../ignite/impl/portable/portable_writer_impl.h |  8 ++---
 .../ignite/portable/portable_containers.h       | 28 +++++++--------
 .../ignite/portable/portable_raw_reader.h       | 20 +++++------
 .../ignite/portable/portable_raw_writer.h       | 38 ++++++++++----------
 .../include/ignite/portable/portable_reader.h   | 20 +++++------
 .../include/ignite/portable/portable_writer.h   | 38 ++++++++++----------
 modules/platforms/cpp/core/src/ignite.cpp       |  2 +-
 modules/platforms/cpp/core/src/ignite_error.cpp |  4 +--
 .../cpp/core/src/impl/cache/cache_impl.cpp      |  2 +-
 .../cpp/core/src/impl/ignite_environment.cpp    |  2 +-
 .../platforms/cpp/core/src/impl/ignite_impl.cpp |  2 +-
 .../src/impl/interop/interop_input_stream.cpp   |  6 ++--
 .../core/src/impl/interop/interop_memory.cpp    | 26 +++++++-------
 .../src/impl/interop/interop_output_stream.cpp  |  2 +-
 .../src/impl/portable/portable_reader_impl.cpp  | 10 +++---
 .../src/impl/portable/portable_writer_impl.cpp  |  8 ++---
 .../core/src/portable/portable_containers.cpp   | 10 +++---
 .../core/src/portable/portable_raw_writer.cpp   | 38 ++++++++++----------
 .../cpp/core/src/portable/portable_reader.cpp   | 20 +++++------
 .../cpp/core/src/portable/portable_writer.cpp   | 34 +++++++++---------
 36 files changed, 227 insertions(+), 208 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/common/include/ignite/common/concurrent.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/ignite/common/concurrent.h b/modules/platforms/cpp/common/include/ignite/common/concurrent.h
index 1c9ab22..1e6d083 100644
--- a/modules/platforms/cpp/common/include/ignite/common/concurrent.h
+++ b/modules/platforms/cpp/common/include/ignite/common/concurrent.h
@@ -58,6 +58,13 @@ namespace ignite
                 void* Pointer();
 
                 /**
+                 * Get raw pointer.
+                 *
+                 * @return Raw pointer.
+                 */
+                const void* Pointer() const;
+
+                /**
                  * Increment usage counter.
                  */
                 void Increment();
@@ -196,6 +203,16 @@ namespace ignite
                 {
                     return impl ? static_cast<T*>(impl->Pointer()) : NULL;
                 }
+
+                /**
+                 * Get raw pointer.
+                 *
+                 * @return Raw pointer.
+                 */
+                const T* Get() const
+                {
+                    return impl ? static_cast<T*>(impl->Pointer()) : NULL;
+                }
             private:
                 /** Implementation. */
                 SharedPointerImpl* impl;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/cache/cache.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache.h b/modules/platforms/cpp/core/include/ignite/cache/cache.h
index dcc837b..fcbf7ab 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache.h
@@ -55,7 +55,7 @@ namespace ignite
             /**
              * Name of this cache (null for default cache).
              */
-            char* GetName()
+            const char* GetName() const
             {
                 return impl.Get()->GetName();
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h b/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
index 2b6c785..d6d244d 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
@@ -90,7 +90,7 @@ namespace ignite
              * 
              * @return Key.
              */
-            K GetKey()
+            K GetKey() const
             {
                 return key;
             }
@@ -100,7 +100,7 @@ namespace ignite
              *
              * @return Value.
              */
-            V GetValue()
+            V GetValue() const
             {
                 return val;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
index 0f41c56..151a821 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
@@ -45,7 +45,7 @@ namespace ignite
                  *
                  * @return Copy.
                  */
-                virtual QueryArgumentBase* Copy() = 0;
+                virtual QueryArgumentBase* Copy() const = 0;
 
                 /**
                  * Write argument.
@@ -99,17 +99,17 @@ namespace ignite
                     return *this;
                 }
 
-                ~QueryArgument()
+                virtual ~QueryArgument()
                 {
                     // No-op.
                 }
 
-                QueryArgumentBase* Copy()
+                virtual QueryArgumentBase* Copy() const
                 {
                     return new QueryArgument(val);
                 }
 
-                void Write(ignite::portable::PortableRawWriter& writer)
+                virtual void Write(ignite::portable::PortableRawWriter& writer)
                 {
                     writer.WriteObject<T>(val);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
index c3ec845..453831d 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
@@ -58,7 +58,7 @@ namespace ignite
                  *
                  * @return Partition to scan.
                  */
-                int32_t GetPartition()
+                int32_t GetPartition() const
                 {
                     return part;
                 }
@@ -78,7 +78,7 @@ namespace ignite
                  *
                  * @return Page size.
                  */
-                int32_t GetPageSize()
+                int32_t GetPageSize() const
                 {
                     return pageSize;
                 }
@@ -98,7 +98,7 @@ namespace ignite
                  *
                  * @return Local flag.
                  */
-                bool IsLocal()
+                bool IsLocal() const
                 {
                     return loc;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
index a2e0f33..103557e 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
@@ -43,7 +43,7 @@ namespace ignite
                  * @param type Type name.
                  * @param sql SQL string.
                  */
-                SqlQuery(std::string type, std::string sql) : type(type), sql(sql), pageSize(1024), 
+                SqlQuery(const std::string& type, const std::string& sql) : type(type), sql(sql), pageSize(1024), 
                     loc(false), args(NULL)
                 {
                     // No-op.
@@ -118,7 +118,7 @@ namespace ignite
                  *
                  * @return Type name.
                  */
-                std::string GetType()
+                const std::string& GetType() const
                 {
                     return type;
                 }
@@ -128,7 +128,7 @@ namespace ignite
                  *
                  * @param sql Type name.
                  */
-                void SetType(std::string type)
+                void SetType(const std::string& type)
                 {
                     this->type = type;
                 }
@@ -138,7 +138,7 @@ namespace ignite
                  *
                  * @return SQL string.
                  */
-                std::string GetSql()
+                const std::string& GetSql() const
                 {
                     return sql;
                 }
@@ -148,7 +148,7 @@ namespace ignite
                  *
                  * @param sql SQL string.
                  */
-                void SetSql(std::string sql)
+                void SetSql(const std::string& sql)
                 {
                     this->sql = sql;
                 }
@@ -158,7 +158,7 @@ namespace ignite
                  *
                  * @return Page size.
                  */
-                int32_t GetPageSize()
+                int32_t GetPageSize() const
                 {
                     return pageSize;
                 }
@@ -178,7 +178,7 @@ namespace ignite
                  *
                  * @return Local flag.
                  */
-                bool IsLocal()
+                bool IsLocal() const
                 {
                     return loc;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/cache/query/query_text.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_text.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_text.h
index 67d3ecc..9efa1bb 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_text.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_text.h
@@ -41,7 +41,8 @@ namespace ignite
                  * @param type Type name.
                  * @param text Text string.
                  */
-                TextQuery(std::string type, std::string text) : type(type), text(text), pageSize(1024), loc(false)
+                TextQuery(const std::string& type, const std::string& text) :
+                    type(type), text(text), pageSize(1024), loc(false)
                 {
                     // No-op.
                 }
@@ -51,7 +52,7 @@ namespace ignite
                  *
                  * @return Type name.
                  */
-                std::string GetType()
+                const std::string& GetType() const
                 {
                     return type;
                 }
@@ -61,7 +62,7 @@ namespace ignite
                  *
                  * @param sql Type name.
                  */
-                void SetType(std::string type)
+                void SetType(const std::string& type)
                 {
                     this->type = type;
                 }
@@ -71,7 +72,7 @@ namespace ignite
                  *
                  * @return text string.
                  */
-                std::string GetText()
+                const std::string& GetText() const
                 {
                     return text;
                 }
@@ -81,7 +82,7 @@ namespace ignite
                  *
                  * @param text Text string.
                  */
-                void SetText(std::string text)
+                void SetText(const std::string& text)
                 {
                     this->text = text;
                 }
@@ -91,7 +92,7 @@ namespace ignite
                  *
                  * @return Page size.
                  */
-                int32_t GetPageSize()
+                int32_t GetPageSize() const
                 {
                     return pageSize;
                 }
@@ -111,7 +112,7 @@ namespace ignite
                  *
                  * @return Local flag.
                  */
-                bool IsLocal()
+                bool IsLocal() const
                 {
                     return loc;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/ignite.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignite.h b/modules/platforms/cpp/core/include/ignite/ignite.h
index 6c1263e..add485b 100644
--- a/modules/platforms/cpp/core/include/ignite/ignite.h
+++ b/modules/platforms/cpp/core/include/ignite/ignite.h
@@ -45,7 +45,7 @@ namespace ignite
          *
          * @return Name.
          */
-        char* GetName();
+        const char* GetName() const;
 
         /**
          * Get cache.
@@ -145,6 +145,7 @@ namespace ignite
 
             return cache::Cache<K, V>(cacheImpl);
         }
+
     private:
         /** Implementation delegate. */
         ignite::common::concurrent::SharedPointer<impl::IgniteImpl> impl;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/ignite_error.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignite_error.h b/modules/platforms/cpp/core/include/ignite/ignite_error.h
index 4438a0e..1e5cfa5 100644
--- a/modules/platforms/cpp/core/include/ignite/ignite_error.h
+++ b/modules/platforms/cpp/core/include/ignite/ignite_error.h
@@ -230,14 +230,14 @@ namespace ignite
          *
          * @return Error code.
          */
-        int32_t GetCode();
+        int32_t GetCode() const;
 
         /**
          * Get error message.
          *
          * @return Error message.
          */
-        const char* GetText();
+        const char* GetText() const;
         
         /**
          * Set error.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/cache/cache_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/cache/cache_impl.h b/modules/platforms/cpp/core/include/ignite/impl/cache/cache_impl.h
index 8c744e0..b7596bf 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/cache/cache_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/cache/cache_impl.h
@@ -56,7 +56,7 @@ namespace ignite
                  *
                  * @return Cache name.
                  */
-                char* GetName();
+                const char* GetName() const;
 
                 /**
                  * Perform IsEmpty.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/ignite_environment.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/ignite_environment.h b/modules/platforms/cpp/core/include/ignite/impl/ignite_environment.h
index 2f195b2..59c0300 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/ignite_environment.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/ignite_environment.h
@@ -71,7 +71,7 @@ namespace ignite
              *
              * @return Name.
              */
-            char* InstanceName();
+            const char* InstanceName() const;
 
             /**
              * Get JNI context.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/ignite_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/ignite_impl.h b/modules/platforms/cpp/core/include/ignite/impl/ignite_impl.h
index 52472c6..1aeab29 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/ignite_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/ignite_impl.h
@@ -54,7 +54,7 @@ namespace ignite
              *
              * @param Name.
              */
-            char* GetName();
+            const char* GetName() const;
 
             /**
              * Get cache.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/interop/interop_input_stream.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_input_stream.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_input_stream.h
index d8fcfc3..f23cec6 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_input_stream.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_input_stream.h
@@ -171,14 +171,14 @@ namespace ignite
                  *
                  * @return Remaining bytes.
                  */
-                int32_t Remaining();
+                int32_t Remaining() const;
 
                 /**
                  * Get position.
                  *
                  * @return Position.
                  */
-                int32_t Position();
+                int32_t Position() const;
 
                 /**
                  * Set position.
@@ -209,7 +209,7 @@ namespace ignite
                  *
                  * @param cnt Amount of byte expected to be available.
                  */
-                void EnsureEnoughData(int32_t cnt);
+                void EnsureEnoughData(int32_t cnt) const;
 
                 /**
                  * Copy data from the stream shifting it along the way.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/interop/interop_memory.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_memory.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_memory.h
index 00cba43..d7e506d 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_memory.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_memory.h
@@ -61,7 +61,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Raw data pointer.
                  */
-                static int8_t* Data(int8_t* memPtr);
+                static int8_t* Data(const int8_t* memPtr);
 
                 /**
                  * Set raw data pointer.
@@ -77,7 +77,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Capacity.
                  */
-                static int32_t Capacity(int8_t* memPtr);
+                static int32_t Capacity(const int8_t* memPtr);
 
                 /**
                  * Set capacity.
@@ -93,7 +93,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Length.
                  */
-                static int32_t Length(int8_t* memPtr);
+                static int32_t Length(const int8_t* memPtr);
 
                 /**
                  * Set length.
@@ -109,7 +109,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Flags.
                  */
-                static int32_t Flags(int8_t* memPtr);
+                static int32_t Flags(const int8_t* memPtr);
 
                 /**
                  * Set flags.
@@ -125,7 +125,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Flag state.
                  */
-                static bool IsExternal(int8_t* memPtr);
+                static bool IsExternal(const int8_t* memPtr);
 
                 /**
                  * Get "external" flag state.
@@ -141,7 +141,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Flag state.
                  */
-                static bool IsPooled(int8_t* memPtr);
+                static bool IsPooled(const int8_t* memPtr);
 
                 /**
                  * Get "pooled" flag state.
@@ -157,7 +157,7 @@ namespace ignite
                  * @param memPtr Memory pointer.
                  * @return Flag state.
                  */
-                static bool IsAcquired(int8_t* memPtr);
+                static bool IsAcquired(const int8_t* memPtr);
 
                 /**
                  * Get "acquired" flag state.
@@ -196,14 +196,14 @@ namespace ignite
                  *
                  * @return Capacity.
                  */
-                int32_t Capacity();
+                int32_t Capacity() const;
 
                 /**
                  * Get length.
                  *
                  * @return Length.
                  */
-                int32_t Length();
+                int32_t Length() const;
 
                 /**
                  * Set length.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/interop/interop_output_stream.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_output_stream.h b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_output_stream.h
index 5a08aed..850e6c3 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/interop/interop_output_stream.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/interop/interop_output_stream.h
@@ -176,7 +176,7 @@ namespace ignite
                 /**
                  * Get current stream position.
                  */
-                int32_t Position();
+                int32_t Position() const;
 
                 /**
                  * Set current stream position (absolute).

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/portable/portable_reader_impl.h b/modules/platforms/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
index 7d82aa2..ab93d10 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
@@ -542,7 +542,7 @@ namespace ignite
                  * @param id Session ID.
                  * @return True if next element exists for the given session.
                  */
-                bool HasNextElement(int32_t id);
+                bool HasNextElement(int32_t id) const;
 
                 /**
                  * Read element.
@@ -680,7 +680,7 @@ namespace ignite
                  * Get NULL value for the given type.
                  */
                 template<typename T>
-                T GetNull()
+                T GetNull() const
                 {
                     ignite::portable::PortableType<T> type;
 
@@ -961,14 +961,14 @@ namespace ignite
                  * 
                  * @param expected Expected raw mode of the reader.
                  */
-                void CheckRawMode(bool expected);
+                void CheckRawMode(bool expected) const;
 
                 /**
                  * Check whether reader is currently operating in single mode.
                  *
                  * @param expected Expected value.
                  */
-                void CheckSingleMode(bool expected);
+                void CheckSingleMode(bool expected) const;
 
                 /**
                  * Start new container reader session.
@@ -985,7 +985,7 @@ namespace ignite
                  *
                  * @param ses Expected session ID.
                  */
-                void CheckSession(int32_t expSes);
+                void CheckSession(int32_t expSes) const;
 
                 /**
                  * Throw an error due to invalid header.
@@ -1002,7 +1002,7 @@ namespace ignite
                  * @param expHdr Expected header.
                  * @param hdr Actual header.
                  */
-                void ThrowOnInvalidHeader(int8_t expHdr, int8_t hdr);
+                void ThrowOnInvalidHeader(int8_t expHdr, int8_t hdr) const;
 
                 /**
                  * Internal string read routine.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/impl/portable/portable_writer_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/portable/portable_writer_impl.h b/modules/platforms/cpp/core/include/ignite/impl/portable/portable_writer_impl.h
index b38dc1f..2e5a0e7 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/portable/portable_writer_impl.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/portable/portable_writer_impl.h
@@ -546,7 +546,7 @@ namespace ignite
                 /**
                  * Get raw position.
                  */
-                int32_t GetRawPosition();
+                int32_t GetRawPosition() const;
 
                 /**
                  * Write object.
@@ -751,14 +751,14 @@ namespace ignite
                  *
                  * @param expected Expected raw mode of the reader.
                  */
-                void CheckRawMode(bool expected);
+                void CheckRawMode(bool expected) const;
 
                 /**
                  * Check whether writer is currently operating in single mode.
                  *
                  * @param expected Expected value.
                  */
-                void CheckSingleMode(bool expected);
+                void CheckSingleMode(bool expected) const;
 
                 /**
                  * Start new container writer session.
@@ -772,7 +772,7 @@ namespace ignite
                  *
                  * @param ses Expected session ID.
                  */
-                void CheckSession(int32_t expSes);
+                void CheckSession(int32_t expSes) const;
 
                 /**
                  * Write field ID.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/portable/portable_containers.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/portable/portable_containers.h b/modules/platforms/cpp/core/include/ignite/portable/portable_containers.h
index f93a11a..6ad092a 100644
--- a/modules/platforms/cpp/core/include/ignite/portable/portable_containers.h
+++ b/modules/platforms/cpp/core/include/ignite/portable/portable_containers.h
@@ -41,7 +41,7 @@ namespace ignite
              * @param id Identifier.
              * @param impl Writer.
              */
-            PortableStringArrayWriter(impl::portable::PortableWriterImpl* impl, const int32_t id);
+            PortableStringArrayWriter(impl::portable::PortableWriterImpl* impl, int32_t id);
 
             /**
              * Write string.
@@ -56,7 +56,7 @@ namespace ignite
              * @param val String.
              * @param len String length (characters).
              */
-            void Write(const char* val, const int32_t len);
+            void Write(const char* val, int32_t len);
 
             /**
              * Write string.
@@ -93,7 +93,7 @@ namespace ignite
              * @param impl Writer.
              * @param id Identifier.
              */
-            PortableArrayWriter(impl::portable::PortableWriterImpl* impl, const int32_t id) : impl(impl), id(id)
+            PortableArrayWriter(impl::portable::PortableWriterImpl* impl, int32_t id) : impl(impl), id(id)
             {
                 // No-op.
             }
@@ -136,7 +136,7 @@ namespace ignite
              * @param impl Writer.
              * @param id Identifier.
              */
-            PortableCollectionWriter(impl::portable::PortableWriterImpl* impl, const int32_t id) : impl(impl), id(id)
+            PortableCollectionWriter(impl::portable::PortableWriterImpl* impl, int32_t id) : impl(impl), id(id)
             {
                 // No-op.
             }
@@ -178,7 +178,7 @@ namespace ignite
              *
              * @param impl Writer.
              */
-            PortableMapWriter(impl::portable::PortableWriterImpl* impl, const int32_t id) : impl(impl), id(id)
+            PortableMapWriter(impl::portable::PortableWriterImpl* impl, int32_t id) : impl(impl), id(id)
             {
                 // No-op.
             }
@@ -222,7 +222,7 @@ namespace ignite
              * @param id Identifier.
              * @param size Array size.
              */
-            PortableStringArrayReader(impl::portable::PortableReaderImpl* impl, const int32_t id, const int32_t size);
+            PortableStringArrayReader(impl::portable::PortableReaderImpl* impl, int32_t id, int32_t size);
 
             /**
              * Check whether next element is available for read.
@@ -242,7 +242,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t GetNext(char* res, const int32_t len);
+            int32_t GetNext(char* res, int32_t len);
 
             /**
              * Get next element.
@@ -270,12 +270,12 @@ namespace ignite
              *
              * @return Size or -1 if array is NULL.
              */
-            int32_t GetSize();
+            int32_t GetSize() const;
 
             /**
              * Whether array is NULL.
              */
-            bool IsNull();
+            bool IsNull() const;
         private:
             /** Implementation delegate. */
             impl::portable::PortableReaderImpl* impl;  
@@ -301,7 +301,7 @@ namespace ignite
              * @param id Identifier.
              * @param size Array size.
              */
-            PortableArrayReader(impl::portable::PortableReaderImpl* impl, const int32_t id, const int32_t size) : 
+            PortableArrayReader(impl::portable::PortableReaderImpl* impl, int32_t id, int32_t size) : 
                 impl(impl), id(id), size(size)
             {
                 // No-op.
@@ -370,8 +370,8 @@ namespace ignite
              * @param type Collection type.
              * @param size Collection size.
              */
-            PortableCollectionReader(impl::portable::PortableReaderImpl* impl, const int32_t id, 
-                const CollectionType type,  const int32_t size) : impl(impl), id(id), type(type), size(size)
+            PortableCollectionReader(impl::portable::PortableReaderImpl* impl, int32_t id, 
+                const CollectionType type,  int32_t size) : impl(impl), id(id), type(type), size(size)
             {
                 // No-op.
             }
@@ -452,8 +452,8 @@ namespace ignite
              * @param type Map type.
              * @param size Map size.
             */
-            PortableMapReader(impl::portable::PortableReaderImpl* impl, const int32_t id, const MapType type,
-                const int32_t size) : impl(impl), id(id), type(type), size(size)
+            PortableMapReader(impl::portable::PortableReaderImpl* impl, int32_t id, MapType type,
+                int32_t size) : impl(impl), id(id), type(type), size(size)
             {
                 // No-op.
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/portable/portable_raw_reader.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/portable/portable_raw_reader.h b/modules/platforms/cpp/core/include/ignite/portable/portable_raw_reader.h
index 9f1d74c..0ecaa4d 100644
--- a/modules/platforms/cpp/core/include/ignite/portable/portable_raw_reader.h
+++ b/modules/platforms/cpp/core/include/ignite/portable/portable_raw_reader.h
@@ -62,7 +62,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt8Array(int8_t* res, const int32_t len);
+            int32_t ReadInt8Array(int8_t* res, int32_t len);
 
             /**
              * Read bool. Maps to "boolean" type in Java.
@@ -81,7 +81,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadBoolArray(bool* res, const int32_t len);
+            int32_t ReadBoolArray(bool* res, int32_t len);
             
             /**
              * Read 16-byte signed integer. Maps to "short" type in Java.
@@ -100,7 +100,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt16Array(int16_t* res, const int32_t len);
+            int32_t ReadInt16Array(int16_t* res, int32_t len);
 
             /**
              * Read 16-byte unsigned integer. Maps to "char" type in Java.
@@ -119,7 +119,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadUInt16Array(uint16_t* res, const int32_t len);
+            int32_t ReadUInt16Array(uint16_t* res, int32_t len);
 
             /**
              * Read 32-byte signed integer. Maps to "int" type in Java.
@@ -138,7 +138,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt32Array(int32_t* res, const int32_t len);
+            int32_t ReadInt32Array(int32_t* res, int32_t len);
 
             /**
              * Read 64-byte signed integer. Maps to "long" type in Java.
@@ -157,7 +157,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt64Array(int64_t* res, const int32_t len);
+            int32_t ReadInt64Array(int64_t* res, int32_t len);
 
             /**
              * Read float. Maps to "float" type in Java.
@@ -176,7 +176,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadFloatArray(float* res, const int32_t len);
+            int32_t ReadFloatArray(float* res, int32_t len);
 
             /**
              * Read double. Maps to "double" type in Java.
@@ -195,7 +195,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadDoubleArray(double* res, const int32_t len);
+            int32_t ReadDoubleArray(double* res, int32_t len);
             
             /**
              * Read Guid. Maps to "UUID" type in Java.
@@ -214,7 +214,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadGuidArray(Guid* res, const int32_t len);
+            int32_t ReadGuidArray(Guid* res, int32_t len);
 
             /**
              * Read string.
@@ -227,7 +227,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadString(char* res, const int32_t len);
+            int32_t ReadString(char* res, int32_t len);
 
             /**
              * Read string from the stream.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/portable/portable_raw_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/portable/portable_raw_writer.h b/modules/platforms/cpp/core/include/ignite/portable/portable_raw_writer.h
index 47b5880..4cf2f00 100644
--- a/modules/platforms/cpp/core/include/ignite/portable/portable_raw_writer.h
+++ b/modules/platforms/cpp/core/include/ignite/portable/portable_raw_writer.h
@@ -49,7 +49,7 @@ namespace ignite
              *
              * @param val Value.
              */
-            void WriteInt8(const int8_t val);
+            void WriteInt8(int8_t val);
 
             /**
              * Write array of 8-byte signed integers. Maps to "byte[]" type in Java.
@@ -57,14 +57,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt8Array(const int8_t* val, const int32_t len);
+            void WriteInt8Array(const int8_t* val, int32_t len);
 
             /**
              * Write bool. Maps to "short" type in Java.
              *
              * @param val Value.
              */
-            void WriteBool(const bool val);
+            void WriteBool(bool val);
 
             /**
              * Write array of bools. Maps to "bool[]" type in Java.
@@ -72,14 +72,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteBoolArray(const bool* val, const int32_t len);
+            void WriteBoolArray(const bool* val, int32_t len);
 
             /**
              * Write 16-byte signed integer. Maps to "short" type in Java.
              *
              * @param val Value.
              */
-            void WriteInt16(const int16_t val);
+            void WriteInt16(int16_t val);
 
             /**
              * Write array of 16-byte signed integers. Maps to "short[]" type in Java.
@@ -87,14 +87,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt16Array(const int16_t* val, const int32_t len);
+            void WriteInt16Array(const int16_t* val, int32_t len);
 
             /**
              * Write 16-byte unsigned integer. Maps to "char" type in Java.
              *
              * @param val Value.
              */
-            void WriteUInt16(const uint16_t val);
+            void WriteUInt16(uint16_t val);
 
             /**
              * Write array of 16-byte unsigned integers. Maps to "char[]" type in Java.
@@ -102,14 +102,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteUInt16Array(const uint16_t* val, const int32_t len);
+            void WriteUInt16Array(const uint16_t* val, int32_t len);
 
             /**
              * Write 32-byte signed integer. Maps to "int" type in Java.
              *
              * @param val Value.
              */
-            void WriteInt32(const int32_t val);
+            void WriteInt32(int32_t val);
 
             /**
              * Write array of 32-byte signed integers. Maps to "int[]" type in Java.
@@ -117,14 +117,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt32Array(const int32_t* val, const int32_t len);
+            void WriteInt32Array(const int32_t* val, int32_t len);
 
             /**
              * Write 64-byte signed integer. Maps to "long" type in Java.
              *
              * @param val Value.
              */
-            void WriteInt64(const int64_t val);
+            void WriteInt64(int64_t val);
 
             /**
              * Write array of 64-byte signed integers. Maps to "long[]" type in Java.
@@ -132,14 +132,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt64Array(const int64_t* val, const int32_t len);
+            void WriteInt64Array(const int64_t* val, int32_t len);
 
             /**
              * Write float. Maps to "float" type in Java.
              *
              * @param val Value.
              */
-            void WriteFloat(const float val);
+            void WriteFloat(float val);
 
             /**
              * Write array of floats. Maps to "float[]" type in Java.
@@ -147,14 +147,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteFloatArray(const float* val, const int32_t len);
+            void WriteFloatArray(const float* val, int32_t len);
 
             /**
              * Write double. Maps to "double" type in Java.
              *
              * @param val Value.
              */
-            void WriteDouble(const double val);
+            void WriteDouble(double val);
 
             /**
              * Write array of doubles. Maps to "double[]" type in Java.
@@ -162,14 +162,14 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteDoubleArray(const double* val, const int32_t len);
+            void WriteDoubleArray(const double* val, int32_t len);
 
             /**
              * Write Guid. Maps to "UUID" type in Java.
              *
              * @param val Value.
              */
-            void WriteGuid(const Guid val);
+            void WriteGuid(const Guid& val);
 
             /**
              * Write array of Guids. Maps to "UUID[]" type in Java.
@@ -177,7 +177,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteGuidArray(const Guid* val, const int32_t len);
+            void WriteGuidArray(const Guid* val, int32_t len);
 
             /**
              * Write string.
@@ -192,7 +192,7 @@ namespace ignite
              * @param val String.
              * @param len String length (characters).
              */
-            void WriteString(const char* val, const int32_t len);
+            void WriteString(const char* val, int32_t len);
             
             /**
              * Write string.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/portable/portable_reader.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/portable/portable_reader.h b/modules/platforms/cpp/core/include/ignite/portable/portable_reader.h
index 5e4b7ad..8a04f0f 100644
--- a/modules/platforms/cpp/core/include/ignite/portable/portable_reader.h
+++ b/modules/platforms/cpp/core/include/ignite/portable/portable_reader.h
@@ -63,7 +63,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt8Array(const char* fieldName, int8_t* res, const int32_t len);
+            int32_t ReadInt8Array(const char* fieldName, int8_t* res, int32_t len);
 
             /**
              * Read bool. Maps to "short" type in Java.
@@ -84,7 +84,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadBoolArray(const char* fieldName, bool* res, const int32_t len);
+            int32_t ReadBoolArray(const char* fieldName, bool* res, int32_t len);
 
             /**
              * Read 16-byte signed integer. Maps to "short" type in Java.
@@ -105,7 +105,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt16Array(const char* fieldName, int16_t* res, const int32_t len);
+            int32_t ReadInt16Array(const char* fieldName, int16_t* res, int32_t len);
 
             /**
              * Read 16-byte unsigned integer. Maps to "char" type in Java.
@@ -126,7 +126,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadUInt16Array(const char* fieldName, uint16_t* res, const int32_t len);
+            int32_t ReadUInt16Array(const char* fieldName, uint16_t* res, int32_t len);
 
             /**
              * Read 32-byte signed integer. Maps to "int" type in Java.
@@ -147,7 +147,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt32Array(const char* fieldName, int32_t* res, const int32_t len);
+            int32_t ReadInt32Array(const char* fieldName, int32_t* res, int32_t len);
 
             /**
              * Read 64-byte signed integer. Maps to "long" type in Java.
@@ -168,7 +168,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadInt64Array(const char* fieldName, int64_t* res, const int32_t len);
+            int32_t ReadInt64Array(const char* fieldName, int64_t* res, int32_t len);
 
             /**
              * Read float. Maps to "float" type in Java.
@@ -189,7 +189,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadFloatArray(const char* fieldName, float* res, const int32_t len);
+            int32_t ReadFloatArray(const char* fieldName, float* res, int32_t len);
 
             /**
              * Read double. Maps to "double" type in Java.
@@ -210,7 +210,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadDoubleArray(const char* fieldName, double* res, const int32_t len);
+            int32_t ReadDoubleArray(const char* fieldName, double* res, int32_t len);
 
             /**
              * Read Guid. Maps to "UUID" type in Java.
@@ -231,7 +231,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadGuidArray(const char* fieldName, Guid* res, const int32_t len);
+            int32_t ReadGuidArray(const char* fieldName, Guid* res, int32_t len);
 
             /**
              * Read string.
@@ -245,7 +245,7 @@ namespace ignite
              *     to resulting array and returned value will contain required array length.
              *     -1 will be returned in case array in stream was null.
              */
-            int32_t ReadString(const char* fieldName, char* res, const int32_t len);
+            int32_t ReadString(const char* fieldName, char* res, int32_t len);
 
             /**
              * Read string from the stream.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/include/ignite/portable/portable_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/portable/portable_writer.h b/modules/platforms/cpp/core/include/ignite/portable/portable_writer.h
index 5dc9494..d5009ac 100644
--- a/modules/platforms/cpp/core/include/ignite/portable/portable_writer.h
+++ b/modules/platforms/cpp/core/include/ignite/portable/portable_writer.h
@@ -48,7 +48,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteInt8(const char* fieldName, const int8_t val);
+            void WriteInt8(const char* fieldName, int8_t val);
 
             /**
              * Write array of 8-byte signed integers. Maps to "byte[]" type in Java.
@@ -57,7 +57,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt8Array(const char* fieldName, const int8_t* val, const int32_t len);
+            void WriteInt8Array(const char* fieldName, const int8_t* val, int32_t len);
 
             /**
              * Write bool. Maps to "short" type in Java.
@@ -65,7 +65,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteBool(const char* fieldName, const bool val);
+            void WriteBool(const char* fieldName, bool val);
 
             /**
              * Write array of bools. Maps to "bool[]" type in Java.
@@ -74,7 +74,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteBoolArray(const char* fieldName, const bool* val, const int32_t len);
+            void WriteBoolArray(const char* fieldName, const bool* val, int32_t len);
 
             /**
              * Write 16-byte signed integer. Maps to "short" type in Java.
@@ -82,7 +82,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteInt16(const char* fieldName, const int16_t val);
+            void WriteInt16(const char* fieldName, int16_t val);
 
             /**
              * Write array of 16-byte signed integers. Maps to "short[]" type in Java.
@@ -91,7 +91,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt16Array(const char* fieldName, const int16_t* val, const int32_t len);
+            void WriteInt16Array(const char* fieldName, const int16_t* val, int32_t len);
 
             /**
              * Write 16-byte unsigned integer. Maps to "char" type in Java.
@@ -99,7 +99,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteUInt16(const char* fieldName, const uint16_t val);
+            void WriteUInt16(const char* fieldName, uint16_t val);
 
             /**
              * Write array of 16-byte unsigned integers. Maps to "char[]" type in Java.
@@ -108,7 +108,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteUInt16Array(const char* fieldName, const uint16_t* val, const int32_t len);
+            void WriteUInt16Array(const char* fieldName, const uint16_t* val, int32_t len);
 
             /**
              * Write 32-byte signed integer. Maps to "int" type in Java.
@@ -116,7 +116,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteInt32(const char* fieldName, const int32_t val);
+            void WriteInt32(const char* fieldName, int32_t val);
 
             /**
              * Write array of 32-byte signed integers. Maps to "int[]" type in Java.
@@ -125,7 +125,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt32Array(const char* fieldName, const int32_t* val, const int32_t len);
+            void WriteInt32Array(const char* fieldName, const int32_t* val, int32_t len);
 
             /**
              * Write 64-byte signed integer. Maps to "long" type in Java.
@@ -133,7 +133,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteInt64(const char* fieldName, const int64_t val);
+            void WriteInt64(const char* fieldName, int64_t val);
 
             /**
              * Write array of 64-byte signed integers. Maps to "long[]" type in Java.
@@ -142,7 +142,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteInt64Array(const char* fieldName, const int64_t* val, const int32_t len);
+            void WriteInt64Array(const char* fieldName, const int64_t* val, int32_t len);
 
             /**
              * Write float. Maps to "float" type in Java.
@@ -150,7 +150,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteFloat(const char* fieldName, const float val);
+            void WriteFloat(const char* fieldName, float val);
 
             /**
              * Write array of floats. Maps to "float[]" type in Java.
@@ -159,7 +159,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteFloatArray(const char* fieldName, const float* val, const int32_t len);
+            void WriteFloatArray(const char* fieldName, const float* val, int32_t len);
 
             /**
              * Write double. Maps to "double" type in Java.
@@ -167,7 +167,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteDouble(const char* fieldName, const double val);
+            void WriteDouble(const char* fieldName, double val);
 
             /**
              * Write array of doubles. Maps to "double[]" type in Java.
@@ -176,7 +176,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteDoubleArray(const char* fieldName, const double* val, const int32_t len);
+            void WriteDoubleArray(const char* fieldName, const double* val, int32_t len);
 
             /**
              * Write Guid. Maps to "UUID" type in Java.
@@ -184,7 +184,7 @@ namespace ignite
              * @param fieldName Field name.
              * @param val Value.
              */
-            void WriteGuid(const char* fieldName, const Guid val);
+            void WriteGuid(const char* fieldName, const Guid& val);
 
             /**
              * Write array of Guids. Maps to "UUID[]" type in Java.
@@ -193,7 +193,7 @@ namespace ignite
              * @param val Array.
              * @param len Array length.
              */
-            void WriteGuidArray(const char* fieldName, const Guid* val, const int32_t len);
+            void WriteGuidArray(const char* fieldName, const Guid* val, int32_t len);
 
             /**
              * Write string.
@@ -210,7 +210,7 @@ namespace ignite
              * @param val String.
              * @param len String length (characters).
              */
-            void WriteString(const char* fieldName, const char* val, const int32_t len);
+            void WriteString(const char* fieldName, const char* val, int32_t len);
 
             /**
              * Write string.

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/ignite.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/ignite.cpp b/modules/platforms/cpp/core/src/ignite.cpp
index 665383b..70a2c8d 100644
--- a/modules/platforms/cpp/core/src/ignite.cpp
+++ b/modules/platforms/cpp/core/src/ignite.cpp
@@ -35,7 +35,7 @@ namespace ignite
         // No-op.
     }
 
-    char* Ignite::GetName()
+    const char* Ignite::GetName() const
     {
         return impl.Get()->GetName();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/ignite_error.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/ignite_error.cpp b/modules/platforms/cpp/core/src/ignite_error.cpp
index 65cd291..1545631 100644
--- a/modules/platforms/cpp/core/src/ignite_error.cpp
+++ b/modules/platforms/cpp/core/src/ignite_error.cpp
@@ -76,12 +76,12 @@ namespace ignite
         ReleaseChars(msg);
     }
 
-    int32_t IgniteError::GetCode()
+    int32_t IgniteError::GetCode() const
     {
         return code;
     }
 
-    const char* IgniteError::GetText()
+    const char* IgniteError::GetText() const
     {
         if (code == IGNITE_SUCCESS)
             return "Operation completed successfully.";

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp b/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
index 2f211e7..024e435 100644
--- a/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cache/cache_impl.cpp
@@ -131,7 +131,7 @@ namespace ignite
                 JniContext::Release(javaRef);
             }
 
-            char* CacheImpl::GetName()
+            const char* CacheImpl::GetName() const
             {
                 return name;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/ignite_environment.cpp b/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
index 8fb1a02..0263956 100644
--- a/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
+++ b/modules/platforms/cpp/core/src/impl/ignite_environment.cpp
@@ -92,7 +92,7 @@ namespace ignite
             latch->CountDown();
         }
         
-        char* IgniteEnvironment::InstanceName()
+        const char* IgniteEnvironment::InstanceName() const
         {
             return name;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/ignite_impl.cpp b/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
index 1aad309..c0eab68 100644
--- a/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/ignite_impl.cpp
@@ -34,7 +34,7 @@ namespace ignite
             JniContext::Release(javaRef);
         }
 
-        char* IgniteImpl::GetName()
+        const char* IgniteImpl::GetName() const
         {
             return env.Get()->InstanceName();
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/interop/interop_input_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/interop/interop_input_stream.cpp b/modules/platforms/cpp/core/src/impl/interop/interop_input_stream.cpp
index 72340ee..0514f92 100644
--- a/modules/platforms/cpp/core/src/impl/interop/interop_input_stream.cpp
+++ b/modules/platforms/cpp/core/src/impl/interop/interop_input_stream.cpp
@@ -163,12 +163,12 @@ namespace ignite
                 IGNITE_INTEROP_IN_READ_ARRAY(len, 3);
             }
                 
-            int32_t InteropInputStream::Remaining()
+            int32_t InteropInputStream::Remaining() const
             {
                 return len - pos;
             }
 
-            int32_t InteropInputStream::Position()
+            int32_t InteropInputStream::Position() const
             {
                 return pos;
             }
@@ -189,7 +189,7 @@ namespace ignite
                 len = mem->Length();
             }
             
-            void InteropInputStream::EnsureEnoughData(int32_t cnt)
+            void InteropInputStream::EnsureEnoughData(int32_t cnt) const
             {
                 if (len - pos < cnt) {
                     IGNITE_ERROR_FORMATTED_4(IgniteError::IGNITE_ERR_MEMORY, "Not enough data in the stream",

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/interop/interop_memory.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/interop/interop_memory.cpp b/modules/platforms/cpp/core/src/impl/interop/interop_memory.cpp
index 05ba8b6..8ee49c5 100644
--- a/modules/platforms/cpp/core/src/impl/interop/interop_memory.cpp
+++ b/modules/platforms/cpp/core/src/impl/interop/interop_memory.cpp
@@ -28,9 +28,9 @@ namespace ignite
     {
         namespace interop 
         {
-            int8_t* InteropMemory::Data(int8_t* memPtr)
+            int8_t* InteropMemory::Data(const int8_t* memPtr)
             {
-                return reinterpret_cast<int8_t*>(*reinterpret_cast<int64_t*>(memPtr));
+                return reinterpret_cast<int8_t*>(*reinterpret_cast<const int64_t*>(memPtr));
             }
 
             void InteropMemory::Data(int8_t* memPtr, void* ptr)
@@ -38,9 +38,9 @@ namespace ignite
                 *reinterpret_cast<int64_t*>(memPtr) = reinterpret_cast<int64_t>(ptr);
             }
 
-            int32_t InteropMemory::Capacity(int8_t* memPtr)
+            int32_t InteropMemory::Capacity(const int8_t* memPtr)
             {
-                return *reinterpret_cast<int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_CAP);
+                return *reinterpret_cast<const int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_CAP);
             }
 
             void InteropMemory::Capacity(int8_t* memPtr, int32_t val)
@@ -48,9 +48,9 @@ namespace ignite
                 *reinterpret_cast<int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_CAP) = val;
             }
 
-            int32_t InteropMemory::Length(int8_t* memPtr)
+            int32_t InteropMemory::Length(const int8_t* memPtr)
             {
-                return *reinterpret_cast<int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_LEN);
+                return *reinterpret_cast<const int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_LEN);
             }
 
             void InteropMemory::Length(int8_t* memPtr, int32_t val)
@@ -58,9 +58,9 @@ namespace ignite
                 *reinterpret_cast<int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_LEN) = val;
             }
 
-            int32_t InteropMemory::Flags(int8_t* memPtr)
+            int32_t InteropMemory::Flags(const int8_t* memPtr)
             {
-                return *reinterpret_cast<int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_FLAGS);
+                return *reinterpret_cast<const int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_FLAGS);
             }
 
             void InteropMemory::Flags(int8_t* memPtr, int32_t val)
@@ -68,7 +68,7 @@ namespace ignite
                 *reinterpret_cast<int32_t*>(memPtr + IGNITE_MEM_HDR_OFF_FLAGS) = val;
             }
 
-            bool InteropMemory::IsExternal(int8_t* memPtr)
+            bool InteropMemory::IsExternal(const int8_t* memPtr)
             {
                 return IsExternal(Flags(memPtr));
             }
@@ -78,7 +78,7 @@ namespace ignite
                 return (flags & IGNITE_MEM_FLAG_EXT) != IGNITE_MEM_FLAG_EXT;
             }
 
-            bool InteropMemory::IsPooled(int8_t* memPtr)
+            bool InteropMemory::IsPooled(const int8_t* memPtr)
             {
                 return IsPooled(Flags(memPtr));
             }
@@ -88,7 +88,7 @@ namespace ignite
                 return (flags & IGNITE_MEM_FLAG_POOLED) != 0;
             }
 
-            bool InteropMemory::IsAcquired(int8_t* memPtr)
+            bool InteropMemory::IsAcquired(const int8_t* memPtr)
             {
                 return IsAcquired(Flags(memPtr));
             }
@@ -113,12 +113,12 @@ namespace ignite
                 return Data(memPtr);
             }
 
-            int32_t InteropMemory::Capacity()
+            int32_t InteropMemory::Capacity() const
             {
                 return Capacity(memPtr);
             }
 
-            int32_t InteropMemory::Length()
+            int32_t InteropMemory::Length() const
             {
                 return Length(memPtr);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/interop/interop_output_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/interop/interop_output_stream.cpp b/modules/platforms/cpp/core/src/impl/interop/interop_output_stream.cpp
index ecdfd42..31727c7 100644
--- a/modules/platforms/cpp/core/src/impl/interop/interop_output_stream.cpp
+++ b/modules/platforms/cpp/core/src/impl/interop/interop_output_stream.cpp
@@ -168,7 +168,7 @@ namespace ignite
                     WriteDouble(*(val + i));
             }
 
-            int32_t InteropOutputStream::Position()
+            int32_t InteropOutputStream::Position() const
             {
                 return pos;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/portable/portable_reader_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/portable/portable_reader_impl.cpp b/modules/platforms/cpp/core/src/impl/portable/portable_reader_impl.cpp
index 753ec25..e41dafc 100644
--- a/modules/platforms/cpp/core/src/impl/portable/portable_reader_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/portable/portable_reader_impl.cpp
@@ -477,7 +477,7 @@ namespace ignite
                 }
             }
 
-            bool PortableReaderImpl::HasNextElement(int32_t id)
+            bool PortableReaderImpl::HasNextElement(int32_t id) const
             {
                 return elemId == id && elemRead < elemCnt;
             }
@@ -600,7 +600,7 @@ namespace ignite
                 return -1;
             }
 
-            void PortableReaderImpl::CheckRawMode(bool expected)
+            void PortableReaderImpl::CheckRawMode(bool expected) const
             {
                 if (expected && !rawMode) {
                     IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.")
@@ -610,7 +610,7 @@ namespace ignite
                 }
             }
 
-            void PortableReaderImpl::CheckSingleMode(bool expected)
+            void PortableReaderImpl::CheckSingleMode(bool expected) const
             {
                 if (expected && elemId != 0) {
                     IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being read.");
@@ -660,7 +660,7 @@ namespace ignite
                 }
             }
 
-            void PortableReaderImpl::CheckSession(int32_t expSes)
+            void PortableReaderImpl::CheckSession(int32_t expSes) const
             {
                 if (elemId != expSes) {
                     IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Containter read session has been finished or is not started yet.");
@@ -672,7 +672,7 @@ namespace ignite
                 IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", hdr)
             }
 
-            void PortableReaderImpl::ThrowOnInvalidHeader(int8_t expHdr, int8_t hdr)
+            void PortableReaderImpl::ThrowOnInvalidHeader(int8_t expHdr, int8_t hdr) const
             {
                 int32_t pos = stream->Position() - 1;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/impl/portable/portable_writer_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/portable/portable_writer_impl.cpp b/modules/platforms/cpp/core/src/impl/portable/portable_writer_impl.cpp
index 93aacd9..b16a934 100644
--- a/modules/platforms/cpp/core/src/impl/portable/portable_writer_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/portable/portable_writer_impl.cpp
@@ -469,12 +469,12 @@ namespace ignite
                 rawPos = stream->Position();
             }
 
-            int32_t PortableWriterImpl::GetRawPosition()
+            int32_t PortableWriterImpl::GetRawPosition() const
             {
                 return rawPos == -1 ? stream->Position() : rawPos;
             }
 
-            void PortableWriterImpl::CheckRawMode(bool expected)
+            void PortableWriterImpl::CheckRawMode(bool expected) const
             {
                 bool rawMode = rawPos != -1;
 
@@ -486,7 +486,7 @@ namespace ignite
                 }
             }
 
-            void PortableWriterImpl::CheckSingleMode(bool expected)
+            void PortableWriterImpl::CheckSingleMode(bool expected) const
             {
                 if (expected && elemId != 0) {
                     IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being written.");
@@ -505,7 +505,7 @@ namespace ignite
                 elemPos = stream->Position();
             }
 
-            void PortableWriterImpl::CheckSession(int32_t expSes)
+            void PortableWriterImpl::CheckSession(int32_t expSes) const
             {
                 if (elemId != expSes) 
                 {

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/portable/portable_containers.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/portable/portable_containers.cpp b/modules/platforms/cpp/core/src/portable/portable_containers.cpp
index 8270a13..2fb101d 100644
--- a/modules/platforms/cpp/core/src/portable/portable_containers.cpp
+++ b/modules/platforms/cpp/core/src/portable/portable_containers.cpp
@@ -23,7 +23,7 @@ namespace ignite
 {
     namespace portable
     {
-        PortableStringArrayWriter::PortableStringArrayWriter(PortableWriterImpl* impl, const int32_t id) : 
+        PortableStringArrayWriter::PortableStringArrayWriter(PortableWriterImpl* impl, int32_t id) : 
             impl(impl), id(id)
         {
             // No-op.
@@ -37,7 +37,7 @@ namespace ignite
                 Write(NULL, -1);
         }
 
-        void PortableStringArrayWriter::Write(const char* val, const int32_t len)
+        void PortableStringArrayWriter::Write(const char* val, int32_t len)
         {
             impl->WriteStringElement(id, val, len);
         }
@@ -58,17 +58,17 @@ namespace ignite
             return impl->HasNextElement(id);
         }
 
-        int32_t PortableStringArrayReader::GetNext(char* res, const int32_t len)
+        int32_t PortableStringArrayReader::GetNext(char* res, int32_t len)
         {
             return impl->ReadStringElement(id, res, len);
         }
 
-        int32_t PortableStringArrayReader::GetSize()
+        int32_t PortableStringArrayReader::GetSize() const
         {
             return size;
         }
 
-        bool PortableStringArrayReader::IsNull()
+        bool PortableStringArrayReader::IsNull() const
         {
             return size == -1;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/portable/portable_raw_writer.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/portable/portable_raw_writer.cpp b/modules/platforms/cpp/core/src/portable/portable_raw_writer.cpp
index c682abe..10bba4a 100644
--- a/modules/platforms/cpp/core/src/portable/portable_raw_writer.cpp
+++ b/modules/platforms/cpp/core/src/portable/portable_raw_writer.cpp
@@ -29,92 +29,92 @@ namespace ignite
             // No-op.
         }
 
-        void PortableRawWriter::WriteInt8(const int8_t val)
+        void PortableRawWriter::WriteInt8(int8_t val)
         {
             impl->WriteInt8(val);
         }
 
-        void PortableRawWriter::WriteInt8Array(const int8_t* val, const int32_t len)
+        void PortableRawWriter::WriteInt8Array(const int8_t* val, int32_t len)
         {
             impl->WriteInt8Array(val, len);
         }
 
-        void PortableRawWriter::WriteBool(const bool val)
+        void PortableRawWriter::WriteBool(bool val)
         {
             impl->WriteBool(val);
         }
 
-        void PortableRawWriter::WriteBoolArray(const bool* val, const int32_t len)
+        void PortableRawWriter::WriteBoolArray(const bool* val, int32_t len)
         {            
             impl->WriteBoolArray(val, len);
         }
 
-        void PortableRawWriter::WriteInt16(const int16_t val)
+        void PortableRawWriter::WriteInt16(int16_t val)
         {
             impl->WriteInt16(val);
         }
 
-        void PortableRawWriter::WriteInt16Array(const int16_t* val, const int32_t len)
+        void PortableRawWriter::WriteInt16Array(const int16_t* val, int32_t len)
         {
             impl->WriteInt16Array(val, len);
         }
 
-        void PortableRawWriter::WriteUInt16(const uint16_t val)
+        void PortableRawWriter::WriteUInt16(uint16_t val)
         {
             impl->WriteUInt16(val);
         }
 
-        void PortableRawWriter::WriteUInt16Array(const uint16_t* val, const int32_t len)
+        void PortableRawWriter::WriteUInt16Array(const uint16_t* val, int32_t len)
         {
             impl->WriteUInt16Array(val, len);
         }
 
-        void PortableRawWriter::WriteInt32(const int32_t val)
+        void PortableRawWriter::WriteInt32(int32_t val)
         {
             impl->WriteInt32(val);
         }
 
-        void PortableRawWriter::WriteInt32Array(const int32_t* val, const int32_t len)
+        void PortableRawWriter::WriteInt32Array(const int32_t* val, int32_t len)
         {
             impl->WriteInt32Array(val, len);
         }
 
-        void PortableRawWriter::WriteInt64(const int64_t val)
+        void PortableRawWriter::WriteInt64(int64_t val)
         {
             impl->WriteInt64(val);
         }
 
-        void PortableRawWriter::WriteInt64Array(const int64_t* val, const int32_t len)
+        void PortableRawWriter::WriteInt64Array(const int64_t* val, int32_t len)
         {
             impl->WriteInt64Array(val, len);
         }
 
-        void PortableRawWriter::WriteFloat(const float val)
+        void PortableRawWriter::WriteFloat(float val)
         {
             impl->WriteFloat(val);
         }
 
-        void PortableRawWriter::WriteFloatArray(const float* val, const int32_t len)
+        void PortableRawWriter::WriteFloatArray(const float* val, int32_t len)
         {
             impl->WriteFloatArray(val, len);
         }
 
-        void PortableRawWriter::WriteDouble(const double val)
+        void PortableRawWriter::WriteDouble(double val)
         {
             impl->WriteDouble(val);
         }
 
-        void PortableRawWriter::WriteDoubleArray(const double* val, const int32_t len)
+        void PortableRawWriter::WriteDoubleArray(const double* val, int32_t len)
         {
             impl->WriteDoubleArray(val, len);
         }
 
-        void PortableRawWriter::WriteGuid(const Guid val)
+        void PortableRawWriter::WriteGuid(const Guid& val)
         {
             impl->WriteGuid(val);
         }
 
-        void PortableRawWriter::WriteGuidArray(const Guid* val, const int32_t len)
+        void PortableRawWriter::WriteGuidArray(const Guid* val, int32_t len)
         {
             impl->WriteGuidArray(val, len);
         }
@@ -127,7 +127,7 @@ namespace ignite
                 WriteNull();
         }
 
-        void PortableRawWriter::WriteString(const char* val, const int32_t len)
+        void PortableRawWriter::WriteString(const char* val, int32_t len)
         {
             impl->WriteString(val, len);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/portable/portable_reader.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/portable/portable_reader.cpp b/modules/platforms/cpp/core/src/portable/portable_reader.cpp
index 515216d..fe8fba1 100644
--- a/modules/platforms/cpp/core/src/portable/portable_reader.cpp
+++ b/modules/platforms/cpp/core/src/portable/portable_reader.cpp
@@ -33,7 +33,7 @@ namespace ignite
             return impl->ReadInt8(fieldName);
         }
 
-        int32_t PortableReader::ReadInt8Array(const char* fieldName, int8_t* res, const int32_t len)
+        int32_t PortableReader::ReadInt8Array(const char* fieldName, int8_t* res, int32_t len)
         {
             return impl->ReadInt8Array(fieldName, res, len);
         }
@@ -43,7 +43,7 @@ namespace ignite
             return impl->ReadBool(fieldName);
         }
 
-        int32_t PortableReader::ReadBoolArray(const char* fieldName, bool* res, const int32_t len)
+        int32_t PortableReader::ReadBoolArray(const char* fieldName, bool* res, int32_t len)
         {
             return impl->ReadBoolArray(fieldName, res, len);
         }
@@ -53,7 +53,7 @@ namespace ignite
             return impl->ReadInt16(fieldName);
         }
 
-        int32_t PortableReader::ReadInt16Array(const char* fieldName, int16_t* res, const int32_t len)
+        int32_t PortableReader::ReadInt16Array(const char* fieldName, int16_t* res, int32_t len)
         {
             return impl->ReadInt16Array(fieldName, res, len);
         }
@@ -63,7 +63,7 @@ namespace ignite
             return impl->ReadUInt16(fieldName);
         }
 
-        int32_t PortableReader::ReadUInt16Array(const char* fieldName, uint16_t* res, const int32_t len)
+        int32_t PortableReader::ReadUInt16Array(const char* fieldName, uint16_t* res, int32_t len)
         {
             return impl->ReadUInt16Array(fieldName, res, len);
         }
@@ -73,7 +73,7 @@ namespace ignite
             return impl->ReadInt32(fieldName);
         }
 
-        int32_t PortableReader::ReadInt32Array(const char* fieldName, int32_t* res, const int32_t len)
+        int32_t PortableReader::ReadInt32Array(const char* fieldName, int32_t* res, int32_t len)
         {
             return impl->ReadInt32Array(fieldName, res, len);
         }
@@ -83,7 +83,7 @@ namespace ignite
             return impl->ReadInt64(fieldName);
         }
 
-        int32_t PortableReader::ReadInt64Array(const char* fieldName, int64_t* res, const int32_t len)
+        int32_t PortableReader::ReadInt64Array(const char* fieldName, int64_t* res, int32_t len)
         {
             return impl->ReadInt64Array(fieldName, res, len);
         }
@@ -93,7 +93,7 @@ namespace ignite
             return impl->ReadFloat(fieldName);
         }
 
-        int32_t PortableReader::ReadFloatArray(const char* fieldName, float* res, const int32_t len)
+        int32_t PortableReader::ReadFloatArray(const char* fieldName, float* res, int32_t len)
         {
             return impl->ReadFloatArray(fieldName, res, len);
         }
@@ -103,7 +103,7 @@ namespace ignite
             return impl->ReadDouble(fieldName);
         }
 
-        int32_t PortableReader::ReadDoubleArray(const char* fieldName, double* res, const int32_t len)
+        int32_t PortableReader::ReadDoubleArray(const char* fieldName, double* res, int32_t len)
         {
             return impl->ReadDoubleArray(fieldName, res, len);
         }
@@ -113,12 +113,12 @@ namespace ignite
             return impl->ReadGuid(fieldName);
         }
 
-        int32_t PortableReader::ReadGuidArray(const char* fieldName, Guid* res, const int32_t len)
+        int32_t PortableReader::ReadGuidArray(const char* fieldName, Guid* res, int32_t len)
         {
             return impl->ReadGuidArray(fieldName, res, len);
         }
         
-        int32_t PortableReader::ReadString(const char* fieldName, char* res, const int32_t len)
+        int32_t PortableReader::ReadString(const char* fieldName, char* res, int32_t len)
         {
             return impl->ReadString(fieldName, res, len);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8a3d68a3/modules/platforms/cpp/core/src/portable/portable_writer.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/portable/portable_writer.cpp b/modules/platforms/cpp/core/src/portable/portable_writer.cpp
index f31b9dd..917d356 100644
--- a/modules/platforms/cpp/core/src/portable/portable_writer.cpp
+++ b/modules/platforms/cpp/core/src/portable/portable_writer.cpp
@@ -29,52 +29,52 @@ namespace ignite
             // No-op.
         }
 
-        void PortableWriter::WriteInt8(const char* fieldName, const int8_t val)
+        void PortableWriter::WriteInt8(const char* fieldName, int8_t val)
         {
             impl->WriteInt8(fieldName, val);
         }
 
-        void PortableWriter::WriteInt8Array(const char* fieldName, const int8_t* val, const int32_t len)
+        void PortableWriter::WriteInt8Array(const char* fieldName, const int8_t* val, int32_t len)
         {
             impl->WriteInt8Array(fieldName, val, len);
         }
 
-        void PortableWriter::WriteBool(const char* fieldName, const bool val)
+        void PortableWriter::WriteBool(const char* fieldName, bool val)
         {
             impl->WriteBool(fieldName, val);
         }
 
-        void PortableWriter::WriteBoolArray(const char* fieldName, const bool* val, const int32_t len)
+        void PortableWriter::WriteBoolArray(const char* fieldName, const bool* val, int32_t len)
         {
             impl->WriteBoolArray(fieldName, val, len);
         }
 
-        void PortableWriter::WriteInt16(const char* fieldName, const int16_t val)
+        void PortableWriter::WriteInt16(const char* fieldName, int16_t val)
         {
             impl->WriteInt16(fieldName, val);
         }
 
-        void PortableWriter::WriteInt16Array(const char* fieldName, const int16_t* val, const int32_t len)
+        void PortableWriter::WriteInt16Array(const char* fieldName, const int16_t* val, int32_t len)
         {
             impl->WriteInt16Array(fieldName, val, len);
         }
 
-        void PortableWriter::WriteUInt16(const char* fieldName, const uint16_t val)
+        void PortableWriter::WriteUInt16(const char* fieldName, uint16_t val)
         {
             impl->WriteUInt16(fieldName, val);
         }
 
-        void PortableWriter::WriteUInt16Array(const char* fieldName, const uint16_t* val, const int32_t len)
+        void PortableWriter::WriteUInt16Array(const char* fieldName, const uint16_t* val, int32_t len)
         {
             impl->WriteUInt16Array(fieldName, val, len);
         }
 
-        void PortableWriter::WriteInt32(const char* fieldName, const int32_t val)
+        void PortableWriter::WriteInt32(const char* fieldName, int32_t val)
         {
             impl->WriteInt32(fieldName, val);
         }
 
-        void PortableWriter::WriteInt32Array(const char* fieldName, const int32_t* val, const int32_t len)
+        void PortableWriter::WriteInt32Array(const char* fieldName, const int32_t* val, int32_t len)
         {
             impl->WriteInt32Array(fieldName, val, len);
         }
@@ -84,32 +84,32 @@ namespace ignite
             impl->WriteInt64(fieldName, val);
         }
 
-        void PortableWriter::WriteInt64Array(const char* fieldName, const int64_t* val, const int32_t len)
+        void PortableWriter::WriteInt64Array(const char* fieldName, const int64_t* val, int32_t len)
         {
             impl->WriteInt64Array(fieldName, val, len);
         }
 
-        void PortableWriter::WriteFloat(const char* fieldName, const float val)
+        void PortableWriter::WriteFloat(const char* fieldName, float val)
         {
             impl->WriteFloat(fieldName, val);
         }
 
-        void PortableWriter::WriteFloatArray(const char* fieldName, const float* val, const int32_t len)
+        void PortableWriter::WriteFloatArray(const char* fieldName, const float* val, int32_t len)
         {
             impl->WriteFloatArray(fieldName, val, len);
         }
 
-        void PortableWriter::WriteDouble(const char* fieldName, const double val)
+        void PortableWriter::WriteDouble(const char* fieldName, double val)
         {
             impl->WriteDouble(fieldName, val);
         }
 
-        void PortableWriter::WriteDoubleArray(const char* fieldName, const double* val, const int32_t len)
+        void PortableWriter::WriteDoubleArray(const char* fieldName, const double* val, int32_t len)
         {
             impl->WriteDoubleArray(fieldName, val, len);
         }
 
-        void PortableWriter::WriteGuid(const char* fieldName, const Guid val)
+        void PortableWriter::WriteGuid(const char* fieldName, const Guid& val)
         {
             impl->WriteGuid(fieldName, val);
         }
@@ -127,7 +127,7 @@ namespace ignite
                 WriteNull(fieldName);
         }
 
-        void PortableWriter::WriteString(const char* fieldName, const char* val, const int32_t len)
+        void PortableWriter::WriteString(const char* fieldName, const char* val, int32_t len)
         {
             impl->WriteString(fieldName, val, len);
         }


Mime
View raw message