<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>etch-commits@incubator.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/"/>
<id>http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/</id>
<updated>2013-05-23T07:32:21Z</updated>
<entry>
<title>svn commit: r1400862 - /incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121022123227.5B10223888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121022123227-5B10223888FD@eris-apache-org%3e</id>
<updated>2012-10-22T12:32:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Mon Oct 22 12:32:26 2012&#010;New Revision: 1400862&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1400862&amp;view=rev&#010;Log:&#010;ETCH-243 Fixed small template related bug in code generation&#010;&#010;Change-Id: Ic7963da6bc3fdff6b1925a4e5e00534953cd7e84&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm?rev=1400862&amp;r1=1400861&amp;r2=1400862&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;Mon Oct 22 12:32:26 2012&#010;@@ -51,7 +51,7 @@ class Run${mthd.vname($helper)}&#010; {&#010; public:&#010;   Run${mthd.vname($helper)}(EtchRuntime* runtime)&#010;-  : EtchStubHelper(runtime) {&#010;+  : EtchStubHelper&lt;$i$suffix&gt;(runtime) {&#010;   }&#010;   &#010;   ~Run${mthd.vname($helper)}() {&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1400861 - in /incubator/etch/trunk: ./ binding-cpp/runtime/ binding-cpp/runtime/lib/capu/cmake/acme/toolchain/ binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/ binding-cpp/runtime/src/main/ binding-cpp/runtime/src/test/ bind...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121022122507.DF1C523888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121022122507-DF1C523888FD@eris-apache-org%3e</id>
<updated>2012-10-22T12:25:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Mon Oct 22 12:25:06 2012&#010;New Revision: 1400861&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1400861&amp;view=rev&#010;Log:&#010;ETCH-245 Refactoring of ant/CMake build system of cpp-binding&#010;&#010;Introduction of toolchain files&#010;&#010;Change-Id: Ieaa654df10a20ce6cc69a3438b37c690b9e140a9&#010;&#010;Added:&#010;    incubator/etch/trunk/binding-cpp/runtime/build.properties&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86_32.toolchain&#010;      - copied, changed from r1399123, incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_ARMv7l.toolchain&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_32.toolchain&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_64.toolchain&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/QNX_X86_32.toolchain&#010;      - copied, changed from r1399123, incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain&#010;    incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_64.toolchain&#010;Removed:&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/CMakeLists.txt&#010;    incubator/etch/trunk/binding-cpp/runtime/build.xml&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/StringUtils.inc&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt&#010;    incubator/etch/trunk/build-support/dependencies.xml&#010;    incubator/etch/trunk/build-support/etch.common.xml&#010;    incubator/etch/trunk/build.dependencies&#010;    incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java   (contents,&#010;props changed)&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/CMakeLists.txt?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/CMakeLists.txt Mon Oct 22 12:25:06 2012&#010;@@ -33,6 +33,11 @@ IF (NOT ETCH_EXTERNAL_DEPENDS)&#010;   MESSAGE (FATAL_ERROR "ETCH_EXTERNAL_DEPENDS not set")&#010; ENDIF (NOT ETCH_EXTERNAL_DEPENDS)&#010; &#010;+# Check Toolchain file&#010;+IF (NOT CMAKE_TOOLCHAIN_FILE)&#010;+  MESSAGE (FATAL_ERROR "CMAKE_TOOLCHAIN_FILE not set")&#010;+ENDIF (NOT CMAKE_TOOLCHAIN_FILE)&#010;+&#010; #VLD&#010; SET(VLD ${ETCH_EXTERNAL_DEPENDS}/vld/1.9h)&#010; &#010;@@ -47,15 +52,7 @@ SET(CAPU_PROJECT_DIR "${CMAKE_CURRENT_SO&#010; SET(CAPU_CMAKE_BUILD_DIR "${CAPU_PROJECT_DIR}/build")&#010; SET(CAPU_CMAKE_TOOLCHAIN_DIR "${CAPU_PROJECT_DIR}/cmake/acme/toolchain")&#010; SET(CAPU_DELIVERABLE_DIR "${CAPU_PROJECT_DIR}/deliverable")&#010;-IF(UNIX)&#010;-  SET(CAPU_CMAKE_TOOLCHAIN_FILE "Linux_X86_32.toolchain")&#010;-  add_definitions("-DOS_LINUX")&#010;-  add_definitions("-DARCH_X86_32")&#010;-ELSEIF(WIN32)&#010;-  SET(CAPU_CMAKE_TOOLCHAIN_FILE "Windows_X86_32.toolchain")&#010;-  add_definitions("-DOS_WINDOWS")&#010;-  add_definitions("-DARCH_X86_32")&#010;-ENDIF()&#010;+&#010; &#010; include(ExternalProject)&#010; ExternalProject_Add(&#010;@@ -64,7 +61,7 @@ ExternalProject_Add(&#010;   BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}"&#010;   DOWNLOAD_COMMAND ""&#010;   UPDATE_COMMAND ""&#010;-  CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CAPU_CMAKE_TOOLCHAIN_DIR}/${CAPU_CMAKE_TOOLCHAIN_FILE}&#010;+  CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}&#010;              -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}&#010; )&#010; &#010;@@ -73,9 +70,9 @@ SET(CAPU "${CAPU_PROJECT_DIR}/deliverabl&#010; &#010; &#010; # Set definitions&#010;-IF (UNIX)&#010;+IF (TARGET_OS STREQUAL "Linux")&#010;   add_definitions (-D_GNU_SOURCE -D_REENTRANT -DLINUX=2 -D__LINUX__)&#010;-ENDIF (UNIX)&#010;+ENDIF ()&#010; add_definitions (-D_UNICODE -DUNICODE)&#010; &#010; # etch libary&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/build.properties&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/build.properties?rev=1400861&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/build.properties (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/build.properties Mon Oct 22 12:25:06 2012&#010;@@ -0,0 +1,15 @@&#010;+#Set the platforms which should be build by running ant&#010;+&#010;+&#010;+#target.platforms=Windows_X86_32, QNX_X86_32&#010;+#target.platforms.Windows_X86_32.generator=Visual Studio 8 2005&#010;+#target.platforms.QNX_X86_32.generator=Unix Makefiles&#010;+&#010;+#preventing execution of tests&#010;+#target.platforms.QNX_X86_32.crosscompile=1&#010;+&#010;+&#010;+#target.platforms=Linux_X86_32, Linux_ARMv7l&#010;+#target.platforms.Linux_X86_32.generator=Unix Makefiles&#010;+#target.platforms.Linux_ARMv7l.generator=Unix Makefiles&#010;+#target.platforms.Linux_ARMv7l.crosscompile=1&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/build.xml&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/build.xml?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/build.xml (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/build.xml Mon Oct 22 12:25:06 2012&#010;@@ -20,6 +20,13 @@&#010; &lt;project name="etch-cpp-runtime" basedir="." default="help"&gt;&#010;     &lt;description&gt;Etch-to-CPP runtime binding implementation&lt;/description&gt;&#010;     &lt;property name="Etch.basedir" location="${basedir}/../.." /&gt;&#010;+&#010;+    &lt;property file="build.properties"/&gt;&#010;+&#010;+    &lt;!-- import custom rules which can be used by depending projects to override ant targets&#010;--&gt;&#010;+    &lt;import file="custom_rules.xml" optional="true" /&gt;&#010;+&#010;+    &lt;!-- import etch generics --&gt;&#010;     &lt;import file="${Etch.basedir}/build-support/etch.includes.xml" /&gt;&#010; &#010;     &lt;!-- Static properties of the sub-project --&gt;&#010;@@ -30,19 +37,73 @@&#010;     &lt;!-- INIT TARGET --&gt;&#010;     &lt;!-- Modify this target to define project specific properties that can only be set&#010;at runtime --&gt;&#010;     &lt;target name="do-init" &gt;&#010;-        &lt;mkdir dir="${target}" /&gt;&#010;-        &lt;mkdir dir="${testResultsDirectory}" /&gt;&#010;+        &lt;property name="target_platform"                location="${target}/${platform}"/&gt;&#010;+        &lt;property name="testResultsDirectory_platform"  location="${testResultsDirectory}/${platform}"/&gt;&#010;+        &lt;echo&gt;${target_platform} created&lt;/echo&gt;&#010;+        &lt;mkdir dir="${target_platform}" /&gt;&#010;+        &lt;mkdir dir="${testResultsDirectory_platform}" /&gt;&#010;     &lt;/target&gt;&#010; &#010;     &lt;!-- CLEAN TARGET --&gt;&#010;     &lt;target name="do-clean"&gt;&#010;         &lt;delete dir="${target}" /&gt;&#010;-    &lt;delete dir="${proj}/lib/capu/3psw/libs" /&gt;&#010;-    &lt;delete dir="${proj}/lib/capu/build" /&gt;&#010;-    &lt;delete dir="${proj}/lib/capu/deliverable" /&gt;&#010;+        &lt;delete dir="${proj}/lib/capu/3psw/libs" /&gt;&#010;+        &lt;delete dir="${proj}/lib/capu/build" /&gt;&#010;+        &lt;delete dir="${proj}/lib/capu/deliverable" /&gt;&#010;+    &lt;/target&gt;&#010;+&#010;+    &lt;target name="do-clean-capu"&gt;&#010;+        &lt;delete dir="${proj}/lib/capu/build" /&gt;&#010;+        &lt;delete dir="${proj}/lib/capu/deliverable" /&gt;&#010;     &lt;/target&gt;&#010; &#010;     &lt;!-- BUILD TARGET --&gt;&#010;+&#010;+    &lt;!-- overriding build target from etch.include.xml --&gt;&#010;+    &lt;target name="build" depends=""&gt;&#010;+        &lt;!-- Build platform targets --&gt;&#010;+        &lt;if&gt;&#010;+            &lt;not&gt;&lt;isset property="${target.platforms}"/&gt;&lt;/not&gt;&#010;+            &lt;then&gt;&#010;+                &lt;echo level="warn"&gt;No target.platforms set. Trying to build for detected&#010;host platform...&lt;/echo&gt;&#010;+                    &lt;if&gt;&#010;+                        &lt;os family="windows" /&gt;&#010;+                        &lt;then&gt;&#010;+                            &lt;property name="target.platforms" value="Windows_X86_32"/&gt;&#010;+                        &lt;/then&gt;&#010;+                    &lt;/if&gt;&#010;+                    &lt;if&gt;&#010;+                        &lt;os family="unix" /&gt;&#010;+                        &lt;then&gt;&#010;+                            &lt;property name="target.platforms" value="Linux_X86_32"/&gt;&#010;+                        &lt;/then&gt;&#010;+                    &lt;/if&gt;&#010;+            &lt;/then&gt;&#010;+        &lt;/if&gt;&#010;+        &#010;+        &lt;if&gt;&#010;+            &lt;equals arg1="${target.platforms}" arg2=""/&gt;&#010;+            &lt;then&gt;&#010;+                &lt;echo&gt;${target.platforms}&lt;/echo&gt;&#010;+                &lt;fail message="Not able to detect platform. target.platforms is not set.&#010;Aborting."/&gt;&#010;+            &lt;/then&gt;&#010;+        &lt;/if&gt;&#010;+        &lt;for list="${target.platforms}" param="platform" delimiter="," trim="true"&gt;&#010;+            &lt;sequential&gt;&#010;+                &lt;var  name="platform" value="@{platform}"/&gt;&#010;+                &lt;echo&gt;Init platform: ${platform}&lt;/echo&gt;&#010;+                &lt;antcall target="init"/&gt;&#010;+                &lt;echo&gt;Building platform: ${platform}&lt;/echo&gt;&#010;+                &lt;antcall target="do-build"/&gt;&#010;+                &lt;echo&gt;Testing platform: ${platform}&lt;/echo&gt;&#010;+                &lt;antcall target="do-test"/&gt;&#010;+                &lt;!-- TODO remove this as soon as ACME in capu is able to build multiple&#010;targets --&gt;&#010;+                &lt;antcall target="do-clean-capu"/&gt;&#010;+            &lt;/sequential&gt;&#010;+        &lt;/for&gt;&#010;+&#010;+    &lt;/target&gt;&#010;+&#010;     &lt;target name="do-build-info" unless="USE.cmake"&gt;&#010;         &lt;echo message="**********************************" /&gt;&#010;         &lt;echo message="binding-cpp build will not be done." /&gt;&#010;@@ -61,17 +122,32 @@&#010;         &lt;/zip&gt;&#010;     &lt;/target&gt;&#010; &#010;-    &lt;!-- Uncomment the generator you would like to use on your platform. If no generator&#010;is set explicitly the default generator will be used. --&gt;&#010;     &lt;target name="do-build-main" if="USE.cmake"&gt;&#010;-        &lt;echo&gt;"${basedir}/target"&lt;/echo&gt;&#010;-        &lt;cmake srcdir="${basedir}" bindir="${basedir}/target" buildtype="Debug" &gt;&#010;-            &lt;!--&lt;generator name="Visual Studio 8 2005" platform="windows" /&gt;--&gt;&#010;-            &lt;!--&lt;generator name="Visual Studio 9 2008" platform="windows" /&gt;--&gt;&#010;-            &lt;!--&lt;generator name="Visual Studio 10 2010" platform="windows" /&gt;--&gt;&#010;-            &lt;!--&lt;generator name="Unix Makefiles"/&gt;--&gt;&#010;-            &lt;!--&lt;generator name="Eclipse CDT4 - Unix Makefiles" platform="Linux" /&gt;--&gt;&#010;-            &lt;variable name="ETCH_EXTERNAL_DEPENDS" type="PATH" value="${env.ETCH_EXTERNAL_DEPENDS}"&#010;/&gt;&#010;-        &lt;/cmake&gt;&#010;+        &lt;if&gt;&#010;+            &lt;isset property="target.platforms.${platform}.generator"/&gt;&#010;+            &lt;then&gt;&#010;+                &lt;!-- use specified generator --&gt;&#010;+                &lt;propertycopy name="cmake.generator" from="target.platforms.${platform}.generator"&#010;/&gt;&#010;+                &lt;echo&gt;Configuring CMake build&lt;/echo&gt;&#010;+                &lt;echo&gt;Using generator: ${cmake.generator}&lt;/echo&gt;&#010;+                &lt;echo&gt;Using toolchain file: ${basedir}/toolchains/${platform}.toolchain&lt;/echo&gt;&#010;+                &lt;cmake srcdir="${basedir}" bindir="${target}/${platform}/${Etch.build.target}"&#010;buildtype="${Etch.build.target}" &gt;&#010;+                    &lt;generator name="${cmake.generator}" /&gt;&#010;+                    &lt;variable name="ETCH_EXTERNAL_DEPENDS" type="PATH" value="${env.ETCH_EXTERNAL_DEPENDS}"&#010;/&gt;&#010;+                    &lt;variable name="CMAKE_TOOLCHAIN_FILE" type="FILEPATH" value="${basedir}/toolchains/${platform}.toolchain"&#010;/&gt;&#010;+                &lt;/cmake&gt;&#010;+            &lt;/then&gt;&#010;+            &lt;else&gt;&#010;+                &lt;!-- try default generator --&gt;&#010;+                &lt;echo&gt;Configuring CMake build&lt;/echo&gt;&#010;+                &lt;echo&gt;Using default generator&lt;/echo&gt;&#010;+                &lt;echo&gt;Using toolchain file: ${basedir}/toolchains/${platform}.toolchain&lt;/echo&gt;&#010;+                &lt;cmake srcdir="${basedir}" bindir="${target}/${platform}/${Etch.build.target}"&#010;buildtype="${Etch.build.target}" &gt;&#010;+                    &lt;variable name="ETCH_EXTERNAL_DEPENDS" type="PATH" value="${env.ETCH_EXTERNAL_DEPENDS}"&#010;/&gt;&#010;+                    &lt;variable name="CMAKE_TOOLCHAIN_FILE" type="FILEPATH" value="${basedir}/toolchains/${platform}.toolchain"&#010;/&gt;&#010;+                &lt;/cmake&gt;&#010;+            &lt;/else&gt;&#010;+        &lt;/if&gt;&#010;     &lt;/target&gt;&#010; &#010;     &lt;target name="do-build" depends="do-build-info,do-build-generate-sources,do-build-main"&#010;if="USE.cmake"&gt;&#010;@@ -87,11 +163,43 @@&#010;             &lt;/fileset&gt;&#010;         &lt;/copy&gt;&#010; &#010;+        &lt;property name="capu.library.output.path.prefix" value="${proj}/lib/capu/deliverable/capu/lib/${platform}"/&gt;&#010;+        &lt;property name="capu.binary.output.path.prefix" value="${proj}/lib/capu/deliverable/capu/bin/${platform}"/&gt;&#010;+        &lt;property name="etch.library.output.path.prefix" value="${target}/${platform}/${Etch.build.target}/src/main"/&gt;&#010;+        &lt;property name="etch.binary.output.path.prefix" value="${target}/${platform}/${Etch.build.target}/src/test"/&gt;&#010;+&#010;+        &lt;if&gt;&#010;+            &lt;!-- Visual Studio adds the Debug/Release folder, other generators do not&#010;--&gt;&#010;+            &lt;equals arg1="${platform}" arg2="Windows_X86_32" /&gt;&#010;+            &lt;then&gt;&#010;+                &lt;property name="capu.library.output.path" value="${capu.library.output.path.prefix}/${Etch.build.target}"&#010;/&gt;&#010;+                &lt;property name="capu.binary.output.path" value="${capu.binary.output.path.prefix}/${Etch.build.target}"&#010;/&gt;&#010;+                &lt;property name="etch.library.output.path" value="${etch.library.output.path.prefix}/${Etch.build.target}"&#010;/&gt;&#010;+                &lt;property name="etch.binary.output.path" value="${etch.binary.output.path.prefix}/${Etch.build.target}"&#010;/&gt;&#010;+            &lt;/then&gt;&#010;+            &lt;else&gt;&#010;+                &lt;property name="capu.library.output.path" value="${capu.library.output.path.prefix}"&#010;/&gt;&#010;+                &lt;property name="capu.binary.output.path" value="${capu.binary.output.path.prefix}"&#010;/&gt;&#010;+                &lt;property name="etch.library.output.path" value="${etch.library.output.path.prefix}"&#010;/&gt;&#010;+                &lt;property name="etch.binary.output.path" value="${etch.binary.output.path.prefix}"&#010;/&gt;&#010;+            &lt;/else&gt;&#010;+        &lt;/if&gt;&#010;+        &#010;         &lt;!-- copy etch library to dist folder --&gt;&#010;-        &lt;copy todir="${Etch.dist}/binding-cpp/lib" flatten="true"&gt;&#010;-            &lt;fileset dir="${target}/src/main"&gt;&#010;-            &lt;/fileset&gt;&#010;-        &lt;/copy&gt;&#010;+        &lt;copy todir="${Etch.dist}/binding-cpp/lib/${platform}/${Etch.build.target}" flatten="true"&gt;&#010;+            &lt;fileset dir="${etch.library.output.path}"&gt;&#010;+                &lt;include name="*.lib" /&gt;&#010;+                &lt;include name="*.a" /&gt;&#010;+            &lt;/fileset&gt;&#010;+        &lt;/copy&gt;&#010;+        &#010;+        &lt;!-- copy etch tests to dist folder --&gt;&#010;+        &lt;copy todir="${Etch.dist}/binding-cpp/bin/${platform}/${Etch.build.target}" flatten="true"&gt;&#010;+            &lt;fileset dir="${etch.binary.output.path}"&gt;&#010;+                &lt;include name="etch-cpp-test.exe" /&gt;&#010;+                &lt;include name="etch-cpp-test" /&gt;&#010;+            &lt;/fileset&gt;&#010;+        &lt;/copy&gt;&#010;         &#010;         &lt;!-- copy capu includes to dist folder --&gt;&#010;         &lt;copy todir="${Etch.dist}/binding-cpp/include"&gt;&#010;@@ -101,43 +209,61 @@&#010;         &lt;/copy&gt;&#010;     &#010;         &lt;!-- copy capu lib to dist folder --&gt;&#010;-        &lt;copy todir="${Etch.dist}/binding-cpp/lib"&gt;&#010;-            &lt;fileset dir="${proj}/lib/capu/deliverable/capu/lib"&gt;&#010;-                &lt;include name="**/*.lib" /&gt;&#010;-&#009;&#009;&lt;include name="**/*.a" /&gt;&#010;+        &lt;copy todir="${Etch.dist}/binding-cpp/lib/${platform}/${Etch.build.target}"&gt;&#010;+            &lt;fileset dir="${capu.library.output.path}"&gt;&#010;+                &lt;include name="*.lib" /&gt;&#010;+                &lt;include name="*.a" /&gt;&#010;             &lt;/fileset&gt;&#010;         &lt;/copy&gt;&#010;-&#010;+        &#010;+        &lt;!-- copy capu tests to dist folder --&gt;&#010;+        &lt;copy todir="${Etch.dist}/binding-cpp/bin/${platform}/${Etch.build.target}"&gt;&#010;+            &lt;fileset dir="${capu.binary.output.path}"&gt;&#010;+            &lt;include name="capuTest.exe" /&gt;&#010;+                &lt;include name="capuTest" /&gt;&#010;+            &lt;/fileset&gt;&#010;+        &lt;/copy&gt;&#010;     &lt;/target&gt;&#010; &#010;     &lt;!-- TEST TARGET --&gt;&#010;-    &lt;target name="do-test" unless="build.skip.tests"&gt;&#010;-&#010;-        &lt;!-- Run CAPU Unit Tests --&gt;&#010;-        &lt;!-- Run CAPU Unit Tests on Windows--&gt;&#010;-        &lt;property name="executable-full-path"&#010;-            location="lib/capu/deliverable/capu/bin/Windows_X86_32/Debug/capuTest.exe"/&gt;&#010;-        &lt;exec executable="${executable-full-path}" osfamily="windows" failonerror="true"&gt;&#010;-            &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;-        &lt;/exec&gt;&#010;-        &lt;!-- Run CAPU Unit Tests on Unix --&gt;&#010;-        &lt;exec executable="lib/capu/deliverable/capu/bin/Linux_X86_32/capuTest" osfamily="unix"&#010; failonerror="true"&gt;&#010;-            &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;-        &lt;/exec&gt;&#010;-    &#010;-        &lt;!-- Run Etch Unit Tests --&gt;&#010;-        &lt;!-- Run Etch Unit Tests on Windows--&gt;&#010;-        &lt;exec executable="${target}/src/test/debug/etch-cpp-test" osfamily="windows" &#010;failonerror="true"&gt;&#010;-            &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;-        &lt;/exec&gt;&#010;-        &lt;!-- Run Etch Unit Tests on Unix --&gt;&#010;-        &lt;exec executable="${target}/src/test/etch-cpp-test" osfamily="unix"  failonerror="true"&gt;&#010;-            &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;-        &lt;/exec&gt;&#010;+    &lt;target name="test" depends="postbuild"&gt;&#010;+        &#010;     &lt;/target&gt;&#010; &#010;-    &lt;!-- POSTBUILD TARGET --&gt;&#010;-    &lt;target name="do-postbuild"&gt;&#010;+    &lt;target name="postbuild" depends="build,do-postbuild"&gt;&#010;+        &#010;+    &lt;/target&gt;&#010;+  &#010;+    &lt;target name="do-test" unless="build.skip.tests"&gt;&#010;+        &lt;if&gt;&#010;+            &lt;isset property="target.platforms.${platform}.crosscompile"/&gt;&#010;+            &lt;then&gt;&#010;+                &lt;echo&gt;Not executing tests for cross compiled platform&lt;/echo&gt;&#010;+            &lt;/then&gt;&#010;+            &lt;else&gt;&#010;+                &lt;!-- Run CAPU Unit Tests --&gt;&#010;+                &lt;!-- Run CAPU Unit Tests on Windows--&gt;&#010;+                &lt;property name="executable-full-path"&#010;+                    location="lib/capu/deliverable/capu/bin/Windows_X86_32/${Etch.build.target}/capuTest.exe"/&gt;&#010;+                &lt;exec executable="${executable-full-path}" osfamily="windows" failonerror="true"&gt;&#010;+                    &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;+                &lt;/exec&gt;&#010;+                &lt;!-- Run CAPU Unit Tests on Unix --&gt;&#010;+                &lt;exec executable="lib/capu/deliverable/capu/bin/Linux_X86_32/capuTest"&#010;osfamily="unix"  failonerror="true"&gt;&#010;+                    &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;+                &lt;/exec&gt;&#010;+            &#010;+                &lt;!-- Run Etch Unit Tests --&gt;&#010;+                &lt;!-- Run Etch Unit Tests on Windows--&gt;&#010;+                &lt;exec executable="${target}/${platform}/${Etch.build.target}/src/test/${Etch.build.target}/etch-cpp-test"&#010;osfamily="windows"  failonerror="true"&gt;&#010;+                    &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;+                &lt;/exec&gt;&#010;+                &lt;!-- Run Etch Unit Tests on Unix --&gt;&#010;+                &lt;exec executable="${target}/${platform}/${Etch.build.target}/src/test/etch-cpp-test"&#010;osfamily="unix"  failonerror="true"&gt;&#010;+                    &lt;arg value="--gtest_output=xml:${testResultsDirectory}/"/&gt;&#010;+                &lt;/exec&gt;&#010;+            &lt;/else&gt;&#010;+        &lt;/if&gt;&#010;     &lt;/target&gt;&#010; &#010;     &lt;target name="do-publish" if="build.tests.fail"&gt;&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86_32.toolchain&#010;(from r1399123, incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86_32.toolchain?p2=incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86_32.toolchain&amp;p1=incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain&amp;r1=1399123&amp;r2=1400861&amp;rev=1400861&amp;view=diff&#010;==============================================================================&#010;    (empty)&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/StringUtils.inc&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/StringUtils.inc?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/StringUtils.inc&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/StringUtils.inc&#010;Mon Oct 22 12:25:06 2012&#010;@@ -23,5 +23,5 @@&#010; #elif defined(OS_INTEGRITY)&#010;     #include "Linux/StringUtils.inc"&#010; #elif defined(OS_QNX)&#010;-    #include "Qnx/StringUtils.inc"&#010;+    #include "Linux/StringUtils.inc"&#010; #endif&#010;\ No newline at end of file&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt Mon Oct 22 12:25:06 2012&#010;@@ -239,17 +239,10 @@ add_library (etch-cpp STATIC&#010;     ${MAIN_INCLUDES}&#010; )&#010; &#010;-IF (UNIX)&#010;-  #TODO: add correct lib here debug / release&#010;-  target_link_libraries (etch-cpp ${CAPU}/lib/Linux_X86_32/libcapu.a)&#010;-ELSEIF(WIN32)&#010;-  #TODO: add correct lib here debug / release&#010;-  target_link_libraries (etch-cpp ${CAPU}/lib/windows_x86_32/debug/capu.lib)&#010;-ENDIF()&#010; &#010;-IF (UNIX)&#010;+IF (TARGET_OS STREQUAL "Linux")&#010;   set_target_properties (etch-cpp PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS "-m32")&#010;-ENDIF (UNIX)&#010;+ENDIF ()&#010; &#010; set_target_properties (etch-cpp PROPERTIES OUTPUT_NAME "etch")&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt Mon Oct 22 12:25:06 2012&#010;@@ -24,10 +24,19 @@ include_directories (${GMOCK}/include)&#010; include_directories (${CAPU}/include/capu)&#010; &#010; &#010;-IF (WIN32 AND BUILD_CHECK_MEMORY)&#010;+IF (TARGET_OS STREQUAL "Windows" AND BUILD_CHECK_MEMORY)&#010;   include_directories (${VLD}/include)&#010;   add_definitions (-DBUILD_CHECK_MEMORY)&#010;-ENDIF (WIN32 AND BUILD_CHECK_MEMORY)&#010;+ENDIF ()&#010;+&#010;+IF (TARGET_OS STREQUAL "Linux")&#010;+  link_directories(${CAPU}/lib/Linux_X86_32)&#010;+ELSEIF(TARGET_OS STREQUAL "Windows")&#010;+  link_directories(${CAPU}/lib/Windows_X86_32)&#010;+ELSEIF(TARGET_OS STREQUAL "QNX")&#010;+  link_directories(${CAPU}/lib/QNX_X86_32)&#010;+ENDIF()&#010;+&#010; &#010; add_executable (etch-cpp-test&#010;     common/EtchNumberTest.cpp&#010;@@ -100,22 +109,24 @@ add_executable (etch-cpp-test&#010;     main.cpp&#010; )&#010; &#010;-IF (UNIX)&#010;-  target_link_libraries (etch-cpp-test etch-cpp pthread rt)&#010;-ELSEIF(WIN32)&#010;-  target_link_libraries (etch-cpp-test etch-cpp)&#010;+IF (TARGET_OS STREQUAL "Linux")&#010;+  target_link_libraries (etch-cpp-test etch-cpp capu pthread rt)&#010;+ELSEIF(TARGET_OS STREQUAL "Windows")&#010;+  target_link_libraries (etch-cpp-test etch-cpp capu)&#010;+ELSEIF(TARGET_OS STREQUAL "QNX")&#010;+  target_link_libraries (etch-cpp-test etch-cpp capu c socket)&#010; ENDIF()&#010; &#010;-IF (WIN32 AND BUILD_CHECK_MEMORY)&#010;+IF (TARGET_OS STREQUAL "Windows" AND BUILD_CHECK_MEMORY)&#010;   file (COPY ${VLD}/vld.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;   file (COPY ${VLD}/bin/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;   file (COPY ${VLD}/bin/vld.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010; &#010;   target_link_libraries (etch-cpp-test ${VLD}/lib/vld.lib)&#010;-ENDIF (WIN32 AND BUILD_CHECK_MEMORY)&#010;+ENDIF ()&#010; &#010;-IF (UNIX)&#010;+IF (TARGET_OS STREQUAL "Linux")&#010;   set_target_properties (etch-cpp-test PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")&#010;-ENDIF (UNIX)&#010;+ENDIF ()&#010; &#010;-add_dependencies (etch-cpp Capu)&#010;+add_dependencies (etch-cpp-test etch-cpp Capu)&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_ARMv7l.toolchain&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_ARMv7l.toolchain?rev=1400861&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_ARMv7l.toolchain (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_ARMv7l.toolchain Mon Oct 22&#010;12:25:06 2012&#010;@@ -0,0 +1,41 @@&#010;+#&#010;+# Licensed to the Apache Software Foundation (ASF) under one or more &#010;+# contributor license agreements. See the NOTICE file distributed with  &#010;+# this work for additional information regarding copyright ownership. &#010;+# The ASF licenses this file to you under the Apache License, Version  &#010;+# 2.0 (the "License"); you may not use this file except in compliance  &#010;+# with the License. You may obtain a copy of the License at &#010;+# &#010;+# http://www.apache.org/licenses/LICENSE-2.0 &#010;+# &#010;+# Unless required by applicable law or agreed to in writing, software &#010;+# distributed under the License is distributed on an "AS IS" BASIS, &#010;+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+# See the License for the specific language governing permissions and &#010;+# limitations under the License. &#010;+#&#010;+&#010;+SET(CMAKE_SYSTEM_NAME Linux)&#010;+SET(CMAKE_SYSTEM_VERSION 1)&#010;+&#010;+SET(TARGET_OS Linux)&#010;+SET(TARGET_ARCH ARMV7L)&#010;+SET(TARGET_COMPILER GCC)&#010;+&#010;+SET(CMAKE_C_COMPILER /opt/pb-a8/cross/armv7a/bin/arm-angstrom-linux-gnueabi-gcc)&#010;+SET(CMAKE_CXX_COMPILER /opt/pb-a8/cross/armv7a/bin/arm-angstrom-linux-gnueabi-g++)&#010;+SET(CMAKE_LINKER /opt/pb-a8/cross/armv7a/bin/arm-angstrom-linux-gnueabi-ld)&#010;+&#010;+SET(CMAKE_C_FLAGS_DEBUG "-ggdb -march=armv7-a -mfpu=neon -mfloat-abi=softfp -D_DEBUG")&#010;+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")&#010;+&#010;+SET(CMAKE_C_FLAGS_RELEASE "-O3 -march=armv7-a -mfpu=neon -mfloat-abi=softfp -DNDEBUG")&#010;+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")&#010;+&#010;+SET(CMAKE_FIND_ROOT_PATH /opt/pb-a8/staging/armv7a-angstrom-linux-gnueabi)&#010;+&#010;+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)&#010;+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)&#010;+&#010;+add_definitions("-DOS_LINUX")&#010;+add_definitions("-DARCH_ARMV7L")&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_32.toolchain&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_32.toolchain?rev=1400861&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_32.toolchain (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_32.toolchain Mon Oct 22&#010;12:25:06 2012&#010;@@ -0,0 +1,32 @@&#010;+#&#010;+# Licensed to the Apache Software Foundation (ASF) under one or more &#010;+# contributor license agreements. See the NOTICE file distributed with  &#010;+# this work for additional information regarding copyright ownership. &#010;+# The ASF licenses this file to you under the Apache License, Version  &#010;+# 2.0 (the "License"); you may not use this file except in compliance  &#010;+# with the License. You may obtain a copy of the License at &#010;+# &#010;+# http://www.apache.org/licenses/LICENSE-2.0 &#010;+# &#010;+# Unless required by applicable law or agreed to in writing, software &#010;+# distributed under the License is distributed on an "AS IS" BASIS, &#010;+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+# See the License for the specific language governing permissions and &#010;+# limitations under the License. &#010;+#&#010;+&#010;+SET(CMAKE_SYSTEM_NAME Linux)&#010;+SET(CMAKE_SYSTEM_VERSION 1)&#010;+&#010;+SET(TARGET_OS Linux)&#010;+SET(TARGET_ARCH X86_32)&#010;+SET(TARGET_COMPILER GCC)&#010;+&#010;+SET(CMAKE_C_FLAGS_DEBUG "-m32 -ggdb -Wall -D_DEBUG")&#010;+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")&#010;+&#010;+SET(CMAKE_C_FLAGS_RELEASE "-m32 -Wall -O3 -DNDEBUG")&#010;+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")&#010;+&#010;+add_definitions("-DOS_LINUX")&#010;+add_definitions("-DARCH_X86_32")&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_64.toolchain&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_64.toolchain?rev=1400861&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_64.toolchain (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_64.toolchain Mon Oct 22&#010;12:25:06 2012&#010;@@ -0,0 +1,32 @@&#010;+#&#010;+# Licensed to the Apache Software Foundation (ASF) under one or more &#010;+# contributor license agreements. See the NOTICE file distributed with  &#010;+# this work for additional information regarding copyright ownership. &#010;+# The ASF licenses this file to you under the Apache License, Version  &#010;+# 2.0 (the "License"); you may not use this file except in compliance  &#010;+# with the License. You may obtain a copy of the License at &#010;+# &#010;+# http://www.apache.org/licenses/LICENSE-2.0 &#010;+# &#010;+# Unless required by applicable law or agreed to in writing, software &#010;+# distributed under the License is distributed on an "AS IS" BASIS, &#010;+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+# See the License for the specific language governing permissions and &#010;+# limitations under the License. &#010;+#&#010;+&#010;+SET(CMAKE_SYSTEM_NAME Linux)&#010;+SET(CMAKE_SYSTEM_VERSION 1)&#010;+&#010;+SET(TARGET_OS Linux)&#010;+SET(TARGET_ARCH X86_64)&#010;+SET(TARGET_COMPILER GCC)&#010;+&#010;+SET(CMAKE_C_FLAGS_DEBUG "-m64 -ggdb -Wall -D_DEBUG")&#010;+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")&#010;+&#010;+SET(CMAKE_C_FLAGS_RELEASE "-m64 -Wall -O3 -DNDEBUG")&#010;+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")&#010;+&#010;+add_definitions("-DOS_LINUX")&#010;+add_definitions("-DARCH_X86_64")&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/toolchains/QNX_X86_32.toolchain (from r1399123,&#010;incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/toolchains/QNX_X86_32.toolchain?p2=incubator/etch/trunk/binding-cpp/runtime/toolchains/QNX_X86_32.toolchain&amp;p1=incubator/etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86.toolchain&amp;r1=1399123&amp;r2=1400861&amp;rev=1400861&amp;view=diff&#010;==============================================================================&#010;    (empty)&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain?rev=1400861&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain Mon Oct 22&#010;12:25:06 2012&#010;@@ -0,0 +1,36 @@&#010;+#&#010;+# Licensed to the Apache Software Foundation (ASF) under one or more &#010;+# contributor license agreements. See the NOTICE file distributed with  &#010;+# this work for additional information regarding copyright ownership. &#010;+# The ASF licenses this file to you under the Apache License, Version  &#010;+# 2.0 (the "License"); you may not use this file except in compliance  &#010;+# with the License. You may obtain a copy of the License at &#010;+# &#010;+# http://www.apache.org/licenses/LICENSE-2.0 &#010;+# &#010;+# Unless required by applicable law or agreed to in writing, software &#010;+# distributed under the License is distributed on an "AS IS" BASIS, &#010;+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+# See the License for the specific language governing permissions and &#010;+# limitations under the License. &#010;+#&#010;+&#010;+SET(CMAKE_SYSTEM_NAME Windows)&#010;+SET(CMAKE_SYSTEM_VERSION 1)&#010;+&#010;+SET(TARGET_OS Windows)&#010;+SET(TARGET_ARCH X86_32)&#010;+SET(TARGET_COMPILER MSVC)&#010;+&#010;+SET(CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG /MP8 /GR-")&#010;+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W3")&#010;+&#010;+SET(CMAKE_C_FLAGS_DEBUG "/MDd /Zi /Od /RTC1 /D_DEBUG /MP8" )&#010;+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W3")&#010;+&#010;+&#010;+add_definitions("-DOS_WINDOWS")&#010;+add_definitions("-DARCH_X86_32")&#010;+&#010;+# enable the BUILD_CHECK_MEMORY flag if you would like to check for memory leaks with visual&#010;leak detector&#010;+#add_definitions("-DBUILD_CHECK_MEMORY")&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_64.toolchain&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_64.toolchain?rev=1400861&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_64.toolchain (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_64.toolchain Mon Oct 22&#010;12:25:06 2012&#010;@@ -0,0 +1,36 @@&#010;+#&#010;+# Licensed to the Apache Software Foundation (ASF) under one or more &#010;+# contributor license agreements. See the NOTICE file distributed with  &#010;+# this work for additional information regarding copyright ownership. &#010;+# The ASF licenses this file to you under the Apache License, Version  &#010;+# 2.0 (the "License"); you may not use this file except in compliance  &#010;+# with the License. You may obtain a copy of the License at &#010;+# &#010;+# http://www.apache.org/licenses/LICENSE-2.0 &#010;+# &#010;+# Unless required by applicable law or agreed to in writing, software &#010;+# distributed under the License is distributed on an "AS IS" BASIS, &#010;+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+# See the License for the specific language governing permissions and &#010;+# limitations under the License. &#010;+#&#010;+&#010;+SET(CMAKE_SYSTEM_NAME Windows)&#010;+SET(CMAKE_SYSTEM_VERSION 1)&#010;+&#010;+SET(TARGET_OS Windows)&#010;+SET(TARGET_ARCH X86_64)&#010;+SET(TARGET_COMPILER MSVC)&#010;+&#010;+SET(CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG /MP8 /GR-")&#010;+SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /W3")&#010;+&#010;+SET(CMAKE_C_FLAGS_DEBUG "/MDd /Zi /Od /RTC1 /D_DEBUG /MP8" )&#010;+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /W3")&#010;+&#010;+&#010;+add_definitions("-DOS_WINDOWS")&#010;+add_definitions("-DARCH_X86_64")&#010;+&#010;+# enable the BUILD_CHECK_MEMORY flag if you would like to check for memory leaks with visual&#010;leak detector&#010;+#add_definitions("-DBUILD_CHECK_MEMORY")&#010;&#010;Modified: incubator/etch/trunk/build-support/dependencies.xml&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/build-support/dependencies.xml?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/build-support/dependencies.xml (original)&#010;+++ incubator/etch/trunk/build-support/dependencies.xml Mon Oct 22 12:25:06 2012&#010;@@ -126,12 +126,33 @@&#010;     &lt;/target&gt;&#010; &#010;     &lt;target name="check-cmake-check"&gt;&#010;-    &lt;echo message="check: ${build.ant-cmake.lib}" /&gt;&#010;+        &lt;echo message="check: ${build.ant-cmake.lib}" /&gt;&#010;         &lt;condition property="cmake-missing-components" value="true"&gt;&#010;             &lt;not&gt;&lt;available file="${build.ant-cmake.lib}/cmakeant.jar" /&gt;&lt;/not&gt;&#010;         &lt;/condition&gt;&#010;     &lt;/target&gt;&#010;+    &#010;+    &lt;target name="check-ant-contrib" depends="check-ant-contrib-check" if="ant-contrib-missing-components"&gt;&#010;+         &lt;echo&gt;&#010;+              *&#010;+              *&#010;+              *&#010;+              ************************************************************************&#010;+              WARNING: ant-contrib.lib is missing, some ant scripts will not work&#010;+              ************************************************************************&#010;+              *&#010;+              *&#010;+              *&#010;+         &lt;/echo&gt;&#010;+    &lt;/target&gt;&#010;+&#010;+    &lt;target name="check-ant-contrib-check"&gt;&#010;+        &lt;echo message="check: ${build.ant-contrib.lib}" /&gt;&#010;+        &lt;condition property="ant-contrib-missing-components" value="true"&gt;&#010;+            &lt;not&gt;&lt;available file="${build.ant-contrib.lib}/ant-contrib-1.0b3.jar"&#010;/&gt;&lt;/not&gt;&#010;+        &lt;/condition&gt;&#010;+    &lt;/target&gt;&#010; &#010;-    &lt;target name="check-all" depends="check-javacc,check-junit,check-velocity,check-dotnet,check-cmake"&#010;/&gt;&#010;+    &lt;target name="check-all" depends="check-javacc,check-junit,check-velocity,check-dotnet,check-cmake,check-ant-contrib"&#010;/&gt;&#010; &#010; &lt;/project&gt;&#010;&#010;Modified: incubator/etch/trunk/build-support/etch.common.xml&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/build-support/etch.common.xml?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/build-support/etch.common.xml (original)&#010;+++ incubator/etch/trunk/build-support/etch.common.xml Mon Oct 22 12:25:06 2012&#010;@@ -238,6 +238,7 @@&#010;     &lt;property   name="Etch.dependency.velocity-dep.jar" value="${build.velocity.lib}/velocity-1.7-dep.jar"&#010;/&gt;&#010;     &lt;property   name="Etch.dependency.ant-dotnet-1.1.jar" value="${build.ant-dotnet.lib}/ant-dotnet-1.1.jar"&#010;/&gt;&#010;     &lt;property   name="Etch.dependency.ant-cmake.jar" value="${build.ant-cmake.lib}/cmakeant.jar"&#010;/&gt;&#010;+    &lt;property   name="Etch.dependency.ant-contrib.jar" value="${build.ant-contrib.lib}/ant-contrib-1.0b3.jar"&#010;/&gt;&#010; &#010;     &lt;!-- Csharp Support --&gt;&#010;     &lt;condition property="USE.dotnet"&gt;&#010;@@ -312,6 +313,9 @@&#010;     &lt;!-- CMake ANT support --&gt;&#010;     &lt;taskdef onerror="report" name="cmake" classname="org.iainhull.ant.CmakeBuilder" classpath="${Etch.dependency.ant-cmake.jar}"/&gt;&#010; &#010;+    &lt;!-- Ant contrib support --&gt;&#010;+    &lt;taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${Etch.dependency.ant-contrib.jar}"/&gt;&#010;+&#010;     &lt;!-- dependencies --&gt;&#010;     &lt;!-- TODO: remove clover reference if clover-disabled --&gt;&#010;     &lt;path id="Etch.dependencies.jar.paths"&gt;&#010;&#010;Modified: incubator/etch/trunk/build.dependencies&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/build.dependencies?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/build.dependencies (original)&#010;+++ incubator/etch/trunk/build.dependencies Mon Oct 22 12:25:06 2012&#010;@@ -39,6 +39,9 @@ ant-dotnet.lib=${env.ETCH_EXTERNAL_DEPEN&#010; ## CMake ANT support&#010; ant-cmake.lib=${env.ETCH_EXTERNAL_DEPENDS}/apache-ant-cmake/1.0&#010; &#010;+## Ant-contrib support&#010;+ant-contrib.lib=${env.ETCH_EXTERNAL_DEPENDS}/ant-contrib/1.0b3&#010;+&#010; ##&#010; ## Settings&#010; ##&#010;&#010;Modified: incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java?rev=1400861&amp;r1=1400860&amp;r2=1400861&amp;view=diff&#010;==============================================================================&#010;    (empty)&#010;&#010;Propchange: incubator/etch/trunk/compiler/src/main/java/org/apache/etch/compiler/Version.java&#010;------------------------------------------------------------------------------&#010;    svn:executable = *&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399123 - /incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065136.0091A2388A91@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065136-0091A2388A91@eris-apache-org%3e</id>
<updated>2012-10-17T06:51:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:51:35 2012&#010;New Revision: 1399123&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399123&amp;view=rev&#010;Log:&#010;ETCH-244 Fixing QueuedPool todo&#010;&#010;Change-Id: I43f88546ad2e6212e6fa6f99baa822c85107b46d&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp?rev=1399123&amp;r1=1399122&amp;r2=1399123&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp Wed Oct 17&#010;06:51:35 2012&#010;@@ -88,9 +88,10 @@ status_t EtchQueuedPool::add(capu::Smart&#010;   if(!mIsOpen) {&#010;     return ETCH_EINVAL;&#010;   }&#010;+  if(mPool-&gt;getSize() + 1 &gt; mSizeMax)&#010;+    return ETCH_ENOT_SUPPORTED;&#010; &#010;   EtchQueuedPoolRunnable* pr = new EtchQueuedPoolRunnable(this, runnable);&#010;-  //TODO: check max Size before adding a new Runnable&#010;   capu::status_t status = mPool-&gt;add(pr);&#010;   if(status != capu::CAPU_OK) {&#010;     return ETCH_ERROR;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399122 - in /incubator/etch/trunk/binding-cpp/compiler/src/main: java/org/apache/etch/bindings/cpp/compiler/ resources/org/apache/etch/bindings/cpp/compiler/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065131.313B423889B8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065131-313B423889B8@eris-apache-org%3e</id>
<updated>2012-10-17T06:51:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:51:30 2012&#010;New Revision: 1399122&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399122&amp;view=rev&#010;Log:&#010;ETCH-243 Small fixes in code generation&#010;&#010;Change-Id: Ie04cb8b984f9fe3cdc6979da06c9346615f868c2&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java?rev=1399122&amp;r1=1399121&amp;r2=1399122&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;Wed Oct 17 06:51:30 2012&#010;@@ -1184,25 +1184,26 @@ public class Compiler extends Backend {&#010; &#010;   private String getNativeArrayTypeName(TypeRef type) {&#010;     Token t = type.type();&#010;+    String nativeArrayName = "EtchNativeArray";&#010;     switch (t.kind) {&#010;     case EtchGrammarConstants.BOOLEAN:&#010;-      return "Bool";&#010;+      return nativeArrayName + "Bool";&#010;     case EtchGrammarConstants.BYTE:&#010;-      return "Byte";&#010;+      return nativeArrayName + "Byte";&#010;     case EtchGrammarConstants.SHORT:&#010;-      return "Short";&#010;+      return nativeArrayName + "Short";&#010;     case EtchGrammarConstants.INT:&#010;-      return "Int";&#010;+      return nativeArrayName + "Int";&#010;     case EtchGrammarConstants.LONG:&#010;-      return "Long";&#010;+      return nativeArrayName + "Long";&#010;     case EtchGrammarConstants.FLOAT:&#010;-      return "Float";&#010;+      return nativeArrayName + "Float";&#010;     case EtchGrammarConstants.DOUBLE:&#010;-      return "Double";&#010;+      return nativeArrayName + "Double";&#010;     case EtchGrammarConstants.STRING:&#010;-      return "String";&#010;+      return nativeArrayName + "String";&#010;     case EtchGrammarConstants.OBJECT:&#010;-      return "Object";&#010;+      return nativeArrayName + "Object";&#010;     default: {&#010;       // we have to use a fully qualified name here.&#010;       // find the actual type...&#010;@@ -1213,12 +1214,12 @@ public class Compiler extends Backend {&#010;             "undefined or ambiguous name at line %d: %s", t.beginLine, t.image));&#010;       if (n.isBuiltin()) {&#010;         Builtin b = (Builtin) n;&#010;-        return b.className().substring(4);&#010;+        return nativeArrayName + b.className().substring(4);&#010;       }&#010;       if (n.isEnumx()) {&#010;-        return n.efqname(this);&#010;+        return nativeArrayName + n.efqname(this);&#010;       } else {&#010;-        return type.intf().name() + "::" + n.efqname(this);&#010;+        return type.intf().name() + "::" + nativeArrayName + n.efqname(this);&#010;       }&#010;     }&#010;     }&#010;@@ -1257,9 +1258,9 @@ public class Compiler extends Backend {&#010;   private String getArrayTypeName(TypeRef type, boolean pointer) {&#010;     // TODO Auto-generated method stub&#010;     if(pointer)&#010;-      return "EtchNativeArray" + this.getNativeArrayTypeName( type ) + "Ptr";&#010;+      return this.getNativeArrayTypeName( type ) + "Ptr";&#010;     if (type.type().kind == EtchGrammarConstants.BYTE) {&#010;-      return "EtchNativeArray&lt;" + this.getNativeTypeName( type, true ) + "&gt; ";&#010;+      return "EtchNativeArray&lt;" + this.getNativeTypeName( type, false ) + "&gt; ";&#010;     } else {&#010;       return "EtchNativeArray&lt;" + this.getNativeTypeName( type, true ) + "Ptr&gt; ";&#010;     }&#010;@@ -1273,7 +1274,7 @@ public class Compiler extends Backend {&#010;     case EtchGrammarConstants.BOOLEAN:&#010;       return (etch_type ? "EtchBool" : "capu::bool_t");&#010;     case EtchGrammarConstants.BYTE:&#010;-      return (etch_type ? "capu::int8_t" : "capu::int8_t");&#010;+      return (etch_type ? "EtchByte" : "capu::int8_t");&#010;     case EtchGrammarConstants.SHORT:&#010;       return (etch_type ? "EtchShort" : "capu::int16_t");&#010;     case EtchGrammarConstants.INT:&#010;@@ -1299,6 +1300,7 @@ public class Compiler extends Backend {&#010;       if (n.isBuiltin()) {&#010;         Builtin b = (Builtin) n;&#010;         if (n.efqname(this).equals("EtchDate")) return b.className();&#010;+        if (n.efqname(this).equals("EtchList")) return b.className()+"&lt;EtchObjectPtr&gt;&#010;";&#010;         if (n.efqname(this).equals("EtchHashTable")) return b.className()+"&lt;EtchObjectPtr,&#010;EtchObjectPtr&gt; ";&#010;         if (n.efqname(this).equals("EtchHashSet")) return b.className()+"&lt;EtchObjectPtr&gt;&#010;";&#010;         throw new IllegalArgumentException(String.format(&#010;@@ -1507,7 +1509,9 @@ public class Compiler extends Backend {&#010;         if (n.efqname(this).equals("EtchHashSet")) {&#010;           cn += "&lt;EtchObjectPtr&gt;";&#010;         }&#010;-&#010;+        if (n.efqname(this).equals("EtchList")) {&#010;+          cn += "&lt;EtchObjectPtr&gt;";&#010;+        }&#010; &#010;         /*&#010;          * int i = cn.indexOf( '&lt;' ); if (i &gt;= 0) cn = cn.substring( 0, i );&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm?rev=1399122&amp;r1=1399121&amp;r2=1399122&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm&#010;Wed Oct 17 06:51:30 2012&#010;@@ -83,7 +83,7 @@ $class::$n.name()::$n.name()()&#010;  */&#010; $class::$n.name()::$n.name()(#set($sep = "")#foreach($i in $n.getAllParameters())$sep$helper.getEtchTypeName($i.type(),&#010;true) $i.name() #set( $sep = ", " )#end)&#010; #if($n.hasExtends())&#010;-  : $n.name()(#set($sep = "")#foreach($i in $n.getExtends().getAllParameters())$sep$i.name()#set(&#010;$sep = ", " ))#end&#010;+  : $n.getExtends().name()(#set($sep = "")#foreach($i in $n.getExtends().getAllParameters())$sep$i.name()#set(&#010;$sep = ", " )#end)&#010; #else&#010; #if($n.isExcept())&#010;   : EtchException("${n.name()}", ETCH_ERROR, EXCPTYPE_USERDEFINED)&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm?rev=1399122&amp;r1=1399121&amp;r2=1399122&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;Wed Oct 17 06:51:30 2012&#010;@@ -80,11 +80,12 @@ public:&#010;     $helper.getEtchTypeName($param.type(), true) val$count = capu::smartpointer_cast&lt;$helper.getEtchTypeName($param.type(),&#010;false)&gt;(obj$count);&#010; &#010; #end&#010;+## TODO: ADD AUTHENTICATION CODE HERE! ############################&#010;     $intfname::$mthd.name()AsyncResultPtr ar;&#010; #set($sep = "")&#010; #set($count = 0)&#010;     CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: Calling implementation&#010;of \"$mthd.name()\" function.");&#010;-    ar = _obj-&gt;$mthd.name()(#foreach($param in $mthd.iterator())#if($mthd.hasAuth())${sep}$param.name()#else#set($count&#010;= $count + 1)${sep}val$count#end#set($sep = ", ")#end);&#010;+    ar = _obj-&gt;$mthd.name()(#foreach($param in $mthd.iterator())#set($count = $count +&#010;1)${sep}val$count#set($sep = ", ")#end);&#010; &#010;     // create result message&#010; #if($mthd.hasReturn())&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1399122&amp;r1=1399121&amp;r2=1399122&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;Wed Oct 17 06:51:30 2012&#010;@@ -106,9 +106,16 @@ public:&#010; #elseif ($n.isEnumx())&#010; #set( $tname = $n.efqname( $helper ) )&#010;     &#010;-class ImportExportHelper$n.vname( $helper )&#010;-  : public EtchImportExportHelper {&#010;-  public:&#010;+class ImportExportHelper$n.vname( $helper ) &#010;+: public EtchImportExportHelper {  &#010;+public:&#010;+  ImportExportHelper$n.vname($helper)(EtchRuntime* runtime) &#010;+  : EtchImportExportHelper(runtime) {&#010;+  }&#010;+&#010;+  virtual ~ImportExportHelper$n.vname($helper)() {&#010;+  }&#010;+&#010;   status_t exportValue(EtchValueFactory* vf, EtchObjectPtr value, EtchStructValue *&amp;result)&#010;   {&#010;      EtchStructValue* _struct = new EtchStructValue( $vf::${n.vname( $helper )}, vf );&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399121 - in /incubator/etch/trunk/binding-cpp/runtime/src/main/common: EtchByte.cpp EtchShort.cpp</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065123.964002388A6E@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065123-964002388A6E@eris-apache-org%3e</id>
<updated>2012-10-17T06:51:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:51:22 2012&#010;New Revision: 1399121&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399121&amp;view=rev&#010;Log:&#010;ETCH-243 Added same hash function for numeric datatypes&#010;&#010;Change-Id: If543cc7718e2548d44bac3e674bd0bb58fae65a1&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp?rev=1399121&amp;r1=1399120&amp;r2=1399121&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp Wed Oct 17 06:51:22&#010;2012&#010;@@ -74,9 +74,7 @@ EtchByte&amp; EtchByte::operator=(EtchByte c&#010; }&#010; &#010; capu::uint32_t EtchByte::getHashCode() const{&#010;-  //For better distribution&#010;-  capu::uint32_t result = mValue + 128;&#010;-  return result;&#010;+  return static_cast&lt;capu::uint32_t&gt;(mValue);&#010; }&#010; &#010; capu::int64_t EtchByte::getLongValue() const {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp?rev=1399121&amp;r1=1399120&amp;r2=1399121&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp Wed Oct 17 06:51:22&#010;2012&#010;@@ -47,9 +47,7 @@ capu::int16_t EtchShort::get() {&#010; }&#010; &#010; capu::uint32_t EtchShort::getHashCode() const {&#010;-  //for better distribution&#010;-  capu::uint32_t result = mValue + 32768;&#010;-  return result;&#010;+  return static_cast&lt;capu::uint32_t&gt;(mValue);&#010; }&#010; &#010; capu::bool_t EtchShort::equals(const EtchObject * other) const {&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399120 - /incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065118.1BF862388A64@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065118-1BF862388A64@eris-apache-org%3e</id>
<updated>2012-10-17T06:51:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:51:17 2012&#010;New Revision: 1399120&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399120&amp;view=rev&#010;Log:&#010;ETCH-246 Fixed multidimensional array serialization&#010;&#010;Serialization of empty values fixed&#010;&#010;Change-Id: I3c86300193e3db9bc5aee7be3033a3812d0870b9&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp?rev=1399120&amp;r1=1399119&amp;r2=1399120&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp Wed Oct 17&#010;06:51:17 2012&#010;@@ -102,9 +102,6 @@ status_t EtchArrayValue::get(capu::uint3&#010; }&#010; &#010; status_t EtchArrayValue::add(capu::SmartPointer&lt;EtchObject&gt; value) {&#010;-  if (value.get() == NULL) {&#010;-    return ETCH_EINVAL;&#010;-  }&#010; &#010;   //check if we have to resize the array&#010;   capu::int32_t n = mSize;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399119 - in /incubator/etch/trunk/binding-cpp/runtime: include/common/EtchByte.h src/main/common/EtchByte.cpp</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065112.BC87A2388A3F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065112-BC87A2388A3F@eris-apache-org%3e</id>
<updated>2012-10-17T06:51:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:51:12 2012&#010;New Revision: 1399119&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399119&amp;view=rev&#010;Log:&#010;Etch-243 Added EtchByte operator=&#010;&#010;Useful in Stubhelpers&#010;&#010;Change-Id: I681f8fbceb6dd3f0d73cf4b60c0143c8340ac25e&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h?rev=1399119&amp;r1=1399118&amp;r2=1399119&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h Wed Oct 17 06:51:12&#010;2012&#010;@@ -70,6 +70,16 @@ public:&#010;   capu::uint32_t getHashCode() const;&#010; &#010;   /**&#010;+   * Operator= for numeric Values&#010;+   */&#010;+  capu::int8_t&amp; operator=(capu::int8_t const&amp; other);&#010;+&#010;+  /**&#010;+   * Operator= for EtchByte Objects&#010;+   */&#010;+  EtchByte&amp; operator=(EtchByte const&amp; other);&#010;+&#010;+  /**&#010;    * @see EtchNumber&#010;    */&#010;   capu::int64_t getLongValue() const;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp?rev=1399119&amp;r1=1399118&amp;r2=1399119&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp Wed Oct 17 06:51:12&#010;2012&#010;@@ -55,6 +55,24 @@ capu::bool_t EtchByte::equals(const Etch&#010;   return (a-&gt;mValue == this-&gt;mValue);&#010; }&#010; &#010;+capu::int8_t&amp; EtchByte::operator=(capu::int8_t const&amp; other)&#010;+{&#010;+  if(mValue != other)&#010;+  {&#010;+    mValue = other;&#010;+  }&#010;+  return mValue;&#010;+}&#010;+&#010;+EtchByte&amp; EtchByte::operator=(EtchByte const&amp; other)&#010;+{&#010;+  if(mValue != other.mValue)&#010;+  {&#010;+    mValue = other.mValue;&#010;+  }&#010;+  return *this;&#010;+}&#010;+&#010; capu::uint32_t EtchByte::getHashCode() const{&#010;   //For better distribution&#010;   capu::uint32_t result = mValue + 128;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399118 - in /incubator/etch/trunk/binding-cpp/runtime/include: common/EtchComparator.h common/EtchObjectHash.h serialization/EtchClass2TypeMap.h</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065107.032DC2388A29@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065107-032DC2388A29@eris-apache-org%3e</id>
<updated>2012-10-17T06:51:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:51:06 2012&#010;New Revision: 1399118&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399118&amp;view=rev&#010;Log:&#010;ETCH-243 Refactored EtchObjectType hashing&#010;&#010;Separate of hash and comparator functionality from EtchObject&#010;&#010;Change-Id: I499a46ad0d77899eccd54f41471e4e17b71eac42&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h?rev=1399118&amp;r1=1399117&amp;r2=1399118&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h Wed Oct 17 06:51:06&#010;2012&#010;@@ -29,10 +29,6 @@ public:&#010;   inline capu::bool_t operator() (const EtchObject &amp;first, const EtchObject &amp;second)&#010;const {&#010;     return first.equals(&amp;second);&#010;   }&#010;-&#010;-  inline capu::bool_t operator() (const EtchObjectType &amp;first, const EtchObjectType &amp;second)&#010;const {&#010;-    return first.equals(&amp;second);&#010;-  }&#010; };&#010; &#010; template &lt;class T&gt;&#010;@@ -42,10 +38,6 @@ public:&#010;   inline capu::bool_t operator() (const EtchObject* first, const EtchObject* second) const&#010;{&#010;     return first-&gt;equals(second);&#010;   }&#010;-&#010;-  inline capu::bool_t operator() (const EtchObjectType* first, const EtchObjectType* second)&#010;const {&#010;-    return first-&gt;equals(second);&#010;-  }&#010; };&#010; &#010; template &lt;class T&gt;&#010;@@ -55,10 +47,6 @@ public:&#010;   inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObject&gt;&amp; first,&#010;const capu::SmartPointer&lt;EtchObject&gt;&amp; second) const {&#010;     return first-&gt;equals(second.get());&#010;   }&#010;-&#010;-  inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObjectType&gt;&amp; first,&#010;const capu::SmartPointer&lt;EtchObjectType&gt;&amp; second) const {&#010;-    return first-&gt;equals(second.get());&#010;-  }&#010; };&#010; &#010; #endif&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h?rev=1399118&amp;r1=1399117&amp;r2=1399118&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h Wed Oct 17 06:51:06&#010;2012&#010;@@ -35,18 +35,6 @@ public:&#010;   static capu::uint32_t Digest(const capu::SmartPointer&lt;EtchObject&gt;&amp; key) {&#010;     return key-&gt;getHashCode();&#010;   }&#010;-&#010;-  static capu::uint32_t Digest(const EtchObjectType &amp;key) {&#010;-&#009;return key.getHashCode();&#010;-  }&#010;-&#010;-  static capu::uint32_t Digest(const EtchObjectType* key) {&#010;-&#009;return key-&gt;getHashCode();&#010;-  }&#010;-&#010;-  static capu::uint32_t Digest(const capu::SmartPointer&lt;EtchObjectType&gt;&amp; key) {&#010;-&#009;return key-&gt;getHashCode();&#010;-  }&#010; };&#010; #endif&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h?rev=1399118&amp;r1=1399117&amp;r2=1399118&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h Wed&#010;Oct 17 06:51:06 2012&#010;@@ -64,8 +64,50 @@ public:&#010;    */&#010;   void lock();&#010; &#010;+  /**&#010;+   * Hashing Functions for the EtchClass2TypeMap&#010;+   */&#010;+  class Hash {&#010;+  public:&#010;+  static capu::uint32_t Digest(const EtchObjectType &amp;key) {&#010;+    return key.getHashCode();&#010;+    }&#010;+&#010;+    static capu::uint32_t Digest(const EtchObjectType* key) {&#010;+    return key-&gt;getHashCode();&#010;+    }&#010;+&#010;+    static capu::uint32_t Digest(const capu::SmartPointer&lt;EtchObjectType&gt;&amp; key)&#010;{&#010;+    return key-&gt;getHashCode();&#010;+    }&#010;+  };&#010;+&#010;+  /**&#010;+   * Comperator Functions for the EtchClass2TypeMap&#010;+   */&#010;+  template &lt;class T&gt;&#010;+  class Comparator {&#010;+  public:&#010;+    inline capu::bool_t operator() (const EtchObjectType &amp;first, const EtchObjectType&#010;&amp;second) const {&#010;+    return first.equals(&amp;second);&#010;+    }&#010;+  };&#010;+  template &lt;class T&gt;&#010;+  class Comparator &lt;T*&gt; {&#010;+  public:&#010;+    inline capu::bool_t operator() (const EtchObjectType* first, const EtchObjectType* second)&#010;const {&#010;+      return first-&gt;equals(second);&#010;+    }&#010;+  };&#010;+  template &lt;class T&gt;&#010;+  class Comparator &lt;capu::SmartPointer&lt;T&gt; &gt; {&#010;+  public:&#010;+    inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObjectType&gt;&amp; first,&#010;const capu::SmartPointer&lt;EtchObjectType&gt;&amp; second) const {&#010;+      return first-&gt;equals(second.get());&#010;+    }&#010;+  };&#010; private:&#010;-  EtchHashTable&lt;const EtchObjectType*, EtchType* &gt; mC2T;&#010;+  EtchHashTable&lt;const EtchObjectType*, EtchType*, EtchClass2TypeMap::Hash, EtchClass2TypeMap::Comparator&lt;const&#010;EtchObjectType*&gt; &gt; mC2T;&#010; &#010;   capu::bool_t mLocked;&#010; &#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399117 - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ include/serialization/ include/transport/ include/util/ src/main/common/ src/main/serialization/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065101.19FBB23889B8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065101-19FBB23889B8@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:50:55 2012&#010;New Revision: 1399117&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399117&amp;view=rev&#010;Log:&#010;ETCH-243 Cleaned Up include dependencies&#010;&#010;Change-Id: I6630eac7565d4c7d1eff47eeaa0cd66a59a29c2e&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchString.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedData.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedDataInput.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionData.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionListener.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionMessage.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionPacket.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportData.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/util/EtchURL.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h Wed Oct 17 06:50:55 2012&#010;@@ -20,8 +20,6 @@&#010; #define __ETCHBOOL_H__&#010; &#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchBool :&#010; public EtchObject {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h Wed Oct 17 06:50:55 2012&#010;@@ -18,8 +18,8 @@&#010; &#010; #ifndef ETCHDATE_H&#010; #define ETCHDATE_H&#010;+&#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010; &#010; class EtchDate : public EtchObject {&#010; public:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h Wed Oct 17 06:50:55 2012&#010;@@ -20,8 +20,6 @@&#010; #define __ETCHDOUBLE_H__&#010; &#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchDouble :&#010; public EtchObject {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h Wed Oct 17 06:50:55 2012&#010;@@ -19,7 +19,6 @@&#010; #ifndef __ETCHEXCEPTION_H__&#010; #define __ETCHEXCEPTION_H__&#010; &#010;-#include "common/EtchObject.h"&#010; #include "common/EtchString.h"&#010; &#010; class EtchException : public EtchObject {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h Wed Oct 17 06:50:55 2012&#010;@@ -20,8 +20,6 @@&#010; #define __ETCHFLOAT_H__&#010; &#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchFloat :&#010; public EtchObject {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h Wed Oct 17 06:50:55 2012&#010;@@ -18,15 +18,11 @@&#010; &#010; #ifndef __ETCHSET_H__&#010; #define __ETCHSET_H__&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010;+&#010; #include "common/EtchObjectHash.h"&#010; #include "common/EtchComparator.h"&#010; #include "capu/container/HashSet.h"&#010; &#010;-&#010;-&#010; template &lt;class T, class H = EtchObjectHash, class C = EtchComparator&lt;T&gt; &gt;&#010; class EtchHashSet : public EtchObject {&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h Wed Oct 17 06:50:55 2012&#010;@@ -19,9 +19,6 @@&#010; #ifndef __ETCHHASHTABLE_H__&#010; #define __ETCHHASHTABLE_H__&#010; &#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; #include "common/EtchObjectHash.h"&#010; #include "common/EtchComparator.h"&#010; #include "capu/container/HashTable.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h Wed Oct 17 06:50:55 2012&#010;@@ -20,9 +20,6 @@&#010; #define __ETCHLIST_H__&#010; &#010; #include "capu/container/List.h"&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; #include "common/EtchComparator.h"&#010; &#010; template &lt;class T, class C = EtchComparator&lt;T&gt; &gt;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h Wed Oct 17 06:50:55 2012&#010;@@ -20,8 +20,6 @@&#010; #define __ETCHLONG_H__&#010; &#010; #include "common/EtchNumber.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchLong :&#010; public EtchNumber {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h Wed Oct 17 06:50:55 2012&#010;@@ -20,9 +20,6 @@&#010; #define __ETCHNATIVEARRAY_H__&#010; &#010; #include "capu/util/SmartPointer.h"&#010;-#include "common/EtchError.h"&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010; #include "common/EtchTypes.h"&#010; &#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h Wed Oct 17 06:50:55 2012&#010;@@ -19,11 +19,10 @@&#010; #ifndef __ETCHOBJECT_H__&#010; #define __ETCHOBJECT_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "capu/container/List.h"&#010;-#include "common/EtchError.h"&#010; &#010;-class EtchObjectType;&#010;+#include "common/EtchError.h"&#010;+#include "common/EtchObjectType.h"&#010; &#010; class EtchObject {&#010; public:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h Wed Oct 17 06:50:55 2012&#010;@@ -22,7 +22,6 @@&#010; #define __ETCHOBJECTTYPE_H__&#010; &#010; #include "EtchConfig.h"&#010;-#include "common/EtchObject.h"&#010; #include "capu/util/SmartPointer.h"&#010; &#010; enum EtchObjectTypeIds {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h Wed Oct 17 06:50:55 2012&#010;@@ -20,7 +20,6 @@&#010; #define __ETCHRUNTIMEEXCEPTION_H__&#010; &#010; #include "common/EtchException.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchRuntimeException : public EtchException {&#010; public:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h Wed Oct 17 06:50:55 2012&#010;@@ -19,10 +19,8 @@&#010; #ifndef __ETCHSERVERSOCKET_H__&#010; #define __ETCHSERVERSOCKET_H__&#010; &#010;-&#010; #include "capu/os/ServerSocket.h"&#010; #include "capu/os/Socket.h"&#010;-#include "capu/util/SmartPointer.h"&#010; #include "common/EtchSocket.h"&#010; &#010; class EtchServerSocket : public EtchObject {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h Wed Oct 17 06:50:55 2012&#010;@@ -20,8 +20,6 @@&#010; #define __ETCHSHORT_H__&#010; &#010; #include "common/EtchNumber.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchShort :&#010; public EtchNumber {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h Wed Oct 17 06:50:55 2012&#010;@@ -18,10 +18,9 @@&#010; &#010; #ifndef __ETCHSOCKET_H__&#010; #define __ETCHSOCKET_H__&#010;+&#010; #include "capu/os/Socket.h"&#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchSocket : public EtchObject {&#010; public:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchString.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchString.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchString.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchString.h Wed Oct 17 06:50:55 2012&#010;@@ -19,9 +19,7 @@&#010; #ifndef __ETCHSTRING_H__&#010; #define __ETCHSTRING_H__&#010; &#010;-#include "common/EtchError.h"&#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010; &#010; /**&#010;  * String type.&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h Wed Oct 17 06:50:55 2012&#010;@@ -23,8 +23,6 @@&#010; #include "common/EtchAuthenticationException.h"&#010; #include "serialization/EtchImportExportHelper.h"&#010; #include "serialization/EtchStructValue.h"&#010;-#include "serialization/EtchType.h"&#010;-#include "serialization/EtchField.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; #include "serialization/EtchValidatorString.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h Wed Oct 17 06:50:55 2012&#010;@@ -19,17 +19,7 @@&#010; #ifndef __ETCHBINARYTAGGEDDATA_H__&#010; #define __ETCHBINARYTAGGEDDATA_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchBool.h"&#010;-#include "common/EtchByte.h"&#010;-#include "common/EtchShort.h"&#010;-#include "common/EtchInt32.h"&#010;-#include "common/EtchLong.h"&#010;-#include "common/EtchFloat.h"&#010;-#include "common/EtchDouble.h"&#010;-#include "common/EtchNativeArray.h"&#010;-#include "serialization/EtchValueFactory.h"&#010;+#include "common/EtchTypes.h"&#010; #include "serialization/EtchTypeCodes.h"&#010; #include "serialization/EtchTaggedData.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h Wed Oct 17 06:50:55 2012&#010;@@ -20,7 +20,6 @@&#010; #ifndef __ETCHCLASS2TYPEMAP_H__&#010; #define __ETCHCLASS2TYPEMAP_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "common/EtchInt32.h"&#010; #include "serialization/EtchType.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h Wed Oct 17 06:50:55 2012&#010;@@ -23,7 +23,6 @@&#010; #include "serialization/EtchImportExportHelper.h"&#010; #include "serialization/EtchStructValue.h"&#010; #include "serialization/EtchField.h"&#010;-#include "serialization/EtchType.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; #include "serialization/EtchValidatorLong.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h Wed Oct 17 06:50:55 2012&#010;@@ -20,8 +20,8 @@&#010; #define __ETCHFIELDMAP_H__&#010; &#010; #include "common/EtchString.h"&#010;-#include "serialization/EtchField.h"&#010; #include "common/EtchHashTable.h"&#010;+#include "serialization/EtchField.h"&#010; &#010; /**&#010;  * Mapping of id and name to EtchField&#010;@@ -84,7 +84,7 @@ public:&#010;    */&#010;   capu::int32_t size();&#010; &#010;-  &#010;+&#010;   /**&#010;    * @return the iterator&#010;    */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h Wed Oct 17 06:50:55 2012&#010;@@ -27,7 +27,6 @@&#010; #include "serialization/EtchType.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; #include "serialization/EtchValidatorObject.h"&#010;-#include "serialization/EtchValidatorObject.h"&#010; &#010; class EtchRuntime;&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h Wed Oct 17 06:50:55 2012&#010;@@ -24,7 +24,6 @@&#010; #include "serialization/EtchImportExportHelper.h"&#010; #include "serialization/EtchStructValue.h"&#010; #include "serialization/EtchField.h"&#010;-#include "serialization/EtchType.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; #include "serialization/EtchValidatorObject.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h Wed Oct 17 06:50:55 2012&#010;@@ -25,7 +25,6 @@&#010; #include "serialization/EtchImportExportHelper.h"&#010; #include "serialization/EtchStructValue.h"&#010; #include "serialization/EtchType.h"&#010;-#include "serialization/EtchField.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; #include "serialization/EtchValidatorString.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h Wed Oct 17 06:50:55 2012&#010;@@ -24,7 +24,6 @@&#010; #include "common/EtchNativeArray.h"&#010; #include "serialization/EtchImportExportHelper.h"&#010; #include "serialization/EtchStructValue.h"&#010;-#include "serialization/EtchField.h"&#010; #include "serialization/EtchType.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; #include "serialization/EtchValidatorObject.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedData.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedData.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedData.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedData.h Wed Oct 17 06:50:55 2012&#010;@@ -20,10 +20,8 @@&#010; #define __ETCHTAGGEDDATA_H__&#010; #include "serialization/EtchValueFactory.h"&#010; #include "serialization/EtchValidatorStructValue.h"&#010;-#include "serialization/EtchType.h"&#010;-#include "common/EtchArrayValue.h"&#010; #include "serialization/EtchTypeCodes.h"&#010;-#include "common/EtchObject.h"&#010;+#include "common/EtchArrayValue.h"&#010; #include "common/EtchNativeArray.h"&#010; &#010; class EtchTaggedData {&#010;@@ -57,7 +55,7 @@ protected:&#010;    * @param result the allocated array value.&#010;    * @return ETCH_OK if array is successfully allocated&#010;    *         ETCH_ENO_MEMORY if mem allocation fails&#010;-   *         &#010;+   *&#010;    */&#010;   status_t allocNativeArray(capu::int8_t typeCode, EtchType* customStructType, capu::int32_t dim, capu::int32_t length, capu::SmartPointer&lt;EtchNativeArrayBase&gt; &amp;result);&#010; &#010;@@ -110,7 +108,7 @@ public:&#010; &#010;   /**&#010;    * @param c           typeid&#010;-   * @param result      out buffet &#010;+   * @param result      out buffet&#010;    */&#010;   virtual status_t getCustomStructType(const EtchObjectType* c, EtchType*&amp; result) = 0;&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedDataInput.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedDataInput.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedDataInput.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTaggedDataInput.h Wed Oct 17 06:50:55 2012&#010;@@ -20,7 +20,6 @@&#010; #define&#009;__ETCHTAGGEDDATAINPUT_H__&#010; #include "transport/EtchFlexBuffer.h"&#010; #include "transport/EtchMessage.h"&#010;-#include "capu/util/SmartPointer.h"&#010; &#010; class EtchTaggedDataInput {&#010; public:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h Wed Oct 17 06:50:55 2012&#010;@@ -19,7 +19,6 @@&#010; #ifndef __ETCHTYPE_H__&#010; #define __ETCHTYPE_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "common/EtchString.h"&#010; #include "common/EtchHashTable.h"&#010; #include "serialization/EtchDirection.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h Wed Oct 17 06:50:55 2012&#010;@@ -19,10 +19,7 @@&#010; #ifndef __ETCHVALIDATOR_H__&#010; #define __ETCHVALIDATOR_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; #include "support/EtchRuntime.h"&#010; &#010; class EtchValidator : public EtchObject {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h Wed Oct 17 06:50:55 2012&#010;@@ -24,7 +24,6 @@&#010; #include "common/EtchShort.h"&#010; #include "common/EtchInt32.h"&#010; #include "common/EtchLong.h"&#010;-#include "serialization/EtchTypeCodes.h"&#010; #include "common/EtchNativeArray.h"&#010; #include "capu/os/NumericLimits.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h Wed Oct 17 06:50:55 2012&#010;@@ -18,12 +18,12 @@&#010; &#010; #ifndef __ETCHVALIDATORDOUBLE_H__&#010; #define __ETCHVALIDATORDOUBLE_H__&#010;+&#010; #include "serialization/EtchTypeValidator.h"&#010; #include "common/EtchFloat.h"&#010; #include "common/EtchDouble.h"&#010;-#include "serialization/EtchTypeCodes.h"&#010;-#include "capu/os/NumericLimits.h"&#010; #include "common/EtchNativeArray.h"&#010;+#include "capu/os/NumericLimits.h"&#010; &#010; class EtchRuntime;&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h Wed Oct 17 06:50:55 2012&#010;@@ -22,7 +22,6 @@&#010; #include "serialization/EtchTypeValidator.h"&#010; #include "common/EtchDouble.h"&#010; #include "common/EtchFloat.h"&#010;-#include "serialization/EtchTypeCodes.h"&#010; #include "common/EtchNativeArray.h"&#010; &#010; class EtchRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h Wed Oct 17 06:50:55 2012&#010;@@ -24,7 +24,6 @@&#010; #include "common/EtchShort.h"&#010; #include "common/EtchInt32.h"&#010; #include "common/EtchLong.h"&#010;-#include "serialization/EtchTypeCodes.h"&#010; #include "common/EtchNativeArray.h"&#010; #include "capu/os/NumericLimits.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h Wed Oct 17 06:50:55 2012&#010;@@ -23,7 +23,6 @@&#010; #include "common/EtchShort.h"&#010; #include "common/EtchInt32.h"&#010; #include "common/EtchLong.h"&#010;-#include "serialization/EtchTypeCodes.h"&#010; #include "common/EtchNativeArray.h"&#010; #include "capu/os/NumericLimits.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h Wed Oct 17 06:50:55 2012&#010;@@ -24,7 +24,6 @@&#010; #include "common/EtchShort.h"&#010; #include "common/EtchInt32.h"&#010; #include "common/EtchLong.h"&#010;-#include "serialization/EtchTypeCodes.h"&#010; #include "common/EtchNativeArray.h"&#010; #include "capu/os/NumericLimits.h"&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h Wed Oct 17 06:50:55 2012&#010;@@ -20,11 +20,9 @@&#010; #ifndef __ETCHVALUEFACTORY_H__&#010; #define __ETCHVALUEFACTORY_H__&#010; &#010;-&#010;-#include "serialization/EtchLevel.h"&#010; #include "common/EtchString.h"&#010;+#include "serialization/EtchLevel.h"&#010; #include "serialization/EtchField.h"&#010;-#include "capu/util/SmartPointer.h"&#010; &#010; class EtchStructValue;&#010; class EtchMessage;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h Wed Oct 17 06:50:55 2012&#010;@@ -21,11 +21,9 @@&#010; &#010; #include "capu/os/Mutex.h"&#010; #include "capu/os/Thread.h"&#010;-#include "capu/util/SmartPointer.h"&#010; #include "common/EtchError.h"&#010; #include "common/EtchException.h"&#010; #include "common/EtchInt32.h"&#010;-#include "common/EtchObject.h"&#010; #include "common/EtchString.h"&#010; #include "support/EtchMonitor.h"&#010; #include "transport/EtchSession.h"&#010;@@ -155,7 +153,7 @@ capu::Mutex EtchConnection&lt;S&gt;::mMutexCon&#010; &#010; template &lt;class S&gt;&#010; EtchConnection&lt;S&gt;::EtchConnection()&#010;-: mStatus(EtchString("status"), EtchSession::DOWN()) {&#010;+: mSession(0), mThread(0), mStatus(EtchString("status"), EtchSession::DOWN()) {&#010; }&#010; &#010; template &lt;class S&gt;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h Wed Oct 17 06:50:55 2012&#010;@@ -20,7 +20,6 @@&#010; #ifndef __ETCHMESSAGE_H__&#010; #define __ETCHMESSAGE_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "serialization/EtchType.h"&#010; #include "serialization/EtchValueFactory.h"&#010; #include "serialization/EtchStructValue.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h Wed Oct 17 06:50:55 2012&#010;@@ -19,12 +19,8 @@&#010; #ifndef __ETCHMESSAGIZER_H__&#010; #define __ETCHMESSAGIZER_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "capu/os/Mutex.h"&#010; #include "common/EtchException.h"&#010;-#include "serialization/EtchTaggedDataInput.h"&#010;-#include "serialization/EtchTaggedDataOutput.h"&#010;-#include "serialization/EtchBinaryTaggedData.h"&#010; #include "serialization/EtchBinaryTaggedDataInput.h"&#010; #include "serialization/EtchBinaryTaggedDataOutput.h"&#010; #include "transport/EtchFormat.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h Wed Oct 17 06:50:55 2012&#010;@@ -19,10 +19,7 @@&#010; #ifndef __ETCHSESSION_H__&#010; #define __ETCHSESSION_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010;-#include "common/EtchObject.h"&#010; #include "common/EtchString.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchSession {&#010; public:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionData.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionData.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionData.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionData.h Wed Oct 17 06:50:55 2012&#010;@@ -19,7 +19,6 @@&#010; #ifndef __ETCHSESSIONDATA_H__&#010; #define __ETCHSESSIONDATA_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "common/EtchError.h"&#010; #include "transport/EtchFlexBuffer.h"&#010; #include "transport/EtchSession.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionListener.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionListener.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionListener.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionListener.h Wed Oct 17 06:50:55 2012&#010;@@ -19,8 +19,6 @@&#010; #ifndef __ETCHSESSIONLISTENER_H__&#010; #define __ETCHSESSIONLISTENER_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010;-#include "common/EtchError.h"&#010; #include "transport/EtchSession.h"&#010; &#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionMessage.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionMessage.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionMessage.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionMessage.h Wed Oct 17 06:50:55 2012&#010;@@ -19,8 +19,6 @@&#010; #ifndef __ETCHSESSIONMESSAGE_H__&#010; #define __ETCHSESSIONMESSAGE_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010;-#include "common/EtchError.h"&#010; #include "transport/EtchSession.h"&#010; #include "transport/EtchWho.h"&#010; #include "transport/EtchMessage.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionPacket.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionPacket.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionPacket.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSessionPacket.h Wed Oct 17 06:50:55 2012&#010;@@ -19,7 +19,6 @@&#010; #ifndef __ETCHSESSIONPACKET_H__&#010; #define __ETCHSESSIONPACKET_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010; #include "transport/EtchSession.h"&#010; #include "transport/EtchFlexBuffer.h"&#010; #include "transport/EtchWho.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h Wed Oct 17 06:50:55 2012&#010;@@ -20,9 +20,6 @@&#010; #define __ETCHTCPCONNECTION_H__&#010; &#010; #include "capu/util/Runnable.h"&#010;-&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchError.h"&#010; #include "common/EtchString.h"&#010; #include "common/EtchSocket.h"&#010; #include "support/EtchRuntime.h"&#010;@@ -35,7 +32,6 @@&#010; #include "util/EtchResources.h"&#010; #include "util/EtchLogger.h"&#010; &#010;-class EtchRuntime;&#010; &#010; /**&#010;  * Implementation of connection which handles a tcp connection.&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Wed Oct 17 06:50:55 2012&#010;@@ -23,7 +23,6 @@&#010; #include "capu/os/ServerSocket.h"&#010; #include "capu/os/Socket.h"&#010; #include "capu/util/Runnable.h"&#010;-#include "capu/util/SmartPointer.h"&#010; &#010; #include "common/EtchError.h"&#010; #include "common/EtchObject.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h Wed Oct 17 06:50:55 2012&#010;@@ -19,7 +19,6 @@&#010; #ifndef __ETCHTCPOPTION_H__&#010; #define __ETCHTCPOPTION_H__&#010; &#010;-#include "common/EtchString.h"&#010; #include "util/EtchURL.h"&#010; &#010; class EtchTcpOption {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h Wed Oct 17 06:50:55 2012&#010;@@ -26,7 +26,6 @@&#010; #include "support/EtchStack.h"&#010; #include "transport/EtchTransportMessage.h"&#010; #include "transport/EtchTransportData.h"&#010;-#include "transport/EtchTcpConnection.h"&#010; #include "transport/EtchTransportPacket.h"&#010; #include "transport/EtchPacketizer.h"&#010; #include "transport/EtchTcpConnection.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h Wed Oct 17 06:50:55 2012&#010;@@ -19,9 +19,6 @@&#010; #ifndef __ETCHTRANSPORT_H__&#010; #define __ETCHTRANSPORT_H__&#010; &#010;-#include "capu/util/SmartPointer.h"&#010;-#include "common/EtchError.h"&#010;-#include "common/EtchObject.h"&#010; #include "common/EtchString.h"&#010; &#010; /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportData.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportData.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportData.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportData.h Wed Oct 17 06:50:55 2012&#010;@@ -18,7 +18,7 @@&#010; &#010; #ifndef __ETCHTRANSPORTDATA_H__&#010; #define __ETCHTRANSPORTDATA_H__&#010;-#include "capu/util/SmartPointer.h"&#010;+&#010; #include "transport/EtchSessionData.h"&#010; #include "transport/EtchTransport.h"&#010; #include "transport/EtchFlexBuffer.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h Wed Oct 17 06:50:55 2012&#010;@@ -22,7 +22,6 @@&#010; #define __ETCHTRANSPORTFACTORY_H__&#010; &#010; #include "common/EtchTypes.h"&#010;-#include "common/EtchError.h"&#010; #include "support/EtchServerFactory.h"&#010; #include "transport/EtchTransport.h"&#010; #include "transport/EtchTransportMessage.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/util/EtchURL.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/util/EtchURL.h?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/util/EtchURL.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/util/EtchURL.h Wed Oct 17 06:50:55 2012&#010;@@ -18,7 +18,7 @@&#010; &#010; #ifndef __ETCHURL_H__&#010; #define __ETCHURL_H__&#010;-#include "common/EtchError.h"&#010;+&#010; #include "common/EtchString.h"&#010; #include "common/EtchHashTable.h"&#010; #include "common/EtchList.h"&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp Wed Oct 17 06:50:55 2012&#010;@@ -19,19 +19,7 @@&#010;  */&#010; &#010; #include "common/EtchArrayValue.h"&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchInt32.h"&#010;-#include "common/EtchBool.h"&#010;-#include "common/EtchByte.h"&#010;-#include "common/EtchShort.h"&#010;-#include "common/EtchLong.h"&#010;-#include "common/EtchDouble.h"&#010;-#include "common/EtchFloat.h"&#010;-#include "common/EtchString.h"&#010;-#include "common/EtchDate.h"&#010;-#include "common/EtchList.h"&#010;-#include "common/EtchHashTable.h"&#010;-#include "common/EtchHashSet.h"&#010;+#include "common/EtchTypes.h"&#010; &#010; const EtchObjectType* EtchArrayValue::TYPE() {&#010;   static const EtchObjectType TYPE(EOTID_ARRAY_VALUE, NULL);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp Wed Oct 17 06:50:55 2012&#010;@@ -17,8 +17,6 @@&#010;  */&#010; &#010; #include "common/EtchInt32.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; const EtchObjectType* EtchInt32::TYPE() {&#010;    const static EtchObjectType TYPE(EOTID_INT32, NULL);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp Wed Oct 17 06:50:55 2012&#010;@@ -17,18 +17,6 @@&#010;  */&#010; &#010; #include "common/EtchNativeArray.h"&#010;-#include "common/EtchInt32.h"&#010;-#include "common/EtchBool.h"&#010;-#include "common/EtchByte.h"&#010;-#include "common/EtchShort.h"&#010;-#include "common/EtchLong.h"&#010;-#include "common/EtchDouble.h"&#010;-#include "common/EtchFloat.h"&#010;-#include "common/EtchString.h"&#010;-#include "common/EtchDate.h"&#010;-#include "common/EtchHashTable.h"&#010;-#include "common/EtchHashSet.h"&#010;-#include "common/EtchList.h"&#010; &#010; status_t EtchNativeArrayBase::getBase(Pos pos, capu::SmartPointer&lt;EtchObject&gt; &amp;result) {&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp Wed Oct 17 06:50:55 2012&#010;@@ -17,7 +17,6 @@&#010;  */&#010; &#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010; &#010; const EtchObjectType* EtchObject::TYPE() {&#010;   const static EtchObjectType TYPE(EOTID_OBJECT, NULL);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp Wed Oct 17 06:50:55 2012&#010;@@ -18,8 +18,6 @@&#010;  * under the License.&#010;  */&#010; #include "common/EtchObjectType.h"&#010;-#include "common/EtchObject.h"&#010;-&#010; &#010; const EtchObjectType&amp; EtchObjectType::NATIVE_INT8() {&#010;   static const EtchObjectType type(EOTID_BYTE, NULL);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp Wed Oct 17 06:50:55 2012&#010;@@ -15,9 +15,9 @@&#010;  * See the License for the specific language governing permissions and&#010;  * limitations under the License.&#010;  */&#010;+&#010; #include "common/EtchServerSocket.h"&#010; #include "capu/util/SmartPointer.h"&#010;-#include "common/EtchSocket.h"&#010; &#010; const EtchObjectType* EtchServerSocket::TYPE() {&#010;   const static EtchObjectType TYPE(EOTID_SERVER_SOCKET, NULL);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp?rev=1399117&amp;r1=1399116&amp;r2=1399117&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTaggedData.cpp Wed Oct 17 06:50:55 2012&#010;@@ -17,19 +17,7 @@&#010;  */&#010; &#010; #include "serialization/EtchTaggedData.h"&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchInt32.h"&#010;-#include "common/EtchBool.h"&#010;-#include "common/EtchByte.h"&#010;-#include "common/EtchShort.h"&#010;-#include "common/EtchLong.h"&#010;-#include "common/EtchDouble.h"&#010;-#include "common/EtchFloat.h"&#010;-#include "common/EtchString.h"&#010;-#include "common/EtchDate.h"&#010;-#include "common/EtchList.h"&#010;-#include "common/EtchHashTable.h"&#010;-#include "common/EtchHashSet.h"&#010;+#include "common/EtchTypes.h"&#010; &#010; EtchTaggedData::EtchTaggedData(EtchValueFactory* vf)&#010; : mVf(vf) {&#010;@@ -169,4 +157,4 @@ status_t EtchTaggedData::findStructValue&#010;     }&#010;   }&#010;   return ETCH_ERROR;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399116 - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ include/serialization/ include/support/ include/util/ lib/capu/modules/capu/include/capu/util/ src/main/serialization/ src/main/transport/ src/main/util/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065038.68A382388AA7@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065038-68A382388AA7@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:50:36 2012&#010;New Revision: 1399116&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399116&amp;view=rev&#010;Log:&#010;ETCH-243 Small Fixes&#010;&#010;Added virtual destructors&#010;Added custom HashTable sizes inside of EtchConfig.h&#010;Added some logging&#010;&#010;Change-Id: I97cc1778909d9882c2b42cf7833b02bd29dd2f0d&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h Wed Oct 17 06:50:36&#010;2012&#010;@@ -1,19 +1,19 @@&#010;-/* $Id$ &#010;- * &#010;- * Licensed to the Apache Software Foundation (ASF) under one or more &#010;- * contributor license agreements. See the NOTICE file distributed with  &#010;- * this work for additional information regarding copyright ownership. &#010;- * The ASF licenses this file to you under the Apache License, Version  &#010;- * 2.0 (the "License"); you may not use this file except in compliance  &#010;- * with the License. You may obtain a copy of the License at &#010;- * &#010;- * http://www.apache.org/licenses/LICENSE-2.0 &#010;- * &#010;- * Unless required by applicable law or agreed to in writing, software &#010;- * distributed under the License is distributed on an "AS IS" BASIS, &#010;+/* $Id$&#010;+ *&#010;+ * Licensed to the Apache Software Foundation (ASF) under one or more&#010;+ * contributor license agreements. See the NOTICE file distributed with&#010;+ * this work for additional information regarding copyright ownership.&#010;+ * The ASF licenses this file to you under the Apache License, Version&#010;+ * 2.0 (the "License"); you may not use this file except in compliance&#010;+ * with the License. You may obtain a copy of the License at&#010;+ *&#010;+ * http://www.apache.org/licenses/LICENSE-2.0&#010;+ *&#010;+ * Unless required by applicable law or agreed to in writing, software&#010;+ * distributed under the License is distributed on an "AS IS" BASIS,&#010;  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;- * See the License for the specific language governing permissions and &#010;- * limitations under the License. &#010;+ * See the License for the specific language governing permissions and&#010;+ * limitations under the License.&#010;  */&#010; &#010; #ifndef __ETCHCONFIG_H__&#010;@@ -25,10 +25,24 @@&#010; &#010; #include "capu/Config.h"&#010; &#010;-//Hash table size&#010;-#define ETCH_DEFAULT_HASH_TABLE_SIZE 1000&#010;+/**&#010;+ * Hash table size&#010;+ */&#010;+#define ETCH_DEFAULT_HASH_TABLE_SIZE                      1000&#010;+&#010;+#define ETCH_DEFAULT_TYPEMAP_HASH_SIZE                    50&#010;+#define ETCH_DEFAULT_C2TYPEMAP_HASH_SIZE                  50&#010;+#define ETCH_DEFAULT_FIELDMAP_HASH_SIZE                   10&#010;+#define ETCH_DEFAULT_STRUCTVALUE_HASH_SIZE                8&#010;+#define ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE              5&#010;+#define ETCH_DEFAULT_CUSTOMVALIDATORCACHE_HASH_SIZE       100&#010;+#define ETCH_DEFAULT_MAILBOXMANAGER_HASH_SIZE             300&#010;+#define ETCH_DEFAULT_RESOURCES_HASH_SIZE                  300&#010;+#define ETCH_DEFAULT_URL_TERMS_HASH_SIZE                  10&#010; &#010;-//Socket input buffer size (bytes)&#010;+/**&#010;+ * Socket input buffer size (bytes)&#010;+ */&#010; #define ETCH_DEFAULT_SOCKET_INPUT_BUFFER_SIZE 8192&#010; &#010; #endif&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h Wed Oct&#010;17 06:50:36 2012&#010;@@ -22,6 +22,7 @@&#010; #include "capu/util/SmartPointer.h"&#010; #include "common/EtchHashTable.h"&#010; #include "common/EtchObject.h"&#010;+#include "common/EtchConfig.h"&#010; #include "serialization/EtchType.h"&#010; #include "serialization/EtchLevel.h"&#010; &#010;@@ -165,7 +166,7 @@ private:&#010;   static const capu::int64_t serialVersionUID = 1L;&#010; &#010;   //Default size of mTable&#010;-  static const capu::int32_t DEFAULT_SIZE = 8;&#010;+  static const capu::int32_t DEFAULT_SIZE = ETCH_DEFAULT_STRUCTVALUE_HASH_SIZE;&#010; &#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h Wed Oct 17&#010;06:50:36 2012&#010;@@ -32,6 +32,9 @@&#010; class EtchObjectSession&#010; {&#010; public:&#010;+&#010;+  virtual ~EtchObjectSession() {}&#010;+&#010;   /**&#010;   * Gets a configuration or operational value from the handler. The&#010;   * request is passed up the chain of sessions until some session&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h Wed Oct 17 06:50:36&#010;2012&#010;@@ -83,7 +83,7 @@ public:&#010; private:&#010; &#010;   EtchResources *mRelated;&#010;-  EtchHashTable &lt;EtchString, EtchObject*&gt; res;&#010;+  EtchHashTable &lt;EtchString, EtchObject*&gt; mRes;&#010; &#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h&#010;Wed Oct 17 06:50:36 2012&#010;@@ -114,8 +114,8 @@ namespace capu&#010; &#010;       class PoolWorker {&#010;       public:&#010;-        PoolWorker() {&#010;-          mPool = NULL;&#010;+        PoolWorker()&#010;+        : mPool(NULL), mPoolRunnable(NULL), mThread(NULL) {&#010;         }&#010; &#010;         PoolWorker(ThreadPool *pool, int32_t id)&#010;@@ -144,7 +144,7 @@ namespace capu&#010;         ThreadPool *mPool;&#010;         PoolRunnable *mPoolRunnable;&#010;         Thread *mThread;&#010;-        &#010;+&#010;       };&#010; &#010;       status_t init();&#010;@@ -159,7 +159,7 @@ namespace capu&#010; &#010;       bool_t isClosed();&#010; &#010;-      &#010;+&#010;   };&#010; &#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp&#010;Wed Oct 17 06:50:36 2012&#010;@@ -278,7 +278,6 @@ status_t EtchBinaryTaggedDataInput::read&#010;       capu::StringUtils::Sprintf(num, 100, "%d", id-&gt;get());&#010;       EtchString str(num);&#010;       type = new EtchType(id-&gt;get(), str);&#010;-      //TODO: Enhance memory management. We need smartpointers here because we create new&#010;object sometimes&#010;     }&#010;     return ETCH_OK;&#010;   }&#010;@@ -287,7 +286,6 @@ status_t EtchBinaryTaggedDataInput::read&#010;     EtchString* name = (EtchString*) obj.get();&#010;     if (mVf-&gt;getType(*name, type) != ETCH_OK) {&#010;       type = new EtchType(*name);&#010;-      //TODO: Enhance memory management. We need smartpointers here because we create new&#010;object sometimes&#010;     }&#010;     return ETCH_OK;&#010;   }&#010;@@ -436,7 +434,7 @@ status_t EtchBinaryTaggedDataInput::read&#010;       if (validateValue(v, boolean, result) != ETCH_OK) {&#010;         return ETCH_ERROR;&#010;       } else {&#010;-        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Boolean false value has been received");&#010;+        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Boolean true value has been received");&#010; &#010;         return ETCH_OK;&#010;       }&#010;@@ -580,7 +578,7 @@ status_t EtchBinaryTaggedDataInput::read&#010;         return ETCH_ERROR;&#010;       } else {&#010;         result = array;&#010;-        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Array hhas been received");&#010;+        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Array has been received");&#010;         return ETCH_OK;&#010;       }&#010;     }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;Wed Oct 17 06:50:36 2012&#010;@@ -293,9 +293,15 @@ status_t EtchBinaryTaggedDataOutput::wri&#010;   switch (typeCode) {&#010;     case EtchTypeCode::Null:&#010;     case EtchTypeCode::NONE:&#010;+      return ETCH_OK;&#010;     case EtchTypeCode::BOOLEAN_FALSE:&#010;+      CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Boolean False has been serialized. (No&#010;Data send - encoded via TypeId)");&#010;+      return ETCH_OK;&#010;     case EtchTypeCode::BOOLEAN_TRUE:&#010;+      CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Boolean True has been serialized. (No&#010;Data send - encoded via TypeId)");&#010;+      return ETCH_OK;&#010;     case EtchTypeCode::EMPTY_STRING:&#010;+      CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Empty String has been serialized. (No&#010;Data send - encoded via TypeId)");&#010;       return ETCH_OK;&#010; &#010;     case EtchTypeCode::BYTE:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp&#010;Wed Oct 17 06:50:36 2012&#010;@@ -17,11 +17,12 @@&#010;  */&#010; &#010; #include "common/EtchHashTable.h"&#010;+#include "common/EtchConfig.h"&#010; #include "serialization/EtchType.h"&#010; #include "serialization/EtchClass2TypeMap.h"&#010; &#010; EtchClass2TypeMap::EtchClass2TypeMap()&#010;-: mLocked(false) {&#010;+: mC2T(ETCH_DEFAULT_C2TYPEMAP_HASH_SIZE), mLocked(false) {&#010; }&#010; &#010; EtchClass2TypeMap::~EtchClass2TypeMap() {&#010;@@ -47,4 +48,4 @@ status_t EtchClass2TypeMap::put(const Et&#010; &#010; void EtchClass2TypeMap::lock() {&#010;   mLocked = true;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp Wed Oct&#010;17 06:50:36 2012&#010;@@ -15,10 +15,12 @@&#010;  * See the License for the specific language governing permissions and&#010;  * limitations under the License.&#010;  */&#010;+&#010;+#include "common/EtchConfig.h"&#010; #include "serialization/EtchFieldMap.h"&#010; &#010; EtchFieldMap::EtchFieldMap()&#010;-: mLocked(false) {&#010;+: mById(ETCH_DEFAULT_FIELDMAP_HASH_SIZE), mByName(ETCH_DEFAULT_FIELDMAP_HASH_SIZE), mLocked(false)&#010;{&#010; &#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp Wed Oct 17&#010;06:50:36 2012&#010;@@ -24,26 +24,26 @@ const EtchObjectType* EtchType::TYPE() {&#010;   return &amp;TYPE;&#010; }&#010; EtchType::EtchType()&#010;-: mId(0), mTimeout(0), mName(""), mSuperType(NULL), mResultType(NULL),&#010;+: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(0), mTimeout(0), mName(""), mSuperType(NULL),&#010;mResultType(NULL),&#010;   mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL),&#010;mStubHelper(NULL) {&#010;   addObjectType(TYPE());&#010; }&#010; &#010; EtchType::EtchType(EtchString name)&#010;-: mTimeout(0), mName(name), mSuperType(NULL),&#010;+: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mTimeout(0), mName(name), mSuperType(NULL),&#010; mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL),&#010;mHelper(NULL), mStubHelper(NULL) {&#010;   mId = EtchHashEx::Digest(mName);&#010;   addObjectType(TYPE());&#010; }&#010; &#010; EtchType::EtchType(capu::uint32_t id, EtchString name)&#010;-: mId(id), mTimeout(0), mName(name), mSuperType(NULL),&#010;+: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(id), mTimeout(0), mName(name),&#010;mSuperType(NULL),&#010; mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL),&#010;mHelper(NULL), mStubHelper(NULL) {&#010;   addObjectType(TYPE());&#010; }&#010; &#010; EtchType::EtchType(const EtchType&amp; other)&#010;- : EtchObject(other), mId(other.mId), mTimeout(other.mTimeout), mName(other.mName), mSuperType(other.mSuperType),&#010;+ : EtchObject(other), mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(other.mId),&#010;mTimeout(other.mTimeout), mName(other.mName), mSuperType(other.mSuperType),&#010;    mResultType(other.mResultType), mDirection(other.mDirection), mAsyncMode(other.mAsyncMode),&#010;mLocked(other.mLocked),&#010;    mComponentType(other.mComponentType), mHelper(other.mHelper), mStubHelper(other.mStubHelper)&#010;{&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp Wed Oct&#010;17 06:50:36 2012&#010;@@ -15,12 +15,14 @@&#010;  * See the License for the specific language governing permissions and&#010;  * limitations under the License.&#010;  */&#010;+&#010;+#include "common/EtchConfig.h"&#010; #include "serialization/EtchTypeMap.h"&#010; &#010; // TODO: Check memory handling&#010; &#010; EtchTypeMap::EtchTypeMap()&#010;-: mLocked(false) {&#010;+: mById(ETCH_DEFAULT_TYPEMAP_HASH_SIZE), mByName(ETCH_DEFAULT_TYPEMAP_HASH_SIZE), mLocked(false)&#010;{&#010; }&#010; &#010; EtchTypeMap::~EtchTypeMap() {&#010;@@ -28,7 +30,9 @@ EtchTypeMap::~EtchTypeMap() {&#010;   while (it.hasNext()) {&#010;     capu::Pair&lt;capu::int32_t, EtchType*&gt; pair;&#010;     it.next(&amp;pair);&#010;-    delete pair.second;&#010;+    if (pair.second != NULL) {&#010;+      delete pair.second;&#010;+    }&#010;   }&#010;   mById.clear();&#010;   mByName.clear();&#010;@@ -102,4 +106,4 @@ void EtchTypeMap::clear() {&#010;   }&#010;   mByName.clear();&#010;   mById.clear();&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;Wed Oct 17 06:50:36 2012&#010;@@ -27,7 +27,7 @@ public:&#010;    * Validator cache&#010;    */&#010;   struct ValidatorCache {&#010;-    ValidatorCache() : id(0), validators(100) {}&#010;+    ValidatorCache() : id(0), validators(ETCH_DEFAULT_CUSTOMVALIDATORCACHE_HASH_SIZE) {}&#010;     capu::uint64_t id;&#010;     EtchHashTable&lt;EtchValidatorCustomKey, capu::SmartPointer&lt;EtchValidator&gt; &gt;&#010;validators;&#010;   };&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;Wed Oct 17 06:50:36 2012&#010;@@ -30,7 +30,7 @@ const EtchString&amp; EtchDefaultDeliverySer&#010; }&#010; &#010; EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager*&#010;transport, const EtchString&amp; uri)&#010;-: mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {&#010;+: mRuntime(runtime), mTransport(transport), mStatus(EtchString("session status"), EtchString(""))&#010;{&#010;   EtchURL url(uri);&#010;   init(&amp;url);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;Wed Oct 17 06:50:36 2012&#010;@@ -20,7 +20,7 @@&#010; #include "capu/os/Debug.h"&#010; &#010; EtchPlainMailboxManager::EtchPlainMailboxManager(EtchRuntime* runtime, EtchTransportMessage*&#010;transport, const EtchString&amp; uri, EtchResources* resources)&#010;-: mRuntime(runtime), mSession(NULL), mTransport(transport), mUp(false) {&#010;+: mRuntime(runtime), mSession(NULL), mTransport(transport), mUp(false), mMailboxes(ETCH_DEFAULT_MAILBOXMANAGER_HASH_SIZE)&#010;{&#010;   capu::Debug::Assert(mRuntime != NULL);&#010;   mTransport-&gt;setSession(this);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp Wed Oct 17 06:50:36&#010;2012&#010;@@ -19,7 +19,7 @@&#010; #include "util/EtchResources.h"&#010; &#010; EtchResources::EtchResources()&#010;-: mRelated(NULL) {&#010;+: mRelated(NULL), mRes(ETCH_DEFAULT_RESOURCES_HASH_SIZE) {&#010; &#010; }&#010; &#010;@@ -32,7 +32,7 @@ EtchResources::~EtchResources() {&#010; &#010; capu::bool_t EtchResources::containsKey(const EtchString&amp; key) {&#010;   EtchObject* ptr = NULL;&#010;-  if (res.get(key, &amp;ptr) == ETCH_OK)&#010;+  if (mRes.get(key, &amp;ptr) == ETCH_OK)&#010;     return true;&#010;   else {&#010;     if (mRelated == NULL)&#010;@@ -46,7 +46,7 @@ capu::bool_t EtchResources::containsKey(&#010; }&#010; &#010; status_t EtchResources::get(const EtchString&amp; key, EtchObject*&amp; result) {&#010;-  if (res.get(key, &amp;result) != ETCH_OK) {&#010;+  if (mRes.get(key, &amp;result) != ETCH_OK) {&#010; &#010;     if (mRelated == NULL)&#010;       return ETCH_ENOT_EXIST;&#010;@@ -58,12 +58,12 @@ status_t EtchResources::get(const EtchSt&#010; }&#010; &#010; status_t EtchResources::put(const EtchString&amp; key, EtchObject* value, EtchObject*&amp;&#010;result) {&#010;-  return res.put(key, value, &amp;result);&#010;+  return mRes.put(key, value, &amp;result);&#010; }&#010; &#010; status_t EtchResources::remove(const EtchString&amp; key, EtchObject*&amp; result) {&#010; &#010;-  return res.remove(key, &amp;result);&#010;+  return mRes.remove(key, &amp;result);&#010; }&#010; &#010; EtchResources* EtchResources::getRelated() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp?rev=1399116&amp;r1=1399115&amp;r2=1399116&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp Wed Oct 17 06:50:36&#010;2012&#010;@@ -18,7 +18,8 @@&#010; #include "util/EtchURL.h"&#010; #include "capu/os/StringUtils.h"&#010; &#010;-EtchURL::EtchURL() {&#010;+EtchURL::EtchURL()&#010;+ : terms(ETCH_DEFAULT_URL_TERMS_HASH_SIZE) {&#010; &#010; }&#010; &#010;@@ -418,4 +419,4 @@ EtchList&lt;EtchString&gt;&amp; EtchURL::getParams&#010; &#010; EtchHashTable&lt;EtchString, EtchString&gt;&amp; EtchURL::getTerms() {&#010;   return terms;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399115 - in /incubator/etch/trunk/binding-cpp: compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/ compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ runtime/include/serialization/ runtime/include/support/ runtim...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065026.E99182388A91@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065026-E99182388A91@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:50:24 2012&#010;New Revision: 1399115&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399115&amp;view=rev&#010;Log:&#010;ETCH-244 Adding runtime and logging to code generation templates&#010;&#010;- added Logging&#010;- refactored runtime usage&#010;&#010;Change-Id: I3b9e3b6faf76ca0b1089fa509933b68afebe2482&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchImportExportHelper.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;Wed Oct 17 06:50:24 2012&#010;@@ -1302,7 +1302,7 @@ public class Compiler extends Backend {&#010;         if (n.efqname(this).equals("EtchHashTable")) return b.className()+"&lt;EtchObjectPtr,&#010;EtchObjectPtr&gt; ";&#010;         if (n.efqname(this).equals("EtchHashSet")) return b.className()+"&lt;EtchObjectPtr&gt;&#010;";&#010;         throw new IllegalArgumentException(String.format(&#010;-                "unable to find correct Etch data type for type at line %d: %s", t.beginLine,&#010;n.efqname(this)));&#010;+            "unable to find correct Etch data type for type at line %d: %s", t.beginLine,&#010;n.efqname(this)));&#010;       }&#010;       if (n.isEnumx()) {&#010;         return n.efqname(this);&#010;@@ -1492,7 +1492,7 @@ public class Compiler extends Backend {&#010;       TypeRef type = param.type();&#010; &#010;       if (type.isBuiltin())&#010;-        return String.format("EtchValidator%s::Get(%d, tmpValue)",&#010;+        return String.format("EtchValidator%s::Get(runtime, %d, tmpValue)",&#010;             this.getValidatorStringForParam(param), type.dim());&#010; &#010;       Named&lt;?&gt; n = type.getNamed(type.intf());&#010;@@ -1513,7 +1513,7 @@ public class Compiler extends Backend {&#010;          * int i = cn.indexOf( '&lt;' ); if (i &gt;= 0) cn = cn.substring( 0, i );&#010;          */&#010;         return String.format(&#010;-            "EtchValidatorCustom::Get(%d, %s::TYPE(), %s, tmpValue);",&#010;+            "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), %s, tmpValue);",&#010;             type.dim(), cn, b.allowSubclass());&#010;       }&#010; &#010;@@ -1523,13 +1523,13 @@ public class Compiler extends Backend {&#010;         if (n.isStruct()) {&#010;           Struct s = (Struct) n;&#010;           return String.format(&#010;-              "EtchValidatorCustom::Get( %d, %s::TYPE(), true, tmpValue);",&#010;+              "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), true, tmpValue);",&#010;               type.dim(), s&#010;               .service().name() + "::" + n.efqname(this));&#010;         }&#010;         Except e = (Except) n;&#010;         return String.format(&#010;-            "EtchValidatorCustom::Get( %d, %s::TYPE(), true, tmpValue);", type.dim(), e&#010;+            "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), true, tmpValue);", type.dim(),&#010;e&#010;             .service().name() + "::" + n.efqname(this));&#010;       }&#010;       // Don't allow subclassing for externs or etch defined enums.&#010;@@ -1538,7 +1538,7 @@ public class Compiler extends Backend {&#010;             "n.isExtern() || n.isEnumx(): " + n);&#010;       Enumx e = (Enumx) n;&#010;       return String.format(&#010;-          "EtchValidatorCustom::Get( %d, %s::TYPE(), false, tmpValue);",&#010;+          "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), false, tmpValue);",&#010;           type.dim(), n.efqname(this));&#010;     }&#010; &#010;@@ -1548,11 +1548,11 @@ public class Compiler extends Backend {&#010;       String efgName = this.getExcept(thrown).service().name() + "::"&#010;           + e.efqname(this);&#010;       return String.format(&#010;-          "EtchValidatorCustom::Get(0, %s::TYPE(), true, tmpValue);"&#010;+          "EtchValidatorCustom::Get(runtime, 0, %s::TYPE(), true, tmpValue);"&#010;           , efgName);&#010;     }&#010;     if (named instanceof Item)&#010;-      return "EtchValidatorBoolean::Get(0, tmpValue)";&#010;+      return "EtchValidatorBoolean::Get(runtime, 0, tmpValue)";&#010;     return "NULL";&#010;   }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;Wed Oct 17 06:50:24 2012&#010;@@ -67,9 +67,9 @@ status_t $clname::Listener${i}Server::ne&#010;   EtchValueFactory* vf = (EtchValueFactory*) obj;&#010;   &#010;   //create stack layers&#010;-  EtchMailboxManager* mbm = new EtchPlainMailboxManager(transport, uri, resources);&#010;+  EtchMailboxManager* mbm = new EtchPlainMailboxManager(runtime, transport, uri, resources);&#010;   stack-&gt;setMailboxManager(mbm);&#010;-  EtchDeliveryService* dvs = new EtchDefaultDeliveryService(mbm, uri);&#010;+  EtchDeliveryService* dvs = new EtchDefaultDeliveryService(runtime, mbm, uri);&#010;   stack-&gt;setDeliveryService(dvs);&#010;   Remote${i}Client* client = new Remote${i}Client(runtime, dvs, vf, stack);&#010;   stack-&gt;setRemote(client);&#010;@@ -126,7 +126,7 @@ status_t $clname::newListener(EtchRuntim&#010; &#010;   //init resources&#010;   EtchResources *res;&#010;-  status = EtchTransportHelper::InitResources(resources, res);&#010;+  status = EtchTransportHelper::InitResources(runtime, resources, res);&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010;@@ -164,14 +164,14 @@ status_t $clname::newListener(EtchRuntim&#010;   {&#010;     status_t status = ETCH_OK;&#010; &#010;-    EtchStackClient* stack = new EtchStackClient();&#010;+    EtchStackClient* stack = new EtchStackClient(runtime);&#010; &#010;     //static initialization of value factory&#010;     ValueFactory${i}::InitValueFactory(runtime);&#010; &#010;     //init resources&#010;     EtchResources* res;&#010;-    status = InitResources(resources, res);&#010;+    status = InitResources(runtime, resources, res);&#010;     if (status != ETCH_OK) {&#010;       return status;&#010;     }&#010;@@ -191,9 +191,9 @@ status_t $clname::newListener(EtchRuntim&#010;     //init stack layers&#010;     EtchTransportMessage* m;&#010;     EtchTransportFactory::getTransport(runtime, uri, res, m);&#010;-    EtchMailboxManager* mbm = new EtchPlainMailboxManager(m, uri, res);&#010;+    EtchMailboxManager* mbm = new EtchPlainMailboxManager(runtime, m, uri, res);&#010;     stack-&gt;setMailboxManager(mbm);&#010;-    EtchDeliveryService* dvs = new EtchDefaultDeliveryService(mbm, uri);&#010;+    EtchDeliveryService* dvs = new EtchDefaultDeliveryService(runtime, mbm, uri);&#010;     stack-&gt;setDeliveryService(dvs);&#010;     Remote${i}Server* _server = new Remote${i}Server(runtime, dvs, vf, stack);&#010;     ${i}Client* client = implFactory.new${i}Client( server );&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;Wed Oct 17 06:50:24 2012&#010;@@ -119,7 +119,7 @@ $clname::$clname(EtchRuntime* runtime, E&#010;   : Remote${i}(runtime, svc, vf, stack) {&#010; #else&#010; $clname::$clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack*&#010;stack )&#010;-  : EtchRemoteBase(svc, vf, stack), mRuntime(runtime) {&#010;+  : EtchRemoteBase(runtime, svc, vf, stack), mRuntime(runtime) {&#010; #end&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;Wed Oct 17 06:50:24 2012&#010;@@ -38,6 +38,7 @@&#010; #end&#010; \#include "ValueFactory${i}.h"&#010; \#include "support/EtchStubHelper.h"&#010;+\#include "support/EtchRuntime.h"&#010; &#010; using namespace $namespace;&#010; &#010;@@ -49,15 +50,22 @@ class Run${mthd.vname($helper)}&#010;   : public EtchStubHelper&lt;$i$suffix&gt;&#010; {&#010; public:&#010;+  Run${mthd.vname($helper)}(EtchRuntime* runtime)&#010;+  : EtchStubHelper(runtime) {&#010;+  }&#010;+  &#010;+  ~Run${mthd.vname($helper)}() {&#010;+  }&#010;+&#010;   status_t run(EtchStubBase&lt;$i$suffix&gt;* _ref, EtchDeliveryService *_svc, $i$suffix&#010;*_obj, capu::SmartPointer&lt;EtchWho&gt; _sender, capu::SmartPointer&lt;EtchMessage&gt; _msg&#010;)&#010;   {&#010;     status_t status = ETCH_OK;&#010;-&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: Called ${mthd.vname($helper)}&#010;Run-Method.");&#010; #if (!$mthd.isOneway())&#010;     capu::SmartPointer&lt;EtchMessage&gt; _rmsg;&#010;     status = _msg-&gt;createReplyMessage(_rmsg);&#010;     if(status != ETCH_OK) {&#010;-      // TODO log error&#010;+      CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: Coudn't create&#010;reply-message.");&#010;       // TODO set exception&#010;       return ETCH_ERROR;&#010;     }&#010;@@ -75,15 +83,18 @@ public:&#010;     $intfname::$mthd.name()AsyncResultPtr ar;&#010; #set($sep = "")&#010; #set($count = 0)&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: Calling implementation&#010;of \"$mthd.name()\" function.");&#010;     ar = _obj-&gt;$mthd.name()(#foreach($param in $mthd.iterator())#if($mthd.hasAuth())${sep}$param.name()#else#set($count&#010;= $count + 1)${sep}val$count#end#set($sep = ", ")#end);&#010; &#010;     // create result message&#010; #if($mthd.hasReturn())&#010;     if(ar-&gt;hasResult()) {&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: $mthd.name()&#010;- returned an Result, generating Answer Message.");&#010;         _rmsg-&gt;put(ValueFactory$i::_mf_result(), ar-&gt;getResult());&#010;     } else&#010; #end&#010;     if(ar-&gt;hasException()) {&#010;+         CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: $mthd.name()&#010; - returned an Exception - notify Session.");&#010;         _ref-&gt;sessionNotify(ar-&gt;getException());&#010; #if ($mthd.isOneway())&#010;         EtchMessagePtr _rmsg;&#010;@@ -92,12 +103,14 @@ public:&#010;         _rmsg-&gt;put( ValueFactory$i::_mf_result(), ar-&gt;getException() );&#010; #if ($mthd.isOneway())&#010;         // transport result message&#010;+        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: $mthd.name()&#010;- (One-Way) Transport Message back! Because an Exception occurred!.");&#010;         status = _svc-&gt;transportMessage( _sender, _rmsg);&#010; #end&#010;     }&#010; &#010; #if (!$mthd.isOneway())&#010;     // transport result message&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "Stub$i$suffix", "${namespace}: $mthd.name()&#010;- Transport answer-message back!.");&#010;     status = _svc-&gt;transportMessage( _sender, _rmsg);&#010; #end&#010;     return status;&#010;@@ -153,23 +166,22 @@ namespace $namespace {&#010;     /**&#010;      * Static Initialization-Helper&#010;      */&#010;-    static status_t Init()&#010;+    static status_t Init(EtchRuntime* runtime)&#010;     {&#010;-      #foreach( $mthd in $intf.iterator() )&#010;-      #if ($mthd.isMsgDir($mc))&#010;-      #if (!$mthd.isHidden())&#010;-          ValueFactory$i::${mthd.vname( $helper )}-&gt;setStubHelper(new Run${mthd.vname($helper)}());&#010;-      #end&#010;-      #end&#010;-      #if( $n.isMixin() )&#010;-      #set( $m = $n.getModule() )&#010;-      #set( $z = $m.iterator().next() )&#010;-          ${m.name()}::Stub${z.name()}${suffix}::Init();&#010;-      #end&#010;-      #end&#010;+#foreach( $mthd in $intf.iterator() )&#010;+#if ($mthd.isMsgDir($mc))&#010;+#if (!$mthd.isHidden())&#010;+      ValueFactory$i::${mthd.vname( $helper )}-&gt;setStubHelper(new Run${mthd.vname($helper)}(runtime));&#010;+#end&#010;+#end&#010;+#if( $n.isMixin() )&#010;+#set( $m = $n.getModule() )&#010;+#set( $z = $m.iterator().next() )&#010;+      ${m.name()}::Stub${z.name()}${suffix}::Init(runtime);&#010;+#end&#010;+#end&#010;       return ETCH_OK;&#010;     }&#010;-&#010; ##end&#010;   };&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;Wed Oct 17 06:50:24 2012&#010;@@ -34,6 +34,7 @@&#010; \#include "serialization/EtchAsyncMode.h"&#010; \#include "serialization/EtchDirection.h"&#010; \#include "serialization/EtchValidators.h"&#010;+\#include "serialization/EtchImportExportHelper.h"&#010; &#010; using namespace $namespace;&#010; &#010;@@ -62,6 +63,13 @@ $vf::Etch${intf.name()}RuntimeListener $&#010; class ImportExportHelper$n.vname($helper)&#010;   : public EtchImportExportHelper {&#010; public:&#010;+  ImportExportHelper$n.vname($helper)(EtchRuntime* runtime) &#010;+  : EtchImportExportHelper(runtime) {&#010;+  }&#010;+&#010;+  virtual ~ImportExportHelper$n.vname($helper)() {&#010;+  }&#010;+  &#010;   status_t exportValue(EtchValueFactory* vf, EtchObjectPtr value, EtchStructValue *&amp;result)&#010;   {&#010;     EtchStructValue* _struct = new EtchStructValue( $vf::${n.vname( $helper )}, vf );&#010;@@ -73,6 +81,7 @@ public:&#010;     _struct-&gt;put($vf::$p.vname($helper)(), val$CountParams );&#010; #end&#010;     result = _struct;&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "$vf", "${namespace}: exported $n.vname($helper)&#010;Value.");&#010;     return ETCH_OK;&#010;   }&#010;   status_t importValue(EtchStructValue* value, EtchObjectPtr &amp;result)&#010;@@ -88,6 +97,7 @@ public:&#010;     v-&gt;$helper.getSetterName($p.name())(tmp$CountParams);&#010; #end&#010;     result = v;&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "$vf", "${namespace}: imported $n.vname($helper)&#010;Value.");&#010;     return ETCH_OK;&#010;   }&#010; };&#010;@@ -224,7 +234,7 @@ status_t ${vf}::InitResults()&#010; }&#010; &#010; ## ----------------------------- import / export -----------------------------&#010;-status_t ${vf}::InitImportExport()&#010;+status_t ${vf}::InitImportExport(EtchRuntime* runtime)&#010; {&#010; #foreach ( $n in $intf.iterator() )&#010; #if ($n.isStruct() || $n.isExcept())&#010;@@ -234,14 +244,14 @@ status_t ${vf}::InitImportExport()&#010; #if ($n.hasExtends())&#010;   $vf::${n.vname($helper)}-&gt;setSuperType($n.getExtends().vname($helper));&#010; #end&#010;-  $vf::${n.vname($helper)}-&gt;setImportExportHelper(new ImportExportHelper$n.vname($helper)());&#010;+  $vf::${n.vname($helper)}-&gt;setImportExportHelper(new ImportExportHelper$n.vname($helper)(runtime));&#010; #elseif ($n.isExtern())&#010; #set( $tname = $n.efqname( $helper ) )&#010; #elseif ($n.isEnumx())&#010; #set( $tname = $n.efqname( $helper ) )&#010;   $vf::class2type()-&gt;put(${tname}::TYPE(), $vf::${n.vname($helper)});&#010;   $vf::${n.vname( $helper )}-&gt;setComponentType(${tname}::TYPE());&#010;-  $vf::${n.vname( $helper )}-&gt;setImportExportHelper(new ImportExportHelper$n.vname($helper)());&#010;+  $vf::${n.vname( $helper )}-&gt;setImportExportHelper(new ImportExportHelper$n.vname($helper)(runtime));&#010; #end&#010; #end&#010; &#010;@@ -271,7 +281,7 @@ status_t ${vf}::InitFields()&#010; &#010; &#010; #set( $ctr = 0 )&#010;-status_t $vf::InitParams()&#010;+status_t $vf::InitParams(EtchRuntime* runtime)&#010; {&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmpValue;&#010; #foreach( $n in $intf.iterator() )&#010;@@ -293,7 +303,7 @@ status_t $vf::InitParams()&#010; #end ## -- foreach --&#010; #end ## -- else --&#010; #if ($n.isMessage())&#010;-  EtchValidatorLong::Get(0, tmpValue);&#010;+  EtchValidatorLong::Get(runtime, 0, tmpValue);&#010;   ${n.vname( $helper )}-&gt;putValidator($vf::_mf__messageId(), tmpValue);&#010; &#010; #if ($n.isHidden())&#010;@@ -304,9 +314,9 @@ status_t $vf::InitParams()&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::$param.vname($helper)(), tmpValue); //&#010;thrown $t.name()&#010; &#010; #end ## -- foreach --&#010;-  EtchValidatorRuntimeException::Get(tmpValue);&#010;+  EtchValidatorRuntimeException::Get(runtime, tmpValue);&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::$param.vname($helper)(), tmpValue); //&#010;thrown RuntimeException&#010;-  EtchValidatorLong::Get(0, tmpValue);&#010;+  EtchValidatorLong::Get(runtime, 0, tmpValue);&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::_mf__inReplyTo(), tmpValue);&#010; #end ## -- isHidden --&#010; #end ## -- isMessage --&#010;@@ -338,7 +348,7 @@ status_t $vf::InitValueFactory(EtchRunti&#010;   }&#010;   SRuntimesMutex.unlock();&#010;   &#010;-  status = $vf::Init( types(), class2type() );&#010;+  status = $vf::Init(runtime, types(), class2type());&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010;@@ -359,33 +369,33 @@ status_t $vf::InitValueFactory(EtchRunti&#010;   }&#010; #foreach( $n in $intf.iterator() )&#010; #if ($n.isExtern())&#010;-    status = ${n.sname( $helper )}.Init( ${n.vname($helper)}(), class2type );&#010;+    status = ${n.sname( $helper )}.Init(runtime, ${n.vname($helper)}(), class2type);&#010;     if (status != ETCH_OK) {&#010;       return status;&#010;     }&#010; #end&#010; #end&#010;-  status = $vf::InitParams();&#010;+  status = $vf::InitParams(runtime);&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010;   &#010;-  status = $vf::InitImportExport();&#010;+  status = $vf::InitImportExport(runtime);&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010; &#010;-  status = Stub${i}&lt;void&gt;::Init();&#010;+  status = Stub${i}&lt;void&gt;::Init(runtime);&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010;   &#010;-  status = Stub${i}Server::Init();&#010;+  status = Stub${i}Server::Init(runtime);&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010;   &#010;-  status = Stub${i}Client::Init();&#010;+  status = Stub${i}Client::Init(runtime);&#010;   if (status != ETCH_OK) {&#010;     return status;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;Wed Oct 17 06:50:24 2012&#010;@@ -79,7 +79,7 @@ namespace $namespace {&#010;     static status_t InitTypes();&#010;     static status_t InitResults();&#010;     static status_t InitFields();&#010;-    static status_t InitParams();&#010;+    static status_t InitParams(EtchRuntime* runtime);&#010; #set( $ctr = 0 )&#010; #foreach( $n in $intf.iterator() )&#010; #if ($n.isEnumx() || $n.isStruct() || $n.isExcept() || $n.isMessage())&#010;@@ -89,7 +89,7 @@ namespace $namespace {&#010; #set( $ctr = $ctr + 1 )&#010; #end&#010; #end&#010;-    static status_t InitImportExport();&#010;+    static status_t InitImportExport(EtchRuntime* runtime);&#010; &#010;     /**&#010;      * Static Initialization-Helper&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;Wed Oct 17 06:50:24 2012&#010;@@ -56,7 +56,6 @@ public:&#010;   static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;-  EtchRuntime* mRuntime;&#010;   EtchField mField;&#010;   EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h Wed&#010;Oct 17 06:50:24 2012&#010;@@ -61,7 +61,6 @@ public:&#010;   static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;-  EtchRuntime* mRuntime;&#010;   EtchField mField;&#010;   EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;Wed Oct 17 06:50:24 2012&#010;@@ -62,7 +62,6 @@ public:&#010;   static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;-  EtchRuntime* mRuntime;&#010;   EtchField mField;&#010;   EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchImportExportHelper.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchImportExportHelper.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchImportExportHelper.h&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchImportExportHelper.h&#010;Wed Oct 17 06:50:24 2012&#010;@@ -19,6 +19,7 @@&#010; #ifndef __ETCHIMPORTEXPORTHELPER_H__&#010; #define __ETCHIMPORTEXPORTHELPER_H__&#010; #include "serialization/EtchValueFactory.h"&#010;+#include "support/EtchRuntime.h"&#010; &#010; class EtchStructValue;&#010; &#010;@@ -30,6 +31,12 @@ class EtchImportExportHelper {&#010; public:&#010; &#010;   /**&#010;+   * Constructor&#010;+   */&#010;+  EtchImportExportHelper(EtchRuntime* runtime) : mRuntime(runtime) {&#010;+  }&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchImportExportHelper() {&#010;@@ -56,6 +63,8 @@ public:&#010;    */&#010;   virtual status_t importValue(EtchStructValue* value, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result) = 0;&#010; &#010;+protected:&#010;+  EtchRuntime* mRuntime;&#010; };&#010; &#010; #endif /* ETCHIMPORTEXPORTHELPER_H */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h Wed&#010;Oct 17 06:50:24 2012&#010;@@ -61,7 +61,6 @@ public:&#010;   static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;-  EtchRuntime* mRuntime;&#010;   EtchField mField;&#010;   EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;Wed Oct 17 06:50:24 2012&#010;@@ -62,7 +62,6 @@ public:&#010;   static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;-  EtchRuntime* mRuntime;&#010;   EtchField mField;&#010;   EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h Wed&#010;Oct 17 06:50:24 2012&#010;@@ -56,7 +56,6 @@ public:&#010;   static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;-  EtchRuntime* mRuntime;&#010;   EtchField mField;&#010;   EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h Wed Oct 17 06:50:24&#010;2012&#010;@@ -75,8 +75,8 @@ protected:&#010;    * The message source.&#010;    */&#010;   EtchDeliveryService* mSvc;&#010;-  EtchFreePool* mFreePool;&#010;   EtchQueuedPool* mQueuedPool;&#010;+  EtchFreePool* mFreePool;&#010; &#010;   /**&#010;    * The object used to implement stub.&#010;@@ -126,7 +126,7 @@ private:&#010; &#010; template&lt;typename T&gt;&#010; EtchStubBase&lt;T&gt;::EtchStubBase(EtchDeliveryService* svc, T* obj, EtchQueuedPool* queued,&#010;EtchFreePool* free)&#010;-: mSvc(svc), mObj(obj), mQueuedPool(queued), mFreePool(free) {&#010;+: mSvc(svc), mQueuedPool(queued), mFreePool(free), mObj(obj) {&#010;   mSvc-&gt;setSession(this);&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h Wed Oct 17 06:50:24&#010;2012&#010;@@ -22,6 +22,7 @@&#010; &#010; #include "capu/util/SmartPointer.h"&#010; #include "support/EtchDeliveryService.h"&#010;+#include "support/EtchRuntime.h"&#010; &#010; template&lt;typename T&gt;&#010; class EtchStubBase;&#010;@@ -44,13 +45,13 @@ public:&#010;    * Constructs a StubHelper which uses synchronous mode to dispatch&#010;    * method from message.&#010;    */&#010;-  EtchStubHelper() {&#010;+  EtchStubHelper(EtchRuntime* runtime)&#010;+  : mRuntime(runtime) {&#010;     addObjectType(TYPE());&#010;-    // nothing to do.&#010;   }&#010; &#010;   EtchStubHelper(const EtchStubHelper&amp; other)&#010;-  : EtchObject(other) {&#010;+  : EtchObject(other), mRuntime(other.mRuntime) {&#010;   }&#010; &#010;   /**&#010;@@ -61,6 +62,11 @@ public:&#010;    * @param msg&#010;    */&#010;   virtual status_t run(EtchStubBase&lt;T&gt;* ref, EtchDeliveryService* svc, T* obj, capu::SmartPointer&lt;EtchWho&gt;&#010;sender, capu::SmartPointer&lt;EtchMessage&gt; msg ) = 0;&#010;+&#010;+&#010;+protected:&#010;+  EtchRuntime* mRuntime;&#010;+&#010; };&#010; &#010; template&lt;typename T&gt;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -27,7 +27,7 @@ const EtchString&amp; EtchAuthenticationExce&#010; }&#010; &#010; EtchAuthenticationExceptionSerializer::EtchAuthenticationExceptionSerializer(EtchRuntime*&#010;runtime, EtchType* type, EtchField* field)&#010;-: mRuntime(runtime), mField(*field), mType(type) {&#010;+: EtchImportExportHelper(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchAuthenticationExceptionSerializer::~EtchAuthenticationExceptionSerializer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -27,7 +27,7 @@ const EtchString&amp; EtchDateSerializer::FI&#010; }&#010; &#010; EtchDateSerializer::EtchDateSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;-: mRuntime(runtime), mField(*field), mType(type) {&#010;+: EtchImportExportHelper(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchDateSerializer::~EtchDateSerializer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -28,7 +28,7 @@ const EtchString&amp; EtchHashTableSerialize&#010; }&#010; &#010; EtchHashTableSerializer::EtchHashTableSerializer(EtchRuntime* runtime, EtchType* type, EtchField&amp;&#010;field)&#010;-: mRuntime(runtime), mField(field), mType(type) {&#010;+: EtchImportExportHelper(runtime), mField(field), mType(type) {&#010; }&#010; &#010; EtchHashTableSerializer::~EtchHashTableSerializer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -29,7 +29,7 @@ const EtchString&amp; EtchListSerializer::FI&#010; // TODO: check signature regarding by value copy&#010; &#010; EtchListSerializer::EtchListSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;-: mRuntime(runtime), mField(*field), mType(type) {&#010;+: EtchImportExportHelper(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchListSerializer::~EtchListSerializer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -29,7 +29,7 @@ const EtchString&amp; EtchRuntimeExceptionSe&#010; // TODO: check signature regarding by value copy&#010; &#010; EtchRuntimeExceptionSerializer::EtchRuntimeExceptionSerializer(EtchRuntime* runtime, EtchType*&#010;type, EtchField* field)&#010;-: mRuntime(runtime), mField(*field), mType(type) {&#010;+: EtchImportExportHelper(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchRuntimeExceptionSerializer::~EtchRuntimeExceptionSerializer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -27,7 +27,7 @@ const EtchString&amp; EtchSetSerializer::FIE&#010; }&#010; &#010; EtchSetSerializer::EtchSetSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;-: mRuntime(runtime), mField(*field), mType(type) {&#010;+: EtchImportExportHelper(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchSetSerializer::~EtchSetSerializer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1399115&amp;r1=1399114&amp;r2=1399115&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;Wed Oct 17 06:50:24 2012&#010;@@ -27,6 +27,7 @@ public:&#010;    * Validator cache&#010;    */&#010;   struct ValidatorCache {&#010;+    ValidatorCache() : id(0), validators(100) {}&#010;     capu::uint64_t id;&#010;     EtchHashTable&lt;EtchValidatorCustomKey, capu::SmartPointer&lt;EtchValidator&gt; &gt;&#010;validators;&#010;   };&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399114 [4/4] - in /incubator/etch/trunk: binding-cpp/runtime/include/common/ binding-cpp/runtime/include/serialization/ binding-cpp/runtime/include/support/ binding-cpp/runtime/include/transport/ binding-cpp/runtime/include/util/ binding-...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065010.E7BBD2388A64@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065010-E7BBD2388A64@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: incubator/etch/trunk/examples/helloworld/java/.classpath&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/java/.classpath?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/java/.classpath (original)&#010;+++ incubator/etch/trunk/examples/helloworld/java/.classpath Wed Oct 17 06:50:01 2012&#010;@@ -3,6 +3,6 @@&#010; &#009;&lt;classpathentry kind="src" path="src/main"/&gt;&#010; &#009;&lt;classpathentry kind="src" path="target/generated-sources/java"/&gt;&#010; &#009;&lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/&gt;&#010;-&#009;&lt;classpathentry kind="var" path="ETCH_HOME/binding-java/lib/apache-etch-java-runtime-1.3.0-incubating.jar"/&gt;&#010;+&#009;&lt;classpathentry kind="var" path="ETCH_HOME/binding-java/lib/apache-etch-java-runtime-1.3.0-incubating.jar"&#010;sourcepath="/ETCH_HOME_SRC"/&gt;&#010; &#009;&lt;classpathentry kind="output" path="bin"/&gt;&#010; &lt;/classpath&gt;&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/java/src/main/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/java/src/main/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/java/src/main/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java&#010;(original)&#010;+++ incubator/etch/trunk/examples/helloworld/java/src/main/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java&#010;Wed Oct 17 06:50:01 2012&#010;@@ -54,6 +54,12 @@ public class ImplHelloWorldServer extend&#010; &#009;&#010; &#009;@Override&#010; &#009;public String say_hello(user u){&#010;+&#009;&#009;try {&#010;+&#009;&#009;&#009;Thread.sleep(1000000);&#010;+&#009;&#009;} catch (InterruptedException e) {&#010;+&#009;&#009;&#009;// TODO Auto-generated catch block&#010;+&#009;&#009;&#009;e.printStackTrace();&#010;+&#009;&#009;}&#010; &#009;&#009;return "Hello " + u.name;&#010; &#009;}&#010; &#009;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399114 [3/4] - in /incubator/etch/trunk: binding-cpp/runtime/include/common/ binding-cpp/runtime/include/serialization/ binding-cpp/runtime/include/support/ binding-cpp/runtime/include/transport/ binding-cpp/runtime/include/util/ binding-...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065010.E51D52388A3F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065010-E51D52388A3F@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchTypeTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -59,11 +54,11 @@ TEST_F(EtchTypeTest, putValidatorTest) {&#010;   EtchField f(str2);&#010;   EtchField g(str3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;-  EtchValidatorInt::Get(0, v1);&#010;+  EtchValidatorInt::Get(mRuntime, 0, v1);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorLong::Get(0, v2);&#010;+  EtchValidatorLong::Get(mRuntime, 0, v2);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v3;&#010;-  EtchValidatorByte::Get(0, v3);&#010;+  EtchValidatorByte::Get(mRuntime, 0, v3);&#010;   EXPECT_EQ(t.putValidator(f, v1), ETCH_OK);&#010;   EXPECT_EQ(t.putValidator(g, v2), ETCH_OK);&#010;   EXPECT_EQ(t.putValidator(g, v3), ETCH_OK); //makes a combo generator&#010;@@ -79,7 +74,7 @@ TEST_F(EtchTypeTest, getValidatorTest) {&#010;   EtchField f(str2);&#010;   EtchField g(str3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v;&#010;-  EtchValidatorInt::Get(0, v);&#010;+  EtchValidatorInt::Get(mRuntime, 0, v);&#010;   capu::SmartPointer&lt;EtchValidator&gt; result = NULL;&#010;   t.putValidator(f, v);&#010;   EXPECT_EQ(t.getValidator(f, result), ETCH_OK);&#010;@@ -95,9 +90,9 @@ TEST_F(EtchTypeTest, clearTest) {&#010;   EtchField f(str2);&#010;   EtchField g(str3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;-  EtchValidatorInt::Get(0, v1);&#010;+  EtchValidatorInt::Get(mRuntime, 0, v1);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorLong::Get(0, v2);&#010;+  EtchValidatorLong::Get(mRuntime, 0, v2);&#010;   EXPECT_EQ(t.putValidator(f, v1), ETCH_OK);&#010;   EXPECT_EQ(t.putValidator(g, v2), ETCH_OK);&#010;   EXPECT_EQ(t.clearValidator(f), ETCH_OK);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorBooleanTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorBooleanTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorBooleanTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorBooleanTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -28,16 +28,11 @@ class EtchValidatorBooleanTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -47,7 +42,7 @@ protected:&#010; &#010; TEST_F(EtchValidatorBooleanTest, createTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EXPECT_TRUE(EtchValidatorBoolean::Get(0, val2) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorBoolean::Get(mRuntime, 0, val2) == ETCH_OK);&#010; &#010;   capu::SmartPointer&lt;EtchValidatorBoolean&gt; val = capu::smartpointer_cast&lt;EtchValidatorBoolean&gt;(val2);&#010;   EXPECT_TRUE(val.get() != NULL);&#010;@@ -57,7 +52,7 @@ TEST_F(EtchValidatorBooleanTest, createT&#010;   EtchObjectType type1(EOTID_BOOL, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010; &#010;-  EXPECT_TRUE(EtchValidatorBoolean::Get(2, val2) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorBoolean::Get(mRuntime, 2, val2) == ETCH_OK);&#010;   val = capu::smartpointer_cast&lt;EtchValidatorBoolean&gt;(val2);&#010;   EXPECT_TRUE(val.get() != NULL);&#010;   EXPECT_TRUE(val-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;@@ -70,7 +65,7 @@ TEST_F(EtchValidatorBooleanTest, validat&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; boolean2 = new EtchBool(false);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EXPECT_TRUE(EtchValidatorBoolean::Get(0, val2) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorBoolean::Get(mRuntime, 0, val2) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidatorBoolean&gt; val = capu::smartpointer_cast&lt;EtchValidatorBoolean&gt;(val2);&#010;   EXPECT_FALSE(val-&gt;validate(boolean));&#010;   EXPECT_FALSE(val-&gt;validate(integer));&#010;@@ -84,7 +79,7 @@ TEST_F(EtchValidatorBooleanTest, validat&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; boolean2 = new EtchBool(false);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EXPECT_TRUE(EtchValidatorBoolean::Get(0, val2) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorBoolean::Get(mRuntime, 0, val2) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidatorBoolean&gt; val = capu::smartpointer_cast&lt;EtchValidatorBoolean&gt;(val2);&#010;   EXPECT_TRUE(val-&gt;validateValue(boolean, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(val-&gt;validateValue(integer, result) == ETCH_ERROR);&#010;@@ -93,7 +88,7 @@ TEST_F(EtchValidatorBooleanTest, validat&#010; &#010; TEST_F(EtchValidatorBooleanTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EXPECT_TRUE(EtchValidatorBoolean::Get(1, val2) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorBoolean::Get(mRuntime, 1, val2) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidatorBoolean&gt; val = capu::smartpointer_cast&lt;EtchValidatorBoolean&gt;(val2);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; element_validator;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorByteTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorByteTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorByteTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorByteTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchValidatorByteTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -48,14 +43,14 @@ TEST_F(EtchValidatorByteTest, createTest&#010;   capu::SmartPointer&lt;EtchValidatorByte&gt; ptr = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorByte::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorByte::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorByte&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchByte::TYPE()));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 0);&#010; &#010;   EtchObjectType type1(EOTID_BYTE, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  EXPECT_TRUE(EtchValidatorByte::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorByte::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorByte&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -82,7 +77,7 @@ TEST_F(EtchValidatorByteTest, validateTe&#010;   capu::SmartPointer&lt;EtchObject&gt; str = new EtchString();&#010;   capu::SmartPointer&lt;EtchObject&gt; byte2 = new EtchByte(3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorByte::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorByte::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;   EXPECT_TRUE(ptr-&gt;validate(integer));&#010;@@ -110,11 +105,11 @@ TEST_F(EtchValidatorByteTest, validateVa&#010;   capu::SmartPointer&lt;EtchObject&gt; integer3 = new EtchInt32(127);&#010;   capu::SmartPointer&lt;EtchObject&gt; byte2 = new EtchByte(3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorByte::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorByte::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchByte*) result.get())-&gt;get() == ((EtchInt32*) integer.get())-&gt;get());&#010;-  &#010;+&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer2, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchByte*) result.get())-&gt;get() == ((EtchInt32*) integer2.get())-&gt;get());&#010; &#010;@@ -128,7 +123,7 @@ TEST_F(EtchValidatorByteTest, validateVa&#010; &#010; TEST_F(EtchValidatorByteTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorByte::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorByte::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -49,16 +49,11 @@ class EtchValidatorCustomTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -71,7 +66,7 @@ TEST_F(EtchValidatorCustomTest, createTe&#010; &#010;   status_t status;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  status = EtchValidatorCustom::Get(0, MockGeneratedClass::TYPE(), true, val);&#010;+  status = EtchValidatorCustom::Get(mRuntime, 0, MockGeneratedClass::TYPE(), true, val);&#010;   EXPECT_EQ(ETCH_OK, status);&#010; &#010;   ptr = (EtchValidatorCustom*)val.get();&#010;@@ -81,7 +76,7 @@ TEST_F(EtchValidatorCustomTest, createTe&#010; &#010;   EtchObjectType type1(99, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  status = EtchValidatorCustom::Get(2, MockGeneratedClass::TYPE(), true, val);&#010;+  status = EtchValidatorCustom::Get(mRuntime, 2, MockGeneratedClass::TYPE(), true, val);&#010;   EXPECT_EQ(ETCH_OK, status);&#010; &#010;   ptr = (EtchValidatorCustom*) val.get();&#010;@@ -115,7 +110,7 @@ TEST_F(EtchValidatorCustomTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; generatedClass = new MockGeneratedClass();&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  status = EtchValidatorCustom::Get(0, MockGeneratedClass::TYPE(), true, val);&#010;+  status = EtchValidatorCustom::Get(mRuntime, 0, MockGeneratedClass::TYPE(), true, val);&#010;   EXPECT_EQ(ETCH_OK, status);&#010; &#010;   EXPECT_FALSE(val-&gt;validate(byte));&#010;@@ -149,7 +144,7 @@ TEST_F(EtchValidatorCustomTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; generatedClass = new MockGeneratedClass();&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  status = EtchValidatorCustom::Get(0, MockGeneratedClass::TYPE(), true, val);&#010;+  status = EtchValidatorCustom::Get(mRuntime, 0, MockGeneratedClass::TYPE(), true, val);&#010;   EXPECT_EQ(ETCH_OK, status);&#010; &#010;   EXPECT_TRUE(val-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;@@ -166,7 +161,7 @@ TEST_F(EtchValidatorCustomTest, elementV&#010;   status_t status;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010; &#010;-  status = EtchValidatorCustom::Get(1, MockGeneratedClass::TYPE(), true, ptr);&#010;+  status = EtchValidatorCustom::Get(mRuntime, 1, MockGeneratedClass::TYPE(), true, ptr);&#010;   EXPECT_EQ(ETCH_OK, status);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; element_validator;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchValidatorDoubleTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -48,7 +43,7 @@ TEST_F(EtchValidatorDoubleTest, createTe&#010;   capu::SmartPointer&lt;EtchValidatorDouble&gt; ptr = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorDouble::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorDouble::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorDouble&gt;(val);&#010; &#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchDouble::TYPE()));&#010;@@ -57,7 +52,7 @@ TEST_F(EtchValidatorDoubleTest, createTe&#010;   EtchObjectType type1(EOTID_DOUBLE, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010; &#010;-  EXPECT_TRUE(EtchValidatorDouble::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorDouble::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorDouble&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -76,7 +71,7 @@ TEST_F(EtchValidatorDoubleTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; str = new EtchString();&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorDouble::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorDouble::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010; &#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;@@ -96,7 +91,7 @@ TEST_F(EtchValidatorDoubleTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; doubleTmp2 = new EtchDouble(5.13);&#010;   capu::SmartPointer&lt;EtchObject&gt; doubleTmp3 = new EtchDouble(127.54);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorDouble::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorDouble::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(doubleTmp, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchDouble*) result.get())-&gt;get() == ((EtchDouble*) doubleTmp.get())-&gt;get());&#010;@@ -108,7 +103,7 @@ TEST_F(EtchValidatorDoubleTest, validate&#010; &#010; TEST_F(EtchValidatorDoubleTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorDouble::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorDouble::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -28,16 +28,11 @@ class EtchValidatorFloatTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -49,7 +44,7 @@ TEST_F(EtchValidatorFloatTest, createTes&#010;   capu::SmartPointer&lt;EtchValidatorFloat&gt; ptr = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorFloat::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorFloat::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorFloat&gt;(val);&#010; &#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchFloat::TYPE()));&#010;@@ -58,7 +53,7 @@ TEST_F(EtchValidatorFloatTest, createTes&#010;   EtchObjectType type1(EOTID_FLOAT, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010; &#010;-  EXPECT_TRUE(EtchValidatorFloat::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorFloat::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorFloat&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -76,7 +71,7 @@ TEST_F(EtchValidatorFloatTest, validateT&#010;   capu::SmartPointer&lt;EtchObject&gt; str = new EtchString();&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorFloat::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorFloat::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010; &#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;@@ -95,7 +90,7 @@ TEST_F(EtchValidatorFloatTest, validateV&#010;   capu::SmartPointer&lt;EtchObject&gt; floatTmp2 = new EtchFloat(static_cast&lt;capu::float_t&gt;(5.13));&#010;   capu::SmartPointer&lt;EtchObject&gt; floatTmp3 = new EtchFloat(static_cast&lt;capu::float_t&gt;(127.54));&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorFloat::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorFloat::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(floatTmp, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchFloat*) result.get())-&gt;get() == ((EtchFloat*) floatTmp.get())-&gt;get());&#010;@@ -107,7 +102,7 @@ TEST_F(EtchValidatorFloatTest, validateV&#010; &#010; TEST_F(EtchValidatorFloatTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorFloat::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorFloat::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchValidatorIntTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -47,14 +42,14 @@ protected:&#010; TEST_F(EtchValidatorIntTest, createTest) {&#010;   capu::SmartPointer&lt;EtchValidatorInt&gt; ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorInt::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorInt::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorInt&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchInt32::TYPE()));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 0);&#010; &#010;   EtchObjectType type1(EOTID_INT32, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  EXPECT_TRUE(EtchValidatorInt::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorInt::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorInt&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -90,7 +85,7 @@ TEST_F(EtchValidatorIntTest, validateTes&#010;   capu::SmartPointer&lt;EtchObject&gt; byte4 = new EtchByte(32);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorInt::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorInt::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;   EXPECT_FALSE(ptr-&gt;validate(str));&#010;@@ -121,7 +116,7 @@ TEST_F(EtchValidatorIntTest, validateVal&#010;   capu::SmartPointer&lt;EtchObject&gt; integer3 = new EtchInt32(127);&#010;   capu::SmartPointer&lt;EtchObject&gt; byte2 = new EtchByte(3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorInt::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorInt::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchInt32*) result.get())-&gt;get() == ((EtchInt32*) integer.get())-&gt;get());&#010;@@ -138,7 +133,7 @@ TEST_F(EtchValidatorIntTest, validateVal&#010; &#010; TEST_F(EtchValidatorIntTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorInt::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorInt::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchValidatorLongTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -48,7 +43,7 @@ TEST_F(EtchValidatorLongTest, createTest&#010;   capu::SmartPointer&lt;EtchValidatorLong&gt; ptr = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorLong::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorLong::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorLong&gt;(val);&#010; &#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchLong::TYPE()));&#010;@@ -56,7 +51,7 @@ TEST_F(EtchValidatorLongTest, createTest&#010; &#010;   EtchObjectType type1(EOTID_LONG, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  EXPECT_TRUE(EtchValidatorLong::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorLong::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorLong&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -91,7 +86,7 @@ TEST_F(EtchValidatorLongTest, validateTe&#010;   capu::SmartPointer&lt;EtchObject&gt; byte3 = new EtchByte(capu::NumericLimitMin&lt;capu::int8_t&gt;());&#010;   capu::SmartPointer&lt;EtchObject&gt; byte4 = new EtchByte(32);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorLong::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorLong::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;   EXPECT_FALSE(ptr-&gt;validate(str));&#010;@@ -122,7 +117,7 @@ TEST_F(EtchValidatorLongTest, validateVa&#010;   capu::SmartPointer&lt;EtchObject&gt; integer3 = new EtchInt32(127);&#010;   capu::SmartPointer&lt;EtchObject&gt; byte2 = new EtchByte(3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorLong::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorLong::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchLong*) result.get())-&gt;get() == ((EtchInt32*) integer.get())-&gt;get());&#010;@@ -136,7 +131,7 @@ TEST_F(EtchValidatorLongTest, validateVa&#010; &#010; TEST_F(EtchValidatorLongTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorLong::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorLong::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -35,16 +35,11 @@ class EtchValidatorObjectTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -55,11 +50,11 @@ protected:&#010; TEST_F(EtchValidatorObjectTest, createTest) {&#010;   capu::SmartPointer&lt;EtchValidatorObject&gt; ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorObject::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorObject::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorObject&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 0);&#010; &#010;-  EXPECT_TRUE(EtchValidatorObject::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorObject::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorObject&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010; }&#010;@@ -69,7 +64,7 @@ TEST_F(EtchValidatorObjectTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; boolean2 = new EtchBool(false);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorObject::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorObject::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010;   EXPECT_FALSE(ptr-&gt;validate(boolean));&#010;   EXPECT_TRUE(ptr-&gt;validate(integer));&#010;@@ -108,7 +103,7 @@ TEST_F(EtchValidatorObjectTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; byte4 = new EtchByte(32);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorObject::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorObject::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(str, result) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(longInteger5, result) == ETCH_OK);&#010;@@ -133,7 +128,7 @@ TEST_F(EtchValidatorObjectTest, validate&#010; &#010; TEST_F(EtchValidatorObjectTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorObject::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorObject::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorRuntimeExceptionTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorRuntimeExceptionTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorRuntimeExceptionTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorRuntimeExceptionTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -28,16 +28,11 @@ class EtchValidatorRuntimeExceptionTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -48,7 +43,7 @@ protected:&#010; TEST_F(EtchValidatorRuntimeExceptionTest, createTest) {&#010;   capu::SmartPointer&lt;EtchValidatorRuntimeException&gt; ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorRuntimeException::Get(val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorRuntimeException::Get(mRuntime, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorRuntimeException&gt;(val);&#010; }&#010; &#010;@@ -58,7 +53,7 @@ TEST_F(EtchValidatorRuntimeExceptionTest&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; exc = new EtchRuntimeException(excepmess, ETCH_ERROR);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorRuntimeException::Get(ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorRuntimeException::Get(mRuntime, ptr) == ETCH_OK);&#010;   EXPECT_FALSE(ptr-&gt;validate(boolean));&#010;   EXPECT_FALSE(ptr-&gt;validate(integer));&#010;   EXPECT_TRUE(ptr-&gt;validate(exc));&#010;@@ -73,7 +68,7 @@ TEST_F(EtchValidatorRuntimeExceptionTest&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; exc = new EtchRuntimeException(excepmess, ETCH_ERROR);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorRuntimeException::Get(ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorRuntimeException::Get(mRuntime, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(boolean, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(exc, result) == ETCH_OK);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchValidatorShortTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -47,14 +42,14 @@ protected:&#010; TEST_F(EtchValidatorShortTest, createTest) {&#010;   capu::SmartPointer&lt;EtchValidatorShort&gt; ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorShort::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorShort::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorShort&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchShort::TYPE()));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 0);&#010; &#010;   EtchObjectType type1(EOTID_SHORT, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  EXPECT_TRUE(EtchValidatorShort::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorShort::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorShort&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -91,7 +86,7 @@ TEST_F(EtchValidatorShortTest, validateT&#010;   capu::SmartPointer&lt;EtchObject&gt; byte3 = new EtchByte(capu::NumericLimitMin&lt;capu::int8_t&gt;());&#010;   capu::SmartPointer&lt;EtchObject&gt; byte4 = new EtchByte(32);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorShort::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorShort::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(ptr))-&gt;getNDims() == 0);&#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;   EXPECT_FALSE(ptr-&gt;validate(str));&#010;@@ -123,7 +118,7 @@ TEST_F(EtchValidatorShortTest, validateV&#010;   capu::SmartPointer&lt;EtchObject&gt; integer3 = new EtchInt32(127);&#010;   capu::SmartPointer&lt;EtchObject&gt; byte2 = new EtchByte(3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorShort::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorShort::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer, result) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchShort*) result.get())-&gt;get() == ((EtchInt32*) integer.get())-&gt;get());&#010;@@ -137,7 +132,7 @@ TEST_F(EtchValidatorShortTest, validateV&#010; &#010; TEST_F(EtchValidatorShortTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorShort::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorShort::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStringTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStringTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStringTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStringTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,16 +27,11 @@ class EtchValidatorStringTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -48,7 +43,7 @@ TEST_F(EtchValidatorStringTest, createTe&#010;   capu::SmartPointer&lt;EtchValidatorString&gt; ptr = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EXPECT_TRUE(EtchValidatorString::Get(0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorString::Get(mRuntime, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorString&gt;(val);&#010; &#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchString::TYPE()));&#010;@@ -56,7 +51,7 @@ TEST_F(EtchValidatorStringTest, createTe&#010; &#010;   EtchObjectType type1(EOTID_STRING, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  EXPECT_TRUE(EtchValidatorString::Get(2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorString::Get(mRuntime, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorString&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010;@@ -68,7 +63,7 @@ TEST_F(EtchValidatorStringTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; str2 = new EtchString("hello");&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorString::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorString::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchTypeValidator*) ptr.get())-&gt;getNDims() == 0);&#010;   EXPECT_FALSE(ptr-&gt;validate(str));&#010;   EXPECT_FALSE(ptr-&gt;validate(integer));&#010;@@ -81,7 +76,7 @@ TEST_F(EtchValidatorStringTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(4);&#010;   capu::SmartPointer&lt;EtchObject&gt; str2 = new EtchString("hello");&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorString::Get(0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorString::Get(mRuntime, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(str, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(integer, result) == ETCH_ERROR);&#010;   EXPECT_TRUE(ptr-&gt;validateValue(str2, result) == ETCH_OK);&#010;@@ -90,7 +85,7 @@ TEST_F(EtchValidatorStringTest, validate&#010; &#010; TEST_F(EtchValidatorStringTest, elementValidatorTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  EXPECT_TRUE(EtchValidatorString::Get(1, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorString::Get(mRuntime, 1, ptr) == ETCH_OK);&#010;   capu::SmartPointer&lt;EtchValidator&gt; elementValidator;&#010;   ptr-&gt;getElementValidator(elementValidator);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -79,16 +79,11 @@ class EtchValidatorStructValueTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -102,7 +97,7 @@ TEST_F(EtchValidatorStructValueTest, cre&#010;   capu::SmartPointer&lt;EtchValidatorStructValue&gt; ptr = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EXPECT_TRUE(EtchValidatorStructValue::Get(type, 0, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorStructValue::Get(mRuntime, type, 0, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorStructValue&gt;(val);&#010; &#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(EtchStructValue::TYPE()));&#010;@@ -111,12 +106,12 @@ TEST_F(EtchValidatorStructValueTest, cre&#010;   EtchObjectType type1(EOTID_STRUCT_VALUE, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010; &#010;-  EXPECT_TRUE(EtchValidatorStructValue::Get(type, 2, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorStructValue::Get(mRuntime, type, 2, val) == ETCH_OK);&#010;   ptr = capu::smartpointer_cast&lt;EtchValidatorStructValue&gt;(val);&#010;   EXPECT_TRUE(ptr-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE(ptr-&gt;getNDims() == 2);&#010; &#010;-  EXPECT_TRUE(EtchValidatorStructValue::Get(type, 12, val) == ETCH_EINVAL);&#010;+  EXPECT_TRUE(EtchValidatorStructValue::Get(mRuntime, type, 12, val) == ETCH_EINVAL);&#010;   delete type;&#010; }&#010; &#010;@@ -129,7 +124,7 @@ TEST_F(EtchValidatorStructValueTest, ele&#010; &#010;   EtchObjectType type1(EOTID_STRUCT_VALUE, NULL);&#010;   EtchObjectType type2(EOTID_NATIVE_ARRAY, &amp;type1);&#010;-  EXPECT_TRUE(EtchValidatorStructValue::Get(type, 1, val) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorStructValue::Get(mRuntime, type, 1, val) == ETCH_OK);&#010;   EXPECT_TRUE(val.get() != NULL);&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(val))-&gt;getExpectedType()-&gt;equals(&amp;type2));&#010;   EXPECT_TRUE((capu::smartpointer_cast&lt;EtchTypeValidator&gt;(val))-&gt;getNDims() == 1);&#010;@@ -197,7 +192,7 @@ TEST_F(EtchValidatorStructValueTest, val&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;   MockValueFactory8 *fac = new MockValueFactory8();&#010; &#010;-  EXPECT_TRUE(EtchValidatorStructValue::Get(type, 0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorStructValue::Get(mRuntime, type, 0, ptr) == ETCH_OK);&#010; &#010;   capu::SmartPointer&lt;EtchObject&gt; byte = NULL;&#010; &#010;@@ -264,7 +259,7 @@ TEST_F(EtchValidatorStructValueTest, val&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;   MockValueFactory8 *fac = new MockValueFactory8();&#010; &#010;-  EXPECT_TRUE(EtchValidatorStructValue::Get(type, 0, ptr) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchValidatorStructValue::Get(mRuntime, type, 0, ptr) == ETCH_OK);&#010;   EXPECT_TRUE(((EtchTypeValidator*)ptr.get())-&gt;getExpectedType()-&gt;equals(EtchStructValue::TYPE()));&#010;   EXPECT_TRUE(((EtchTypeValidator*)ptr.get())-&gt;getNDims() == 0);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -83,8 +83,8 @@ public:&#010;    */&#010; public:&#010; &#010;-  MockDefaultValueFactory2(EtchString uri) {&#010;-    EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  MockDefaultValueFactory2(EtchRuntime* runtime, EtchString uri) {&#010;+    EtchDefaultValueFactory::Init(runtime, &amp;types, &amp;class2type);&#010;     factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;   }&#010; &#010;@@ -99,16 +99,12 @@ class EtchRemoteBaseTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;+&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -121,15 +117,15 @@ TEST_F(EtchRemoteBaseTest, constructorTe&#010;   MockTransport2 *transport = new MockTransport2();&#010;   MockDefaultValueFactory2 *factory;&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new MockDefaultValueFactory2(uri);&#010;+  factory = new MockDefaultValueFactory2(mRuntime, uri);&#010;   //created value factory&#010;   EtchURL u(uri);&#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010;   EtchDeliveryService * service = NULL;&#010;-  service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;+  service = new EtchDefaultDeliveryService(mRuntime, manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010;+  remote = new EtchRemoteBase(mRuntime, service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -147,16 +143,16 @@ TEST_F(EtchRemoteBaseTest, newMessageTes&#010;   MockTransport2 *transport = new MockTransport2();&#010;   MockDefaultValueFactory2 *factory;&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new MockDefaultValueFactory2(uri);&#010;+  factory = new MockDefaultValueFactory2(mRuntime, uri);&#010;   //created value factory&#010;   EtchURL u(uri);&#010; &#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010;   EtchDeliveryService * service = NULL;&#010;-  service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;+  service = new EtchDefaultDeliveryService(mRuntime, manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010;+  remote = new EtchRemoteBase(mRuntime, service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -187,16 +183,16 @@ TEST_F(EtchRemoteBaseTest, sendTest) {&#010;   MockTransport2 *transport = new MockTransport2();&#010;   MockDefaultValueFactory2 *factory;&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new MockDefaultValueFactory2(uri);&#010;+  factory = new MockDefaultValueFactory2(mRuntime, uri);&#010;   //created value factory&#010;   EtchURL u(uri);&#010; &#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010;   EtchDeliveryService * service = NULL;&#010;-  service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;+  service = new EtchDefaultDeliveryService(mRuntime, manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010;+  remote = new EtchRemoteBase(mRuntime, service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -204,7 +200,7 @@ TEST_F(EtchRemoteBaseTest, sendTest) {&#010; &#010;   //get the validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;   //create type&#010;   EtchType *mt;&#010;   factory-&gt;types.get("add", mt);&#010;@@ -232,16 +228,16 @@ TEST_F(EtchRemoteBaseTest, beginCallTest&#010;   MockTransport2 *transport = new MockTransport2();&#010;   MockDefaultValueFactory2 *factory;&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new MockDefaultValueFactory2(uri);&#010;+  factory = new MockDefaultValueFactory2(mRuntime, uri);&#010;   //created value factory&#010;   EtchURL u(uri);&#010; &#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010;   EtchDeliveryService * service = NULL;&#010;-  service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;+  service = new EtchDefaultDeliveryService(mRuntime, manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010;+  remote = new EtchRemoteBase(mRuntime, service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -249,7 +245,7 @@ TEST_F(EtchRemoteBaseTest, beginCallTest&#010; &#010;   //get the validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;   //create type&#010;   EtchType *mt;&#010;   factory-&gt;types.get("add", mt);&#010;@@ -282,16 +278,16 @@ TEST_F(EtchRemoteBaseTest, endCallTest) &#010;   MockTransport2 *transport = new MockTransport2();&#010;   MockDefaultValueFactory2 *factory;&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new MockDefaultValueFactory2(uri);&#010;+  factory = new MockDefaultValueFactory2(mRuntime, uri);&#010;   //created value factory&#010;   EtchURL u(uri);&#010; &#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010;   EtchDeliveryService * service = NULL;&#010;-  service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;+  service = new EtchDefaultDeliveryService(mRuntime, manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010;+  remote = new EtchRemoteBase(mRuntime, service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -301,7 +297,7 @@ TEST_F(EtchRemoteBaseTest, endCallTest) &#010;   EtchType * type;&#010;   EtchType * replyType;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add_result", replyType);&#010;   factory-&gt;types.get("add", type);&#010;@@ -341,7 +337,7 @@ TEST_F(EtchRemoteBaseTest, endCallTest) &#010;   EXPECT_TRUE(result == data);&#010; &#010;   factory-&gt;types.clear();&#010;-  &#010;+&#010;   delete transport;&#010;   delete mail;&#010;   delete remote;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -19,14 +19,20 @@&#010; #include "gmock/gmock.h"&#010; #include "support/EtchRuntime.h"&#010; &#010;+capu::uint64_t currentIdCount;&#010;+&#010; TEST(EtchRuntime, Default) {&#010;-  EtchRuntime* runtime = new EtchRuntime();&#010;+  EtchRuntime* runtime = new EtchRuntime(); //ID = 0&#010;+  currentIdCount = runtime-&gt;getId();&#010;   delete runtime;&#010; }&#010; &#010; TEST(EtchRuntime, getId) {&#010;-  EtchRuntime* runtime = new EtchRuntime();&#010;-  capu::uint64_t id = runtime-&gt;getId();&#010;+  EtchRuntime* runtime = new EtchRuntime(); //ID = 1&#010;+  EXPECT_EQ(currentIdCount + 1, runtime-&gt;getId());&#010;+  delete runtime;&#010;+  runtime = new EtchRuntime(); //ID = 2&#010;+  EXPECT_EQ(currentIdCount + 2, runtime-&gt;getId());&#010;   delete runtime;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -28,7 +28,7 @@&#010; class MockSession1 : public EtchSessionMessage {&#010; public:&#010; &#010;-  MockSession1(EtchTransportMessage* transport) &#010;+  MockSession1(EtchTransportMessage* transport)&#010;     : mTransport(transport) {&#010;     if(mTransport != NULL) {&#010;       mTransport-&gt;setSession(this);&#010;@@ -96,8 +96,8 @@ public:&#010;    */&#010; public:&#010; &#010;-  MockDefaultValueFactory1(EtchString uri) {&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  MockDefaultValueFactory1(EtchRuntime* runtime, EtchString uri) {&#010;+  EtchDefaultValueFactory::Init(runtime, &amp;types, &amp;class2type);&#010;   factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;   }&#010; &#010;@@ -112,16 +112,11 @@ class EtchDefaultDeliveryServiceTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -136,8 +131,8 @@ TEST_F(EtchDefaultDeliveryServiceTest, c&#010; // create mock layer for transport&#010;   MockTransport1* transport = new MockTransport1();&#010; &#010;-  EtchPlainMailboxManager* mailboxManager = new EtchPlainMailboxManager(transport, uri, NULL);&#010;-  EtchDefaultDeliveryService* deliveryService = new EtchDefaultDeliveryService(mailboxManager, uri);&#010;+  EtchPlainMailboxManager* mailboxManager = new EtchPlainMailboxManager(mRuntime, transport, uri, NULL);&#010;+  EtchDefaultDeliveryService* deliveryService = new EtchDefaultDeliveryService(mRuntime, mailboxManager, uri);&#010; &#010;   // create mock layer for session&#010;   MockSession1* session = new MockSession1(deliveryService);&#010;@@ -151,11 +146,11 @@ TEST_F(EtchDefaultDeliveryServiceTest, b&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010; &#010;   // create value factory&#010;-  MockDefaultValueFactory1* factory = new MockDefaultValueFactory1(uri);&#010;+  MockDefaultValueFactory1* factory = new MockDefaultValueFactory1(mRuntime, uri);&#010;   //set type and corresponding validator&#010;   EtchType * type = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add", type);&#010;   type-&gt;putValidator(EtchDefaultValueFactory::_mf__messageId(), val);&#010;@@ -170,8 +165,8 @@ TEST_F(EtchDefaultDeliveryServiceTest, b&#010;   // create mock layer for transport&#010;   MockTransport1* transport = new MockTransport1();&#010; &#010;-  EtchPlainMailboxManager* mailboxManager = new EtchPlainMailboxManager(transport, uri, NULL);&#010;-  EtchDefaultDeliveryService* deliveryService = new EtchDefaultDeliveryService(mailboxManager, uri);&#010;+  EtchPlainMailboxManager* mailboxManager = new EtchPlainMailboxManager(mRuntime, transport, uri, NULL);&#010;+  EtchDefaultDeliveryService* deliveryService = new EtchDefaultDeliveryService(mRuntime, mailboxManager, uri);&#010; &#010;   // create mock layer for session&#010;   MockSession1* session = new MockSession1(deliveryService);&#010;@@ -182,7 +177,7 @@ TEST_F(EtchDefaultDeliveryServiceTest, b&#010;   //test begincall&#010;   EtchMailbox *mail = NULL;&#010;   EXPECT_TRUE(ETCH_OK == deliveryService-&gt;begincall(message, mail));&#010;-  EXPECT_EQ(1, mailboxManager-&gt;count());&#010;+  EXPECT_EQ(1u, mailboxManager-&gt;count());&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK != message-&gt;getInReplyToMessageId(id));&#010; &#010;@@ -203,13 +198,13 @@ TEST_F(EtchDefaultDeliveryServiceTest, e&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010; &#010;   // create value factory&#010;-  MockDefaultValueFactory1* factory = new MockDefaultValueFactory1(uri);&#010;+  MockDefaultValueFactory1* factory = new MockDefaultValueFactory1(mRuntime, uri);&#010; &#010;   //set type and return type and the corresponding validators&#010;   EtchType * type = NULL;&#010;   EtchType * replyType = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add_result", replyType);&#010;   factory-&gt;types.get("add", type);&#010;@@ -228,8 +223,8 @@ TEST_F(EtchDefaultDeliveryServiceTest, e&#010;   // create mock layer for transport&#010;   MockTransport1* transport = new MockTransport1();&#010; &#010;-  EtchPlainMailboxManager* mailboxManager = new EtchPlainMailboxManager(transport, uri, NULL);&#010;-  EtchDefaultDeliveryService* deliveryService = new EtchDefaultDeliveryService(mailboxManager, uri);&#010;+  EtchPlainMailboxManager* mailboxManager = new EtchPlainMailboxManager(mRuntime, transport, uri, NULL);&#010;+  EtchDefaultDeliveryService* deliveryService = new EtchDefaultDeliveryService(mRuntime, mailboxManager, uri);&#010; &#010;   // create mock layer for session&#010;   MockSession1* session = new MockSession1(deliveryService);&#010;@@ -240,7 +235,7 @@ TEST_F(EtchDefaultDeliveryServiceTest, e&#010;   //performed the call&#010;   EtchMailbox *mail;&#010;   EXPECT_TRUE(ETCH_OK == deliveryService-&gt;begincall(message, mail));&#010;-  EXPECT_EQ(1, mailboxManager-&gt;count());&#010;+  EXPECT_EQ(1u, mailboxManager-&gt;count());&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK != message-&gt;getInReplyToMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK == mailboxManager-&gt;getMailbox(id, mail));&#010;@@ -264,7 +259,7 @@ TEST_F(EtchDefaultDeliveryServiceTest, e&#010;   status = deliveryService-&gt;endcall(mail, replyType, result);&#010;   EXPECT_EQ(ETCH_OK, status);&#010;   delete mail;&#010;-  &#010;+&#010;   //check the result&#010;   EXPECT_TRUE(result-&gt;equals(data.get()));&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -77,21 +77,15 @@ class EtchMessageTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010; &#010;   }&#010;-private:&#010;   EtchRuntime* mRuntime;&#010; };&#010; &#010;@@ -128,9 +122,9 @@ TEST_F(EtchMessageTest, getTypeTest) {&#010; &#010;   //fill validators&#010;   capu::SmartPointer&lt;EtchValidator&gt; val1;&#010;-  EtchValidatorBoolean::Get(0, val1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val1);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EtchValidatorBoolean::Get(0, val2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val2);&#010;   comp-&gt;putValidator(field1, val1);&#010;   comp-&gt;putValidator(field2, val2);&#010; &#010;@@ -154,9 +148,9 @@ TEST_F(EtchMessageTest, isType) {&#010;   EtchType* comp = new EtchType(90, "comp");&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val1;&#010;-  EtchValidatorBoolean::Get(0, val1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val1);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EtchValidatorBoolean::Get(0, val2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val2);&#010;   comp-&gt;putValidator(field1, val1);&#010;   comp-&gt;putValidator(field2, val2);&#010;   //Create Value Factory&#010;@@ -187,9 +181,9 @@ TEST_F(EtchMessageTest, putTest) {&#010;   EtchType* comp = new EtchType(90, typeName);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val1;&#010;-  EtchValidatorBoolean::Get(0, val1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val1);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EtchValidatorBoolean::Get(0, val2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val2);&#010;   comp-&gt;putValidator(field1, val1);&#010;   comp-&gt;putValidator(field2, val2);&#010; &#010;@@ -226,9 +220,9 @@ TEST_F(EtchMessageTest, getTest) {&#010;   EtchType* comp = new EtchType(90, typeName);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val1;&#010;-  EtchValidatorBoolean::Get(0, val1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val1);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val2;&#010;-  EtchValidatorBoolean::Get(0, val2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val2);&#010;   comp-&gt;putValidator(field1, val1);&#010;   comp-&gt;putValidator(field2, val2);&#010; &#010;@@ -265,7 +259,7 @@ TEST_F(EtchMessageTest, removeTest) {&#010;   EtchType* comp = new EtchType(90, typeName);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val1;&#010;-  EtchValidatorBoolean::Get(0, val1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val1);&#010;   comp-&gt;putValidator(field1, val1);&#010; &#010;   EtchMessage *sv = new EtchMessage(comp, factory);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -30,7 +30,7 @@&#010; class MockListener11 : public virtual EtchSessionListener&lt;EtchSocket&gt; {&#010; public:&#010; &#010;-  MockListener11(EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt;* transport) &#010;+  MockListener11(EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt;* transport)&#010;     : mTransport(transport) {&#010;     if(mTransport != NULL) {&#010;       mTransport-&gt;setSession(this);&#010;@@ -77,60 +77,55 @@ public:&#010;   status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;     return ETCH_OK;&#010;   }&#010;-};&#010;-&#010;-class EtchMessagizerTest&#010;-  : public ::testing::Test {&#010;-protected:&#010;-  virtual void SetUp() {&#010;-    mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;-    mRuntime-&gt;start();&#010;-  }&#010;-&#010;-  virtual void TearDown() {&#010;-    mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;-    delete mRuntime;&#010;-    mRuntime = NULL;&#010;-  }&#010;-&#010;-  EtchRuntime* mRuntime;&#010;-};&#010;-&#010;-TEST_F(EtchMessagizerTest, constructorTest) {&#010;-  EtchTypeMap types;&#010;-  EtchClass2TypeMap class2type;&#010;-  EtchDefaultValueFactory * factory;&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;-  EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;-  //created value factory&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;-  EtchResources r;&#010;-  EtchObject *out;&#010;+};&#010;+&#010;+class EtchMessagizerTest&#010;+  : public ::testing::Test {&#010;+protected:&#010;+  virtual void SetUp() {&#010;+    mRuntime = new EtchRuntime();&#010;+    mRuntime-&gt;start();&#010;+  }&#010;+&#010;+  virtual void TearDown() {&#010;+    mRuntime-&gt;shutdown();&#010;+    delete mRuntime;&#010;+    mRuntime = NULL;&#010;+  }&#010;+&#010;+  EtchRuntime* mRuntime;&#010;+};&#010;+&#010;+TEST_F(EtchMessagizerTest, constructorTest) {&#010;+  EtchTypeMap types;&#010;+  EtchClass2TypeMap class2type;&#010;+  EtchDefaultValueFactory * factory;&#010;+  EtchDefaultValueFactory::Init(mRuntime, &amp;types, &amp;class2type);&#010;+  EtchString uri("tcp://127.0.0.1:4001");&#010;+  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;+  //created value factory&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;+  EtchResources r;&#010;+  EtchObject *out;&#010;   r.put(EtchTransport&lt;EtchSessionMessage&gt;::VALUE_FACTORY(), factory, out);&#010;-  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchTransportPacket* pac = new EtchPacketizer(conn, &amp;u);&#010;-  EtchSessionPacket* mes = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;-  &#010;+  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;+  EtchTransportPacket* pac = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;+  EtchSessionPacket* mes = new EtchMessagizer(mRuntime, pac, &amp;u, &amp;r);&#010;+&#010;   //Delete created stack&#010;   delete conn;&#010;   delete mes;&#010;   delete pac;&#010;-  delete factory;&#010;-  types.clear();&#010;-}&#010;-&#010;+  delete factory;&#010;+  types.clear();&#010;+}&#010;+&#010; TEST_F(EtchMessagizerTest, TransportControlTest) {&#010;   EtchTypeMap types;&#010;   EtchClass2TypeMap class2type;&#010;   EtchDefaultValueFactory * factory;&#010;   MockMailboxManager manager;&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, &amp;types, &amp;class2type);&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;   //created value factory&#010;@@ -138,36 +133,36 @@ TEST_F(EtchMessagizerTest, TransportCont&#010;   EtchResources r;&#010;   EtchObject *out;&#010;   r.put(EtchTransport&lt;EtchSessionMessage&gt;::VALUE_FACTORY(), factory, out);&#010;-  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchPacketizer* pac = new EtchPacketizer(conn, &amp;u);&#010;-  EtchMessagizer* mess = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;+  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;+  EtchPacketizer* pac = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;+  EtchMessagizer* mess = new EtchMessagizer(mRuntime, pac, &amp;u, &amp;r);&#010;   mess-&gt;setSession(&amp;manager);&#010; &#010;-  EtchTcpListener* transport = new EtchTcpListener(&amp;u);&#010;+  EtchTcpListener* transport = new EtchTcpListener(mRuntime, &amp;u);&#010;   EtchSessionListener&lt;EtchSocket&gt;* mSessionListener = new MockListener11(transport);&#010; &#010;   transport-&gt;transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));&#010;-  &#010;+&#010;   mess-&gt;transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP()), new EtchInt32(1000));&#010;   //test transport commands&#010;   mess-&gt;transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));&#010; &#010;   transport-&gt;transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));&#010;-&#010;+&#010;   delete conn;&#010;   delete mSessionListener;&#010;   delete pac;&#010;   delete mess;&#010;-  delete factory;&#010;-  types.clear();&#010;-}&#010;-&#010;-TEST_F(EtchMessagizerTest, TransportMessageTest) {&#010;-  EtchTypeMap types;&#010;-  EtchClass2TypeMap class2type;&#010;-  EtchDefaultValueFactory * factory;&#010;+  delete factory;&#010;+  types.clear();&#010;+}&#010;+&#010;+TEST_F(EtchMessagizerTest, TransportMessageTest) {&#010;+  EtchTypeMap types;&#010;+  EtchClass2TypeMap class2type;&#010;+  EtchDefaultValueFactory * factory;&#010;   MockMailboxManager manager;&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, &amp;types, &amp;class2type);&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;   //default value factory&#010;@@ -176,9 +171,9 @@ TEST_F(EtchMessagizerTest, TransportMess&#010;   EtchObject *out;&#010;   //add to the resource&#010;   r.put(EtchTransport&lt;EtchSessionMessage&gt;::VALUE_FACTORY(), factory, out);&#010;-  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchPacketizer* pac = new EtchPacketizer(conn, &amp;u);&#010;-  EtchMessagizer* mess = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;+  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;+  EtchPacketizer* pac = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;+  EtchMessagizer* mess = new EtchMessagizer(mRuntime, pac, &amp;u, &amp;r);&#010;   mess-&gt;setSession(&amp;manager);&#010;   //creation of example message which will be serialized&#010;   EtchType *mt_foo = NULL;&#010;@@ -186,78 +181,78 @@ TEST_F(EtchMessagizerTest, TransportMess&#010;   EtchString str("foo");&#010;   factory-&gt;getType(str, mt_foo);&#010;   capu::SmartPointer&lt;EtchValidator&gt; v;&#010;-  EtchValidatorShort::Get(0, v);&#010;+  EtchValidatorShort::Get(mRuntime, 0, v);&#010;   mt_foo-&gt;putValidator(mf_x, v);&#010;   capu::SmartPointer&lt;EtchShort&gt; data = new EtchShort(10000);&#010;   capu::SmartPointer&lt;EtchMessage&gt; msg = new EtchMessage(mt_foo, factory);&#010;   msg-&gt;put(mf_x, data);&#010; &#010;   EXPECT_TRUE(mess-&gt;transportMessage(NULL, msg) == ETCH_ERROR);&#010;-&#010;+&#010;   delete conn;&#010;   delete mess;&#010;   delete pac;&#010;-  delete factory;&#010;-  types.clear();&#010;-}&#010;-&#010;-TEST_F(EtchMessagizerTest, SessionDataTest) {&#010;-  //creation of an example message to compare the deserialized messageMyValueFactory vf("tcp:");&#010;-  EtchTypeMap types;&#010;-  EtchClass2TypeMap class2type;&#010;-  EtchString name1("a");&#010;-  EtchString name2("b");&#010;-  EtchType *mt_foo = new EtchType(1, name1);&#010;-  EtchField mf_x(2, name2);&#010;-  capu::SmartPointer&lt;EtchValidator&gt; v;&#010;-  EtchValidatorShort::Get(0, v);&#010;-  mt_foo-&gt;putValidator(mf_x, v);&#010;-  types.add(mt_foo);&#010;-  capu::SmartPointer&lt;EtchShort&gt; data = new EtchShort(10000);&#010;-  //default value factory&#010;-  EtchDefaultValueFactory * factory;&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;-  EtchString uri("tcp://127.0.0.1:4001");&#010;-&#010;-&#010;-  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;-  capu::SmartPointer&lt;EtchMessage&gt; msg = new EtchMessage(mt_foo, factory);&#010;-  msg-&gt;put(mf_x, data);&#010;-&#010;-&#010;-  EtchURL u(uri);&#010;-  EtchResources r;&#010;-  EtchObject *out;&#010;-  //add the value factory to the resources&#010;+  delete factory;&#010;+  types.clear();&#010;+}&#010;+&#010;+TEST_F(EtchMessagizerTest, SessionDataTest) {&#010;+  //creation of an example message to compare the deserialized messageMyValueFactory vf("tcp:");&#010;+  EtchTypeMap types;&#010;+  EtchClass2TypeMap class2type;&#010;+  EtchString name1("a");&#010;+  EtchString name2("b");&#010;+  EtchType *mt_foo = new EtchType(1, name1);&#010;+  EtchField mf_x(2, name2);&#010;+  capu::SmartPointer&lt;EtchValidator&gt; v;&#010;+  EtchValidatorShort::Get(mRuntime, 0, v);&#010;+  mt_foo-&gt;putValidator(mf_x, v);&#010;+  types.add(mt_foo);&#010;+  capu::SmartPointer&lt;EtchShort&gt; data = new EtchShort(10000);&#010;+  //default value factory&#010;+  EtchDefaultValueFactory * factory;&#010;+  EtchDefaultValueFactory::Init(mRuntime, &amp;types, &amp;class2type);&#010;+  EtchString uri("tcp://127.0.0.1:4001");&#010;+&#010;+&#010;+  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;+  capu::SmartPointer&lt;EtchMessage&gt; msg = new EtchMessage(mt_foo, factory);&#010;+  msg-&gt;put(mf_x, data);&#010;+&#010;+&#010;+  EtchURL u(uri);&#010;+  EtchResources r;&#010;+  EtchObject *out;&#010;+  //add the value factory to the resources&#010;   r.put(EtchTransport&lt;EtchSessionMessage&gt;::VALUE_FACTORY(), factory, out);&#010;-  //create stack&#010;-  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchPacketizer* pac = new EtchPacketizer(conn, &amp;u);&#010;-  EtchMessagizer* mess = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;-  capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;-&#010;-  //A packet is created&#010;-  capu::int8_t byte_pos[] = {3, 1, 1, 2, -123, 39, 16, -127};&#010;-  buffer-&gt;setByteRepresentation(ETCH_BIG_ENDIAN);&#010;-  buffer-&gt;put((capu::int8_t *)"_header_", pac-&gt;getHeaderSize());&#010;-  buffer-&gt;put((capu::int8_t *)byte_pos, 8);&#010;-  buffer-&gt;setIndex(0);&#010;-  capu::int32_t pktsize = buffer-&gt;getLength() - pac-&gt;getHeaderSize();&#010;-  buffer-&gt;put((capu::int8_t *) &amp; pac-&gt;SIG, sizeof (capu::int32_t));&#010;-  buffer-&gt;put((capu::int8_t *) &amp; pktsize, sizeof (capu::int32_t));&#010;-  buffer-&gt;setIndex(pac-&gt;getHeaderSize());&#010;-  EXPECT_TRUE(buffer-&gt;getLength() == 16);&#010;-&#010;-  //Simulate call with fake package&#010;-  EtchSessionMessage* mMailboxManager = new MockMailboxManager();&#010;-  mess-&gt;setSession(mMailboxManager);&#010;-  EXPECT_TRUE(mess-&gt;sessionPacket(NULL, buffer) == ETCH_OK);&#010;-&#010;-  mess-&gt;setSession(NULL);&#010;-  types.clear();&#010;+  //create stack&#010;+  EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;+  EtchPacketizer* pac = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;+  EtchMessagizer* mess = new EtchMessagizer(mRuntime, pac, &amp;u, &amp;r);&#010;+  capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;+&#010;+  //A packet is created&#010;+  capu::int8_t byte_pos[] = {3, 1, 1, 2, -123, 39, 16, -127};&#010;+  buffer-&gt;setByteRepresentation(ETCH_BIG_ENDIAN);&#010;+  buffer-&gt;put((capu::int8_t *)"_header_", pac-&gt;getHeaderSize());&#010;+  buffer-&gt;put((capu::int8_t *)byte_pos, 8);&#010;+  buffer-&gt;setIndex(0);&#010;+  capu::int32_t pktsize = buffer-&gt;getLength() - pac-&gt;getHeaderSize();&#010;+  buffer-&gt;put((capu::int8_t *) &amp; pac-&gt;SIG, sizeof (capu::int32_t));&#010;+  buffer-&gt;put((capu::int8_t *) &amp; pktsize, sizeof (capu::int32_t));&#010;+  buffer-&gt;setIndex(pac-&gt;getHeaderSize());&#010;+  EXPECT_TRUE(buffer-&gt;getLength() == 16);&#010;+&#010;+  //Simulate call with fake package&#010;+  EtchSessionMessage* mMailboxManager = new MockMailboxManager();&#010;+  mess-&gt;setSession(mMailboxManager);&#010;+  EXPECT_TRUE(mess-&gt;sessionPacket(NULL, buffer) == ETCH_OK);&#010;+&#010;+  mess-&gt;setSession(NULL);&#010;+  types.clear();&#010;   delete conn;&#010;   delete mMailboxManager;&#010;   delete pac;&#010;   delete mess;&#010;-  delete factory;&#010;-}&#010;+  delete factory;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -74,48 +74,43 @@ public:&#010;   status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;     return ETCH_OK;&#010;   }&#010;-};&#010;-&#010;-class EtchPacketizerTest&#010;-  : public ::testing::Test {&#010;-protected:&#010;-  virtual void SetUp() {&#010;-    mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;-    mRuntime-&gt;start();&#010;-  }&#010;-&#010;-  virtual void TearDown() {&#010;-    mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;-    delete mRuntime;&#010;-    mRuntime = NULL;&#010;-  }&#010;+};&#010;+&#010;+class EtchPacketizerTest&#010;+  : public ::testing::Test {&#010;+protected:&#010;+  virtual void SetUp() {&#010;+    mRuntime = new EtchRuntime();&#010;+    mRuntime-&gt;start();&#010;+  }&#010;+&#010;+  virtual void TearDown() {&#010;+    mRuntime-&gt;shutdown();&#010;+    delete mRuntime;&#010;+    mRuntime = NULL;&#010;+  }&#010; &#010;   EtchRuntime* mRuntime;&#010;-};&#010;-&#010;-TEST_F(EtchPacketizerTest, constructorTest) {&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;+};&#010;+&#010;+TEST_F(EtchPacketizerTest, constructorTest) {&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchSessionData* packetizer = new EtchPacketizer(conn, &amp;u);&#010;+  EtchSessionData* packetizer = new EtchPacketizer(mRuntime, conn, &amp;u);&#010; &#010;   delete conn;&#010;   delete packetizer;&#010;-  &#010;-}&#010;-&#010;-TEST_F(EtchPacketizerTest, TransportControlTest) {&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;+&#010;+}&#010;+&#010;+TEST_F(EtchPacketizerTest, TransportControlTest) {&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchPacketizer* packetizer = new EtchPacketizer(conn, &amp;u);&#010;+  EtchPacketizer* packetizer = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;   MockMessagizer mes;&#010;   packetizer-&gt;setSession(&amp;mes);&#010; &#010;-  EtchTcpListener* transport = new EtchTcpListener(&amp;u);&#010;+  EtchTcpListener* transport = new EtchTcpListener(mRuntime, &amp;u);&#010;   EtchSessionListener&lt;EtchSocket&gt;* listener = new MockListener3(transport);&#010; &#010;   //Start the mock listener&#010;@@ -128,34 +123,34 @@ TEST_F(EtchPacketizerTest, TransportCont&#010; &#010;   delete conn;&#010;   delete packetizer;&#010;-  delete listener;&#010;-}&#010;-&#010;-TEST_F(EtchPacketizerTest, TransportPacketTest) {&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;+  delete listener;&#010;+}&#010;+&#010;+TEST_F(EtchPacketizerTest, TransportPacketTest) {&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchPacketizer* packetizer = new EtchPacketizer(conn, &amp;u);&#010;+  EtchPacketizer* packetizer = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;   MockMessagizer mes;&#010;   packetizer-&gt;setSession(&amp;mes);&#010;-  capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;-&#010;-  //A packet is try to transmit data through not started transport&#010;-  buffer-&gt;put((capu::int8_t *)"_header_", packetizer-&gt;getHeaderSize());&#010;-  buffer-&gt;put((capu::int8_t *)"test", 4);&#010;-  buffer-&gt;setIndex(0);&#010;-&#010;-  EXPECT_TRUE(packetizer-&gt;transportPacket(NULL, buffer) == ETCH_ERROR);&#010;+  capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;+&#010;+  //A packet is try to transmit data through not started transport&#010;+  buffer-&gt;put((capu::int8_t *)"_header_", packetizer-&gt;getHeaderSize());&#010;+  buffer-&gt;put((capu::int8_t *)"test", 4);&#010;+  buffer-&gt;setIndex(0);&#010;+&#010;+  EXPECT_TRUE(packetizer-&gt;transportPacket(NULL, buffer) == ETCH_ERROR);&#010; &#010;   delete conn;&#010;-  delete packetizer;&#010;-}&#010;-&#010;-TEST_F(EtchPacketizerTest, SessionDataTest) {&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;+  delete packetizer;&#010;+}&#010;+&#010;+TEST_F(EtchPacketizerTest, SessionDataTest) {&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;-  EtchPacketizer* packetizer = new EtchPacketizer(conn, &amp;u);&#010;-  capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;-  //A packet is created&#010;+  EtchPacketizer* packetizer = new EtchPacketizer(mRuntime, conn, &amp;u);&#010;+  capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;+  //A packet is created&#010;   capu::int32_t pktsize = 4;&#010;   buffer-&gt;putInt(packetizer-&gt;SIG());&#010;   buffer-&gt;putInt(pktsize);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -79,8 +79,8 @@ public:&#010;    */&#010; public:&#010; &#010;-  MockDefaultValueFactory(EtchString uri) {&#010;-    EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  MockDefaultValueFactory(EtchRuntime* runtime, EtchString uri) {&#010;+    EtchDefaultValueFactory::Init(runtime, &amp;types, &amp;class2type);&#010;     factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;   }&#010; &#010;@@ -95,16 +95,11 @@ class EtchPlainMailboxManagerTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -117,11 +112,11 @@ TEST_F(EtchPlainMailboxManagerTest, cons&#010;   MockSession session;&#010;   MockDefaultValueFactory *factory;&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new MockDefaultValueFactory(uri);&#010;+  factory = new MockDefaultValueFactory(mRuntime, uri);&#010;   //created value factory&#010;   EtchURL u(uri);&#010;   EtchMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010; &#010;   EXPECT_TRUE(manager != NULL);&#010;   manager-&gt;setSession(&amp;session);&#010;@@ -134,11 +129,11 @@ TEST_F(EtchPlainMailboxManagerTest, cons&#010; TEST_F(EtchPlainMailboxManagerTest, transportMessageTest) {&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   MockDefaultValueFactory *factory;&#010;-  factory = new MockDefaultValueFactory(uri);&#010;+  factory = new MockDefaultValueFactory(mRuntime, uri);&#010;   //initialization&#010;   EtchType * type;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add", type);&#010;   type-&gt;putValidator(EtchDefaultValueFactory::_mf__messageId(), val);&#010;@@ -153,12 +148,12 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; &#010;   EtchURL u(uri);&#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010; &#010;   manager-&gt;setSession(&amp;session);&#010; &#010;   EXPECT_TRUE(ETCH_OK == manager-&gt;transportMessage(NULL, message));&#010;-  EXPECT_EQ(0, manager-&gt;count());&#010;+  EXPECT_EQ(0u, manager-&gt;count());&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK != message-&gt;getInReplyToMessageId(id));&#010; &#010;@@ -175,11 +170,11 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; TEST_F(EtchPlainMailboxManagerTest, transportResultMessageTest) {&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   MockDefaultValueFactory *factory;&#010;-  factory = new MockDefaultValueFactory(uri);&#010;+  factory = new MockDefaultValueFactory(mRuntime, uri);&#010;   //initialization&#010;   EtchType * type;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add_result", type);&#010;   type-&gt;putValidator(EtchDefaultValueFactory::_mf__messageId(), val);&#010;@@ -197,12 +192,12 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; &#010;   EtchURL u(uri);&#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010; &#010;   manager-&gt;setSession(&amp;session);&#010; &#010;   EXPECT_TRUE(ETCH_OK == manager-&gt;transportMessage(NULL, message));&#010;-  EXPECT_EQ(0, manager-&gt;count());&#010;+  EXPECT_EQ(0u, manager-&gt;count());&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getInReplyToMessageId(id));&#010;   EXPECT_TRUE(id == 1L);&#010;@@ -219,11 +214,11 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; TEST_F(EtchPlainMailboxManagerTest, transportCallTest) {&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   MockDefaultValueFactory *factory;&#010;-  factory = new MockDefaultValueFactory(uri);&#010;+  factory = new MockDefaultValueFactory(mRuntime, uri);&#010;   //initialization&#010;   EtchType * type;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add", type);&#010;   type-&gt;putValidator(EtchDefaultValueFactory::_mf__messageId(), val);&#010;@@ -238,7 +233,7 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; &#010;   EtchURL u(uri);&#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010; &#010;   manager-&gt;setSession(&amp;session);&#010;   //in order to notify upper layers that the connection is open&#010;@@ -246,7 +241,7 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; &#010;   EtchMailbox *mail;&#010;   EXPECT_TRUE(ETCH_OK == manager-&gt;transportCall(NULL, message, mail));&#010;-  EXPECT_EQ(1, manager-&gt;count());&#010;+  EXPECT_EQ(1u, manager-&gt;count());&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK != message-&gt;getInReplyToMessageId(id));&#010; &#010;@@ -262,11 +257,11 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010; TEST_F(EtchPlainMailboxManagerTest, replicatedTransportCallTest) {&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   MockDefaultValueFactory *factory;&#010;-  factory = new MockDefaultValueFactory(uri);&#010;+  factory = new MockDefaultValueFactory(mRuntime, uri);&#010;   //initialization&#010;   EtchType * type;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add", type);&#010;   type-&gt;putValidator(EtchDefaultValueFactory::_mf__messageId(), val);&#010;@@ -284,7 +279,7 @@ TEST_F(EtchPlainMailboxManagerTest, repl&#010; &#010;   EtchURL u(uri);&#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010; &#010;   manager-&gt;setSession(&amp;session);&#010;   //in order to notify upper layers that the connection is open&#010;@@ -293,8 +288,7 @@ TEST_F(EtchPlainMailboxManagerTest, repl&#010;   EtchMailbox *mail;&#010;   EXPECT_TRUE(ETCH_ERROR == manager-&gt;transportCall(NULL, message, mail));&#010;   //should not create a mailbox&#010;-  EXPECT_EQ(0, manager-&gt;count());&#010;-  EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;+  EXPECT_EQ(ETCH_OK, message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK != message-&gt;getInReplyToMessageId(id));&#010;   //there should be no mailbox&#010;   EXPECT_TRUE(ETCH_OK != manager-&gt;getMailbox(id, mail));&#010;@@ -309,12 +303,12 @@ TEST_F(EtchPlainMailboxManagerTest, repl&#010; TEST_F(EtchPlainMailboxManagerTest, sessionMessageTest) {&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010;   MockDefaultValueFactory *factory;&#010;-  factory = new MockDefaultValueFactory(uri);&#010;+  factory = new MockDefaultValueFactory(mRuntime, uri);&#010;   //initialization&#010;   EtchType * type;&#010;   EtchType * replyType;&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010; &#010;   factory-&gt;types.get("add_result", replyType);&#010;   factory-&gt;types.get("add", type);&#010;@@ -332,7 +326,7 @@ TEST_F(EtchPlainMailboxManagerTest, sess&#010; &#010;   EtchURL u(uri);&#010;   EtchPlainMailboxManager * manager = NULL;&#010;-  manager = new EtchPlainMailboxManager(transport, NULL, NULL);&#010;+  manager = new EtchPlainMailboxManager(mRuntime, transport, NULL, NULL);&#010; &#010;   manager-&gt;setSession(&amp;session);&#010;   //in order to notify upper layers that the connection is open&#010;@@ -341,7 +335,7 @@ TEST_F(EtchPlainMailboxManagerTest, sess&#010;   //perform the call&#010;   EtchMailbox *mail;&#010;   EXPECT_TRUE(ETCH_OK == manager-&gt;transportCall(NULL, message, mail));&#010;-  EXPECT_EQ(1, manager-&gt;count());&#010;+  EXPECT_EQ(1u, manager-&gt;count());&#010;   EXPECT_TRUE(ETCH_OK == message-&gt;getMessageId(id));&#010;   EXPECT_TRUE(ETCH_OK != message-&gt;getInReplyToMessageId(id));&#010;   //get the created mailbox&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -84,16 +84,11 @@ class EtchTcpConnectionTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -111,7 +106,7 @@ TEST_F(EtchTcpConnectionTest, constructo&#010; TEST_F(EtchTcpConnectionTest, isStartedTest) {&#010;   EtchURL url("tcp://127.0.0.1:4001");&#010;   EtchTcpConnection * conn = new EtchTcpConnection(mRuntime, NULL, &amp;url);&#010;-  EtchTcpListener *listener = new EtchTcpListener(&amp;url);&#010;+  EtchTcpListener *listener = new EtchTcpListener(mRuntime, &amp;url);&#010;   EXPECT_FALSE(conn-&gt;isStarted());&#010;   EtchSessionListener&lt;EtchSocket&gt;* mSessionListener = new MockListener();&#010;   EtchSessionData* mPacketizer = new MockPacketizer();&#010;@@ -141,7 +136,7 @@ TEST_F(EtchTcpConnectionTest, SessionAcc&#010;   EtchTcpConnection * conn = new EtchTcpConnection(mRuntime, NULL, &amp;url);&#010;   EtchSessionListener&lt;EtchSocket&gt;* mSessionListener = new MockListener();&#010;   EtchSessionData* mPacketizer = new MockPacketizer();&#010;-  EtchTcpListener *listener = new EtchTcpListener(&amp;url);&#010;+  EtchTcpListener *listener = new EtchTcpListener(mRuntime, &amp;url);&#010; &#010;   //START THE LISTENER&#010;   listener-&gt;setSession(mSessionListener);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -74,16 +74,11 @@ class EtchTcpListenerTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -93,7 +88,7 @@ protected:&#010; &#010; TEST_F(EtchTcpListenerTest, constructorTest) {&#010;   EtchURL url("tcp://127.0.0.1:4001");&#010;-  EtchTcpListener * tcpListener = new EtchTcpListener(&amp;url);&#010;+  EtchTcpListener * tcpListener = new EtchTcpListener(mRuntime, &amp;url);&#010;   EXPECT_TRUE(tcpListener != NULL);&#010;   delete tcpListener;&#010; }&#010;@@ -101,7 +96,7 @@ TEST_F(EtchTcpListenerTest, constructorT&#010; TEST_F(EtchTcpListenerTest, transportControlTest) {&#010;   MockListener2 mock;&#010;   EtchURL url("tcp://127.0.0.1:4001");&#010;-  EtchTcpListener * tcpListener = new EtchTcpListener(&amp;url);&#010;+  EtchTcpListener * tcpListener = new EtchTcpListener(mRuntime, &amp;url);&#010;   tcpListener-&gt;setSession(&amp;mock);&#010;   tcpListener-&gt;transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));&#010;   EXPECT_TRUE(tcpListener-&gt;isStarted());&#010;@@ -111,10 +106,10 @@ TEST_F(EtchTcpListenerTest, transportCon&#010; &#010; TEST_F(EtchTcpListenerTest, isStartedTest) {&#010;   // TODO refactor this test&#010;-  &#010;+&#010;   EtchURL url("tcp://127.0.0.1:4001");&#010;   EtchTcpConnection * conn = new EtchTcpConnection(mRuntime, NULL, &amp;url);&#010;-  EtchTcpListener *listener = new EtchTcpListener(&amp;url);&#010;+  EtchTcpListener *listener = new EtchTcpListener(mRuntime, &amp;url);&#010;   EtchSessionListener&lt;EtchSocket&gt;* mSessionListener = new MockListener2();&#010;   EtchSessionData* mPacketizer = new MockPacketizer2();&#010;   EXPECT_FALSE(listener-&gt;isStarted());&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -38,7 +38,7 @@ TEST(EtchCirclerQueueTest, putAndGetTest&#010;   EXPECT_EQ(ETCH_EINVAL, queue-&gt;get(&amp;e1, -1));&#010;   EXPECT_EQ(ETCH_TIMEOUT, queue-&gt;get(&amp;e1, 1));&#010; &#010;-  EXPECT_EQ(0, queue-&gt;getCount());&#010;+  EXPECT_EQ(0u, queue-&gt;getCount());&#010;   EXPECT_TRUE(queue-&gt;isEmpty());&#010;   EXPECT_FALSE(queue-&gt;isFull());&#010; &#010;@@ -51,7 +51,7 @@ TEST(EtchCirclerQueueTest, putAndGetTest&#010; &#010;     EXPECT_EQ(ETCH_OK, queue-&gt;get(&amp;e3));&#010;     EXPECT_EQ(e2, e3);&#010;-    EXPECT_EQ(0, queue-&gt;getCount());&#010;+    EXPECT_EQ(0u, queue-&gt;getCount());&#010;     EXPECT_TRUE(queue-&gt;isEmpty());&#010;     delete e2;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/etch/HelloWorld.etch&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/etch/HelloWorld.etch?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/etch/HelloWorld.etch (original)&#010;+++ incubator/etch/trunk/examples/helloworld/etch/HelloWorld.etch Wed Oct 17 06:50:01 2012&#010;@@ -29,6 +29,7 @@ service HelloWorld {&#010; &#009;)&#010; &#010; &#009;@Direction(Server)&#010;+&#009;@Timeout(1305)&#010; &#009;string say_hello(user to_whom) throws UserUnknownException&#010; &#010; }&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399114 [1/4] - in /incubator/etch/trunk: binding-cpp/runtime/include/common/ binding-cpp/runtime/include/serialization/ binding-cpp/runtime/include/support/ binding-cpp/runtime/include/transport/ binding-cpp/runtime/include/util/ binding-...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065010.DF36B23889B8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065010-DF36B23889B8@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:50:01 2012&#010;New Revision: 1399114&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399114&amp;view=rev&#010;Log:&#010;ETCH-244 EtchRuntime refactoring&#010;&#010;replaced EtchRuntime::getRuntime with mRuntime given by the constructor&#010;Fixed Warnings under Linux&#010;&#010;Change-Id: I2a22bf7f0f3418ca2e1aa5a60921b4cbc2f80ada&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorBooleanTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorByteTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorRuntimeExceptionTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStringTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp&#010;    incubator/etch/trunk/examples/helloworld/etch/HelloWorld.etch&#010;    incubator/etch/trunk/examples/helloworld/java/.classpath&#010;    incubator/etch/trunk/examples/helloworld/java/src/main/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h Wed Oct 17 06:50:01 2012&#010;@@ -507,7 +507,7 @@ public:&#010;   /**&#010;    * Returns the dim of array&#010;    */&#010;-  virtual capu::int32_t getDim() = 0;&#010;+  virtual capu::uint32_t getDim() = 0;&#010; &#010; };&#010; &#010;@@ -585,7 +585,7 @@ public:&#010;   /**&#010;    * Returns the dim of array&#010;    */&#010;-  capu::int32_t getDim();&#010;+  capu::uint32_t getDim();&#010; &#010;   /**&#010;    * Creates a new nested array&#010;@@ -636,7 +636,6 @@ EtchNativeArray&lt;T&gt;::EtchNativeArray(capu&#010;     mData-&gt;set(0, 0, array, length, 0, length, &amp;bytesWritten);&#010;   } else if (dim == 2) {&#010;     mData = new EtchArray&lt;T&gt;(length, dim);&#010;-    capu::int32_t dimCount = dim;&#010;     capu::int32_t offset = 0;&#010;     for (capu::int32_t i = 0; i &lt; length; i++) {&#010;       mData-&gt;createArray(i, 0, 2,dim-1);&#010;@@ -711,7 +710,7 @@ capu::int32_t EtchNativeArray&lt;T&gt;::getLen&#010; }&#010; &#010; template&lt;class T&gt;&#010;-capu::int32_t EtchNativeArray&lt;T&gt;::getDim() {&#010;+capu::uint32_t EtchNativeArray&lt;T&gt;::getDim() {&#010;   return mData-&gt;getDim();&#010; }&#010; &#010;@@ -779,6 +778,9 @@ status_t EtchNativeArray&lt;T&gt;::resize(capu&#010;       } \&#010;       break; \&#010;     } \&#010;+    default: { \&#010;+      return ETCH_ERROR; \&#010;+    } \&#010;   } \&#010; }&#010; &#010;@@ -811,7 +813,7 @@ status_t EtchNativeArray&lt;T&gt;::resize(capu&#010;       } \&#010;       break; \&#010;     } \&#010;-    case EtchObjectType::SMART_POINTER: \&#010;+    case EtchObjectType::SMART_POINTER: { \&#010;       EtchNativeArray&lt;capu::SmartPointer&lt;type&gt; &gt;* na = (EtchNativeArray&lt;capu::SmartPointer&lt;type&gt; &gt;*)(this); \&#010;       if(dims == 1) { \&#010;         capu::SmartPointer&lt;type&gt; value = capu::smartpointer_cast&lt;type&gt; (data); \&#010;@@ -822,6 +824,10 @@ status_t EtchNativeArray&lt;T&gt;::resize(capu&#010;       } \&#010;       break; \&#010;     } \&#010;+    default: { \&#010;+      break; \&#010;+    } \&#010;+  } \&#010;   break; \&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h Wed Oct 17 06:50:01 2012&#010;@@ -36,7 +36,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchAuthenticationExceptionSerializer(EtchType* type, EtchField* field);&#010;+  EtchAuthenticationExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -53,7 +53,7 @@ public:&#010;    * @param type&#010;    * @param collection&#010;    */&#010;-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h Wed Oct 17 06:50:01 2012&#010;@@ -33,10 +33,10 @@ public:&#010; &#010;   /**&#010;    * Constructs the BinaryTaggedDataInput with a null buffer.&#010;-   * &#010;+   *&#010;    * @param vf the value factory for the service.&#010;    */&#010;-  EtchBinaryTaggedDataInput(EtchValueFactory *vf);&#010;+  EtchBinaryTaggedDataInput(EtchRuntime* runtime, EtchValueFactory *vf);&#010; &#010;   /**&#010;    * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h Wed Oct 17 06:50:01 2012&#010;@@ -43,7 +43,7 @@ public:&#010;    * @param vf the value factory for the service.&#010;    * @param uri.&#010;    */&#010;-  EtchBinaryTaggedDataOutput(EtchValueFactory *vf, EtchURL* uri);&#010;+  EtchBinaryTaggedDataOutput(EtchRuntime* runtime, EtchValueFactory *vf, EtchURL* uri);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -58,8 +58,8 @@ public:&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;-  capu::SmartPointer&lt;EtchFlexBuffer&gt; mBuffer;&#010;   EtchLevel mLevel;&#010;+  capu::SmartPointer&lt;EtchFlexBuffer&gt; mBuffer;&#010;   capu::bool_t mStringTypeAndField;&#010;   capu::SmartPointer&lt;EtchValidator&gt; mIntValidator;&#010;   capu::SmartPointer&lt;EtchValidator&gt; mStringValidator;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h Wed Oct 17 06:50:01 2012&#010;@@ -35,7 +35,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchDateSerializer(EtchType* type, EtchField* field);&#010;+  EtchDateSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -58,7 +58,7 @@ public:&#010;    * @param type&#010;    * @param collection&#010;    */&#010;-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h Wed Oct 17 06:50:01 2012&#010;@@ -98,7 +98,7 @@ protected:&#010; &#010; public:&#010; &#010;-  static status_t Init(EtchTypeMap* types, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchTypeMap* types, EtchClass2TypeMap* class2type);&#010; &#010;   /**&#010;    * The msg field of the standard unchecked exception.&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h Wed Oct 17 06:50:01 2012&#010;@@ -37,7 +37,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchHashTableSerializer(EtchType* type, EtchField&amp; field);&#010;+  EtchHashTableSerializer(EtchRuntime* runtime, EtchType* type, EtchField&amp; field);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -59,7 +59,7 @@ public:&#010;    * @param type&#010;    * @param collection&#010;    */&#010;-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h Wed Oct 17 06:50:01 2012&#010;@@ -36,7 +36,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchListSerializer(EtchType* type, EtchField* field);&#010;+  EtchListSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -58,12 +58,12 @@ public:&#010;    * @param type&#010;    * @param class2type&#010;    */&#010;-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;-  EtchType* mType;&#010;   EtchField mField;&#010;+  EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h Wed Oct 17 06:50:01 2012&#010;@@ -37,7 +37,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchRuntimeExceptionSerializer(EtchType* type, EtchField* field);&#010;+  EtchRuntimeExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -59,12 +59,12 @@ public:&#010;    * @param type&#010;    * @param class2type&#010;    */&#010;-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;-  EtchType* mType;&#010;   EtchField mField;&#010;+  EtchType* mType;&#010;   const static EtchString&amp; FIELD_NAME();&#010; &#010; };&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h Wed Oct 17 06:50:01 2012&#010;@@ -37,7 +37,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchSetSerializer(EtchType* type, EtchField* field);&#010;+  EtchSetSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -53,7 +53,7 @@ public:&#010;    * @param type&#010;    * @param collection&#010;    */&#010;-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h Wed Oct 17 06:50:01 2012&#010;@@ -61,10 +61,10 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorBoolean(capu::uint32_t ndim);&#010;+  EtchValidatorBoolean(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h Wed Oct 17 06:50:01 2012&#010;@@ -66,15 +66,15 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorByte(capu::uint32_t ndim);&#010;+  EtchValidatorByte(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;   static capu::SmartPointer&lt;EtchValidator&gt;* Validators(EtchRuntime* runtime);&#010;-&#010;+  &#010; };&#010; &#010; #endif /* ETCHVALIDATORBYTE_H */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h Wed Oct 17 06:50:01 2012&#010;@@ -110,7 +110,7 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010; &#010;@@ -120,9 +120,10 @@ protected:&#010;    * @param dim dimensions&#010;    * @param sub is subclass ok&#010;    */&#010;-  EtchValidatorCustom(const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub);&#010;+  EtchValidatorCustom(EtchRuntime* runtime, const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub);&#010; &#010; private:&#010;+  EtchRuntime* mRuntime;&#010;   static EtchHashTable&lt;EtchValidatorCustomKey, capu::SmartPointer&lt;EtchValidator&gt; &gt;&amp; Validators(EtchRuntime* runtime);&#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h Wed Oct 17 06:50:01 2012&#010;@@ -63,10 +63,10 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorDouble(capu::uint32_t ndim);&#010;+  EtchValidatorDouble(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h Wed Oct 17 06:50:01 2012&#010;@@ -63,10 +63,10 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorFloat(capu::uint32_t ndim);&#010;+  EtchValidatorFloat(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h Wed Oct 17 06:50:01 2012&#010;@@ -67,12 +67,12 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; &#010; &#010; protected:&#010;-  EtchValidatorInt(capu::uint32_t ndim);&#010;+  EtchValidatorInt(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h Wed Oct 17 06:50:01 2012&#010;@@ -65,10 +65,10 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorLong(capu::uint32_t ndim);&#010;+  EtchValidatorLong(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h Wed Oct 17 06:50:01 2012&#010;@@ -54,12 +54,12 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010;   static const EtchObjectType* TYPE();&#010; &#010; protected:&#010;-  EtchValidatorNone();&#010;+  EtchValidatorNone(EtchRuntime* runtime);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h Wed Oct 17 06:50:01 2012&#010;@@ -60,10 +60,10 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorObject(capu::uint32_t ndim);&#010;+  EtchValidatorObject(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h Wed Oct 17 06:50:01 2012&#010;@@ -54,7 +54,7 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010;   /**&#010;    * EtchObjectType for EtchValidatorRuntimeException.&#010;@@ -62,7 +62,7 @@ public:&#010;   static const EtchObjectType* TYPE();&#010; &#010; protected:&#010;-  EtchValidatorRuntimeException();&#010;+  EtchValidatorRuntimeException(EtchRuntime* runtime);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h Wed Oct 17 06:50:01 2012&#010;@@ -66,11 +66,11 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010; &#010;-  EtchValidatorShort(capu::uint32_t ndim);&#010;+  EtchValidatorShort(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h Wed Oct 17 06:50:01 2012&#010;@@ -61,10 +61,10 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010; protected:&#010;-  EtchValidatorString(capu::uint32_t ndim);&#010;+  EtchValidatorString(EtchRuntime* runtime, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h Wed Oct 17 06:50:01 2012&#010;@@ -57,7 +57,7 @@ public:&#010;   /**&#010;    * @see EtchValidator&#010;    */&#010;-  static status_t Get(EtchType* type, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;+  static status_t Get(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010;   /**&#010;    * EtchObjectType for EtchRuntimeException.&#010;@@ -68,7 +68,7 @@ public:&#010; &#010; protected:&#010; &#010;-  EtchValidatorStructValue(EtchType* type, capu::uint32_t ndim);&#010;+  EtchValidatorStructValue(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim);&#010; &#010; private:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h Wed Oct 17 06:50:01 2012&#010;@@ -81,8 +81,8 @@ public:&#010;   }&#010; &#010; private:&#010;-   capu::bool_t mHasResult;&#010;-   capu::SmartPointer&lt;T&gt; mResult;&#010;+  capu::SmartPointer&lt;T&gt; mResult;&#010;+  capu::bool_t mHasResult;&#010; };&#010; &#010; #endif&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h Wed Oct 17 06:50:01 2012&#010;@@ -85,8 +85,8 @@ public:&#010;   virtual status_t transportQuery(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt; *result);&#010; &#010; private:&#010;-  EtchSession* mSession;&#010;   EtchTransport&lt;EtchServerFactory&gt;* mListener;&#010;+  EtchSession* mSession;&#010; };&#010; &#010; #endif /* __ETCHDEFAULTSERVERFACTORY_H__*/&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h Wed Oct 17 06:50:01 2012&#010;@@ -40,7 +40,7 @@ public:&#010;    * @param svc the delivery service used to send messages.&#010;    * @param vf the value factory used to create messages and encode/decode types.&#010;    */&#010;-  EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack);&#010;+  EtchRemoteBase(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -190,8 +190,8 @@ public:&#010; private:&#010;   EtchRuntime* mRuntime;&#010;   EtchDeliveryService * mSvc;&#010;-  EtchStack* mStack;&#010;   EtchValueFactory* mVf;&#010;+  EtchStack* mStack;&#010; };&#010; &#010; #endif /* __ETCHREMOTBASE_H__ */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h Wed Oct 17 06:50:01 2012&#010;@@ -86,28 +86,16 @@ public:&#010;   status_t shutdown();&#010; &#010;   /**&#010;-   * Sets Logger&#010;-   * @param logger&#010;-   */&#010;-  status_t setLogger(EtchLogger* logger);&#010;-&#010;-  /**&#010;    * Gets Logger&#010;    * @return logger if exists&#010;    */&#010;-  EtchLogger* getLogger();&#010;-&#010;-  /**&#010;-   * TODO: Remove this after refactoring! A instance to the runtime shoulde be injected to each class&#010;-   */&#010;-  static EtchRuntime* getRuntime();&#010;+  EtchLogger&amp; getLogger();&#010; &#010; private:&#010;-  static EtchRuntime* sRuntime;&#010;+  capu::bool_t mIsClosed;&#010;+  EtchLogger mLogger;&#010;   static capu::uint64_t sId;&#010;   capu::uint64_t mId;&#010;-  EtchLogger* mLogger;&#010;-  capu::bool_t mIsClosed;&#010;   capu::Mutex mMutex;&#010;   capu::List&lt;EtchRuntimeListener*&gt; mListeners;&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h Wed Oct 17 06:50:01 2012&#010;@@ -21,6 +21,8 @@&#010; #include "support/EtchStack.h"&#010; #include "util/EtchResources.h"&#010; &#010;+class EtchRuntime;&#010;+&#010; /* *&#010;  * This class serves as a container for all layers created during the setup of a new stack (connection, packetizer, messagizer, ...).&#010;  */&#010;@@ -35,7 +37,7 @@ public:&#010;   /**&#010;    * Default Constructor&#010;    */&#010;-  EtchStackClient();&#010;+  EtchStackClient(EtchRuntime* runtime);&#010; &#010;   /**&#010;    * Copy Constructor&#010;@@ -48,9 +50,8 @@ public:&#010;   virtual ~EtchStackClient();&#010; &#010; public:&#010;+  EtchRuntime* mRuntime;&#010;   EtchResources* mStaticResources;&#010;-&#010;-&#010; };&#010; &#010; #endif /* __ETCHSTACKCLIENT_H__ */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h Wed Oct 17 06:50:01 2012&#010;@@ -22,6 +22,8 @@&#010; #include "common/EtchString.h"&#010; #include "util/EtchResources.h"&#010; &#010;+class EtchRuntime;&#010;+&#010; /**&#010;  * Class to help construct transport stacks.&#010;  */&#010;@@ -63,7 +65,7 @@ public:&#010;    * @return an error if there is a problem&#010;    *         ETCH_OK otherwise&#010;    */&#010;-  static status_t InitResources( EtchResources* resources, EtchResources*&amp; result );&#010;+  static status_t InitResources(EtchRuntime* runtime, EtchResources* resources, EtchResources*&amp; result);&#010; &#010;   /**&#010;    * Destroyes the given standard resources&#010;@@ -71,7 +73,7 @@ public:&#010;    * @return an error if there is a problem&#010;    *         ETCH_OK otherwise&#010;    */&#010;-  static status_t DestroyResources(EtchResources* resources);&#010;+  static status_t DestroyResources(EtchRuntime* runtime, EtchResources* resources);&#010; };&#010; &#010; #endif /* __ETCHTRANSPORTHELPER_H__ */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h Wed Oct 17 06:50:01 2012&#010;@@ -50,14 +50,14 @@ public:&#010;    * @param transport the MailBoxManager implementation&#010;    * @param uri as an EtchString object&#010;    */&#010;-  EtchDefaultDeliveryService(EtchMailboxManager* transport, const EtchString&amp; uri);&#010;+  EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, const EtchString&amp; uri);&#010; &#010;   /**&#010;    * Constructor&#010;    * @param transport the MailBoxManager implementation&#010;    * @param uri as an EtchURL object&#010;    */&#010;-  EtchDefaultDeliveryService(EtchMailboxManager* transport, EtchURL* uri);&#010;+  EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, EtchURL* uri);&#010; &#010;   /**&#010;    * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h Wed Oct 17 06:50:01 2012&#010;@@ -55,7 +55,7 @@ public:&#010;    * @param uri the uri being used to configure the transport stack.&#010;    * @param resources the associated set of resources for this service.&#010;    */&#010;-  EtchMessagizer(EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources);&#010;+  EtchMessagizer(EtchRuntime* runtime, EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources);&#010; &#010;   /**&#010;    * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h Wed Oct 17 06:50:01 2012&#010;@@ -61,7 +61,7 @@ public:&#010;    * @param uri&#010;    * @param resources&#010;    */&#010;-  EtchPacketizer(EtchTransportData* transport, EtchString&amp; uri);&#010;+  EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchString&amp; uri);&#010; &#010;   /**&#010;    * Constructs the Packetizer with null packet handler and uri specified&#010;@@ -70,7 +70,7 @@ public:&#010;    * @param uri&#010;    * @param resources&#010;    */&#010;-  EtchPacketizer(EtchTransportData* transport, EtchURL* uri);&#010;+  EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchURL* uri);&#010; &#010;   /**&#010;    * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h Wed Oct 17 06:50:01 2012&#010;@@ -37,7 +37,7 @@ public:&#010;    * @param uri&#010;    * @param resources&#010;    */&#010;-  EtchPlainMailboxManager(EtchTransportMessage* transport, const EtchString&amp; url, EtchResources* resources);&#010;+  EtchPlainMailboxManager(EtchRuntime* runtime, EtchTransportMessage* transport, const EtchString&amp; url, EtchResources* resources);&#010; &#010;   /**&#010;    * Destructure&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h Wed Oct 17 06:50:01 2012&#010;@@ -135,12 +135,12 @@ public:&#010;   void setNumAttempts(capu::uint8_t numAttempts);&#010; &#010; private:&#010;+  EtchRuntime *mRuntime;&#010;   EtchString mHost;&#010;   capu::uint16_t mPort;&#010;   EtchSocket* mSocket;&#010;   EtchTcpOption mOptions;&#010;   capu::uint8_t mNumAttempts;&#010;-  EtchRuntime *mRuntime;&#010; &#010; protected:&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Wed Oct 17 06:50:01 2012&#010;@@ -48,7 +48,7 @@ public:&#010;   /**&#010;    * Default Constructor&#010;    */&#010;-  EtchTcpListener(EtchURL *url);&#010;+  EtchTcpListener(EtchRuntime* runtime, EtchURL *url);&#010; &#010;   /**&#010;    * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h Wed Oct 17 06:50:01 2012&#010;@@ -70,8 +70,8 @@ public:&#010; &#010; private:&#010;   static const EtchString&amp; SOCKET();&#010;-  const capu::bool_t mIsSecure;&#010;   EtchRuntime* mRuntime;&#010;+  const capu::bool_t mIsSecure;&#010; &#010;   class MySessionListener : public EtchTransport&lt;EtchServerFactory&gt;, public EtchSessionListener&lt;EtchSocket&gt; {&#010;   public:&#010;@@ -137,15 +137,14 @@ private:&#010;     status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event);&#010; &#010;   private:&#010;+    EtchRuntime* mRuntime;&#010;+    EtchTcpTransportFactory* mFactory;&#010;     EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt; *mTransport;&#010;     EtchString mUri;&#010;     EtchResources* mResources;&#010;-    EtchServerFactory* mSession;&#010;-    EtchRuntime* mRuntime;&#010;     capu::bool_t mIsSecure;&#010;+    EtchServerFactory* mSession;&#010;     capu::List&lt;EtchStack*&gt;* mConnectionStacks;&#010;-    EtchTcpTransportFactory* mFactory;&#010;-&#010;   };&#010; &#010; };&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h Wed Oct 17 06:50:01 2012&#010;@@ -88,10 +88,10 @@ public:&#010;   /**&#010;    * Gets the next available item from the queue, waiting&#010;    * until an item is available or the queue is closed.&#010;-   * &#010;+   *&#010;    * @param element an item from the queue or null if the queue&#010;    * is closed&#010;-   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if &#010;+   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if&#010;    * the param is invalid or ETCH_ERROR if the queue is closed.&#010;    */&#010;    status_t get(EtchMailbox::EtchElement** element);&#010;@@ -99,14 +99,14 @@ public:&#010;   /**&#010;    * Gets the next available item from the queue, waiting&#010;    * until an item is available or the queue is closed.&#010;-   * &#010;+   *&#010;    * @param element an item from the queue or null if maxDelay&#010;    * has been exceeded or the queue is closed.&#010;    * @param maxDelay the maximum time in ms to wait for&#010;    * something to be put in the queue; 0 means wait forever,&#010;    * less than 0 means don't wait at all.&#010;    *&#010;-   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if &#010;+   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if&#010;    * the param is invalid, ETCH_TIMEOUT if maxDelay has been exceeded&#010;    * or ETCH_ERROR if an error occurred&#010;    */&#010;@@ -115,10 +115,10 @@ public:&#010;   /**&#010;    * Puts an item in the queue, waiting until space is available&#010;    * or the queue is closed.&#010;-   * &#010;+   *&#010;    * @param obj a non-null item to put in the queue.&#010;-   * &#010;-   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if &#010;+   *&#010;+   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if&#010;    * the param is invalid or ETCH_ERROR if the queue is closed.&#010;    */&#010;   status_t put(EtchMailbox::EtchElement* obj);&#010;@@ -126,17 +126,17 @@ public:&#010;   /**&#010;    * Puts an item in the queue, waiting until space is available&#010;    * or the queue is closed.&#010;-   * &#010;+   *&#010;    * @param obj a non-null item to put in the queue.&#010;-   * &#010;+   *&#010;    * @param maxDelay the maximum time in ms to wait for&#010;    * available space the queue; 0 means wait forever,&#010;    * less than 0 means don't wait at all.&#010;-   * &#010;-   * @return ETCH_OK if the item was placed in the queue, &#010;+   *&#010;+   * @return ETCH_OK if the item was placed in the queue,&#010;    *  ETCH_TIMEOUT if maxDelay has been exceeded or ETCH_ERROR if an error occurred&#010;    */&#010;-  status_t put(EtchMailbox::EtchElement* obj, capu::int32_t maxDelay); &#010;+  status_t put(EtchMailbox::EtchElement* obj, capu::int32_t maxDelay);&#010; &#010;   /**&#010;    * Closes the queue so that no more items may be put into it.&#010;@@ -166,7 +166,7 @@ private:&#010;    * up the next one waiting for the queue, either to get or put.&#010;    * @param obj non-null item to put.&#010;    *&#010;-   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if &#010;+   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if&#010;    * the param is invalid or ETCH_ERROR if the queue is closed.&#010;    */&#010;   status_t putAndNotify(EtchMailbox::EtchElement* obj);&#010;@@ -184,7 +184,7 @@ private:&#010;    * Puts the item at the tail of the queue.&#010;    * @param obj non-null item to put.&#010;    *&#010;-   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if &#010;+   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if&#010;    * the param is invalid or ETCH_ERROR if the queue is closed.&#010;    */&#010;   status_t put0(EtchMailbox::EtchElement* obj);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp Wed Oct 17 06:50:01 2012&#010;@@ -98,31 +98,29 @@ namespace capu {&#010;     return CAPU_OK;&#010;   }&#010; &#010;-  status_t Logger::vlog(LoggerLevel level, const char *tag, const char *file, int32_t line, const char *msgFormat, va_list args) {&#010;+  status_t Logger::vlog(LoggerLevel level, const char_t *tag, const char_t *file, int32_t line, const char_t *msgFormat, va_list args) {&#010; &#010;-    LoggerMessage *msg = new LoggerMessage();&#010;-    msg-&gt;setId(mId);&#010;-    msg-&gt;setTimestamp(0); // not implemented&#010;-    msg-&gt;setThreadId(0);  // not implemented&#010;-    msg-&gt;setLevel(level);&#010;-    msg-&gt;setTag(tag);&#010;-    msg-&gt;setFile(file);&#010;-    msg-&gt;setLine(line);&#010;+    LoggerMessage msg;&#010;+    msg.setId(mId);&#010;+    msg.setTimestamp(0); // not implemented&#010;+    msg.setThreadId(0);  // not implemented&#010;+    msg.setLevel(level);&#010;+    msg.setTag(tag);&#010;+    msg.setFile(file);&#010;+    msg.setLine(line);&#010; &#010;     int32_t size = StringUtils::Vscprintf(msgFormat, args);&#010;-    char* buffer = new char[size + 1];&#010;+    char_t* buffer = new char_t[size + 1];&#010;     StringUtils::Vsprintf(buffer, size + 1, msgFormat, args);&#010;-    msg-&gt;setMessage(buffer);&#010;+    msg.setMessage(buffer);&#010;     delete [] buffer;&#010; &#010;     // log message&#010;     for(int i = 0; i &lt; LOGGER_APPENDER_MAX; i++) {&#010;       if(mAppenders[i] != NULL) {&#010;-        mAppenders[i]-&gt;log(msg);&#010;+        mAppenders[i]-&gt;log(&amp;msg);&#010;       }&#010;     }&#010;-    delete msg;&#010;-&#010;     return CAPU_OK;&#010;   }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp Wed Oct 17 06:50:01 2012&#010;@@ -35,7 +35,7 @@ status_t EtchNativeArrayBase::getBase(Po&#010;   status_t ret = ETCH_OK;&#010;   const EtchObjectType* type = getObjectType()-&gt;getObjectComponentType();&#010;   const EtchObjectType::EtchObjectTypeTrait trait = getObjectType()-&gt;getObjectComponentTypeTrait();&#010;-  const capu::int32_t dims = getDim();&#010;+  const capu::uint32_t dims = getDim();&#010; &#010;   switch(type-&gt;getTypeId()) {&#010;     case EOTID_BYTE: {&#010;@@ -76,7 +76,7 @@ status_t EtchNativeArrayBase::getBase(Po&#010;           }&#010;           break;&#010;         }&#010;-        case EtchObjectType::SMART_POINTER:&#010;+        case EtchObjectType::SMART_POINTER: {&#010;           EtchNativeArray&lt;capu::SmartPointer&lt;capu::int8_t&gt; &gt;* na = (EtchNativeArray&lt;capu::SmartPointer&lt;capu::int8_t&gt; &gt;*)(this);&#010;           if(dims == 1) {&#010;             capu::SmartPointer&lt;capu::int8_t&gt; value = NULL;&#010;@@ -93,6 +93,10 @@ status_t EtchNativeArrayBase::getBase(Po&#010;           }&#010;           break;&#010;         }&#010;+        default: {&#010;+          return ETCH_ERROR;&#010;+        }&#010;+      }&#010;       break;&#010;     }&#010; &#010;@@ -185,6 +189,9 @@ status_t EtchNativeArrayBase::getBase(Po&#010;           }&#010;           break;&#010;         }&#010;+        default: {&#010;+          return ETCH_ERROR;&#010;+        }&#010;       }&#010;       break;&#010;     }&#010;@@ -196,6 +203,9 @@ status_t EtchNativeArrayBase::getBase(Po&#010;       GETBASE_CAST_OBJECT_TO_NA(EtchList&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; )&#010;       break;&#010;     }&#010;+    default: {&#010;+      return ETCH_ERROR;&#010;+    }&#010;   }&#010;   return ret;&#010; }&#010;@@ -238,7 +248,7 @@ status_t EtchNativeArrayBase::setBase(Po&#010;           }&#010;           break;&#010;         }&#010;-        case EtchObjectType::SMART_POINTER:&#010;+        case EtchObjectType::SMART_POINTER: {&#010;           EtchNativeArray&lt;capu::SmartPointer&lt;capu::int8_t&gt; &gt;* na = (EtchNativeArray&lt;capu::SmartPointer&lt;capu::int8_t&gt; &gt;*)(this);&#010;           if(dims == 1) {&#010;             capu::SmartPointer&lt;EtchInt32&gt; value = capu::smartpointer_cast&lt;EtchInt32&gt; (data);&#010;@@ -254,6 +264,10 @@ status_t EtchNativeArrayBase::setBase(Po&#010;           }&#010;           break;&#010;         }&#010;+        default: {&#010;+          break;&#010;+        }&#010;+      }&#010;       break;&#010;     }&#010;     case EOTID_OBJECT: {&#010;@@ -319,7 +333,7 @@ status_t EtchNativeArrayBase::setBase(Po&#010;           }&#010;           break;&#010;         }&#010;-        case EtchObjectType::SMART_POINTER:&#010;+        case EtchObjectType::SMART_POINTER: {&#010;           EtchNativeArray&lt;capu::SmartPointer&lt;EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; &gt;* na = (EtchNativeArray&lt;capu::SmartPointer&lt;EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; &gt;*)(this);&#010;           if(dims == 1) {&#010;             capu::SmartPointer&lt;EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; value = capu::smartpointer_cast&lt;EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; (data);&#010;@@ -330,6 +344,10 @@ status_t EtchNativeArrayBase::setBase(Po&#010;           }&#010;           break;&#010;         }&#010;+        default: {&#010;+          break;&#010;+        }&#010;+      }&#010;       break;&#010;     }&#010;     case EOTID_SET: {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -26,10 +26,8 @@ const EtchString&amp; EtchAuthenticationExce&#010;   return name;&#010; }&#010; &#010;-EtchAuthenticationExceptionSerializer::EtchAuthenticationExceptionSerializer(EtchType* type, EtchField* field)&#010;-: mField(*field), mType(type) {&#010;-  // TODO refactor&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchAuthenticationExceptionSerializer::EtchAuthenticationExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;+: mRuntime(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchAuthenticationExceptionSerializer::~EtchAuthenticationExceptionSerializer() {&#010;@@ -66,10 +64,7 @@ status_t EtchAuthenticationExceptionSeri&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchAuthenticationExceptionSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;-  // TODO refactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchAuthenticationExceptionSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {&#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -86,11 +81,11 @@ status_t EtchAuthenticationExceptionSeri&#010;   type-&gt;setComponentType(EtchAuthenticationException::TYPE());&#010; &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchAuthenticationExceptionSerializer(type, &amp;field));&#010;+  type-&gt;setImportExportHelper(new EtchAuthenticationExceptionSerializer(runtime, type, &amp;field));&#010; &#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;-  result = EtchValidatorString::Get(0, tmp);&#010;+  result = EtchValidatorString::Get(runtime, 0, tmp);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp Wed Oct 17 06:50:01 2012&#010;@@ -21,17 +21,14 @@&#010; &#010; static const char* TAG = "EtchBinaryTaggedDataInput";&#010; &#010;-EtchBinaryTaggedDataInput::EtchBinaryTaggedDataInput(EtchValueFactory* vf)&#010;-: EtchBinaryTaggedData(vf), mBuffer(NULL), mLengthBudget(0) {&#010;-  // TODO refacotring&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;+EtchBinaryTaggedDataInput::EtchBinaryTaggedDataInput(EtchRuntime* runtime, EtchValueFactory* vf)&#010;+: EtchBinaryTaggedData(vf), mRuntime(runtime), mBuffer(NULL), mLengthBudget(0) {&#010;   //get int validator&#010;-  EtchValidatorInt::Get(0, mIntValidator);&#010;+  EtchValidatorInt::Get(runtime, 0, mIntValidator);&#010; &#010;   //get string validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; stringValidator;&#010;-  EtchValidatorString::Get(0, stringValidator);&#010;+  EtchValidatorString::Get(runtime, 0, stringValidator);&#010; &#010;   //create combo validator&#010;   mIntOrStrValidator = new EtchComboValidator(mIntValidator, stringValidator);&#010;@@ -149,7 +146,7 @@ status_t EtchBinaryTaggedDataInput::read&#010;     } else {&#010;       capu::SmartPointer&lt;EtchObject&gt; obj;&#010;       capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-      EtchValidatorObject::Get(0, val);&#010;+      EtchValidatorObject::Get(mRuntime, 0, val);&#010;       readValue(val, obj);&#010;     }&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp Wed Oct 17 06:50:01 2012&#010;@@ -25,21 +25,17 @@ const EtchString&amp; EtchBinaryTaggedDataOu&#010;   return name;&#010; }&#010; &#010;-EtchBinaryTaggedDataOutput::EtchBinaryTaggedDataOutput(EtchValueFactory *vf, EtchURL* uri)&#010;-: EtchBinaryTaggedData(vf), mLevel(vf-&gt;getLevel()), mBuffer(NULL) {&#010;-  // TODO refactoring&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;+EtchBinaryTaggedDataOutput::EtchBinaryTaggedDataOutput(EtchRuntime* runtime, EtchValueFactory *vf, EtchURL* uri)&#010;+: EtchBinaryTaggedData(vf), mRuntime(runtime), mLevel(vf-&gt;getLevel()), mBuffer(NULL) {&#010;   EtchString tmp;&#010;   if (uri-&gt;getTerms().get(STRING_TYPE_AND_FIELD(), &amp;tmp) == ETCH_OK) {&#010;     mStringTypeAndField = atoi(tmp.c_str()) &gt; 0;&#010;   } else {&#010;     mStringTypeAndField = false;&#010;   }&#010;-  EtchValidatorInt::Get(0, mIntValidator);&#010;-  EtchValidatorString::Get(0, mStringValidator);&#010;-  EtchValidatorNone::Get(mNoneValidator);&#010;-&#010;+  EtchValidatorInt::Get(runtime, 0, mIntValidator);&#010;+  EtchValidatorString::Get(runtime, 0, mStringValidator);&#010;+  EtchValidatorNone::Get(runtime, mNoneValidator);&#010; }&#010; &#010; EtchBinaryTaggedDataOutput::~EtchBinaryTaggedDataOutput() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -26,10 +26,8 @@ const EtchString&amp; EtchDateSerializer::FI&#010;   return name;&#010; }&#010; &#010;-EtchDateSerializer::EtchDateSerializer(EtchType* type, EtchField* field)&#010;-: mField(*field), mType(type) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchDateSerializer::EtchDateSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;+: mRuntime(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchDateSerializer::~EtchDateSerializer() {&#010;@@ -67,10 +65,8 @@ status_t EtchDateSerializer::exportValue&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchDateSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;-  //TODO refactoring&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-  &#010;+status_t EtchDateSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {&#010;+&#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -87,11 +83,11 @@ status_t EtchDateSerializer::Init(EtchTy&#010;   type-&gt;setComponentType(EtchDate::TYPE());&#010; &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchDateSerializer(type, &amp;field));&#010;+  type-&gt;setImportExportHelper(new EtchDateSerializer(runtime, type, &amp;field));&#010; &#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  result = EtchValidatorLong::Get(0, val);&#010;+  result = EtchValidatorLong::Get(runtime, 0, val);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp Wed Oct 17 06:50:01 2012&#010;@@ -131,39 +131,40 @@ EtchDefaultValueFactory::~EtchDefaultVal&#010;   delete mDynamicTypes;&#010; }&#010; &#010;-status_t EtchDefaultValueFactory::Init(EtchTypeMap* types, EtchClass2TypeMap* class2type) {&#010;-  status_t result;&#010;+status_t EtchDefaultValueFactory::Init(EtchRuntime* runtime, EtchTypeMap* types, EtchClass2TypeMap* class2type) {&#010;+  status_t result = ETCH_OK;&#010; &#010;   EtchType *type;&#010;-  result = types-&gt;get(ETCH_RUNTIME_EXCEPTION_TYPE_NAME(), type);&#010;-  result = EtchRuntimeExceptionSerializer::Init(type, class2type);&#010;+  result |= types-&gt;get(ETCH_RUNTIME_EXCEPTION_TYPE_NAME(), type);&#010; &#010;-  result = types-&gt;get(ETCH_LIST_TYPE_NAME(), type);&#010;-  result = EtchListSerializer::Init(type, class2type);&#010;+  result |= EtchRuntimeExceptionSerializer::Init(runtime, type, class2type);&#010; &#010;-  result = types-&gt;get(ETCH_MAP_TYPE_NAME(), type);&#010;-  result = EtchHashTableSerializer::Init(type, class2type);&#010;+  result |= types-&gt;get(ETCH_LIST_TYPE_NAME(), type);&#010;+  result |= EtchListSerializer::Init(runtime, type, class2type);&#010; &#010;-  result = types-&gt;get(ETCH_SET_TYPE_NAME(), type);&#010;-  result = EtchSetSerializer::Init(type, class2type);&#010;+  result |= types-&gt;get(ETCH_MAP_TYPE_NAME(), type);&#010;+  result |= EtchHashTableSerializer::Init(runtime, type, class2type);&#010; &#010;-  result = types-&gt;get(ETCH_DATETIME_TYPE_NAME(), type);&#010;-  result = EtchDateSerializer::Init(type, class2type);&#010;+  result |= types-&gt;get(ETCH_SET_TYPE_NAME(), type);&#010;+  result |= EtchSetSerializer::Init(runtime, type, class2type);&#010; &#010;-  result = types-&gt;get(ETCH_AUTH_EXCEPTION_TYPE_NAME(), type);&#010;-  result = EtchAuthenticationExceptionSerializer::Init(type, class2type);&#010;+  result |= types-&gt;get(ETCH_DATETIME_TYPE_NAME(), type);&#010;+  result |= EtchDateSerializer::Init(runtime, type, class2type);&#010;+&#010;+  result |= types-&gt;get(ETCH_AUTH_EXCEPTION_TYPE_NAME(), type);&#010;+  result |= EtchAuthenticationExceptionSerializer::Init(runtime, type, class2type);&#010; &#010;   {&#010;-    result = types-&gt;get(ETCH_EXCEPTION_MESSAGE_NAME(), type);&#010;+    result |= types-&gt;get(ETCH_EXCEPTION_MESSAGE_NAME(), type);&#010;     capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-    EtchValidatorRuntimeException::Get(val);&#010;-    result = type-&gt;putValidator(_mf_result(), val);&#010;-    EtchValidatorLong::Get(0, val);&#010;-    result = type-&gt;putValidator(_mf__messageId(), val);&#010;-    result = type-&gt;putValidator(_mf__inReplyTo(), val);&#010;+    EtchValidatorRuntimeException::Get(runtime, val);&#010;+    result |= type-&gt;putValidator(_mf_result(), val);&#010;+    EtchValidatorLong::Get(runtime, 0, val);&#010;+    result |= type-&gt;putValidator(_mf__messageId(), val);&#010;+    result |= type-&gt;putValidator(_mf__inReplyTo(), val);&#010;   }&#010; &#010;-  return ETCH_OK;&#010;+  return result;&#010; }&#010; &#010; const EtchType * EtchDefaultValueFactory::get_mt__Etch_RuntimeException() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -27,10 +27,8 @@ const EtchString&amp; EtchHashTableSerialize&#010;   return name;&#010; }&#010; &#010;-EtchHashTableSerializer::EtchHashTableSerializer(EtchType* type, EtchField&amp; field)&#010;-: mField(field), mType(type) {&#010;-  //TODO refactoring&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchHashTableSerializer::EtchHashTableSerializer(EtchRuntime* runtime, EtchType* type, EtchField&amp; field)&#010;+: mRuntime(runtime), mField(field), mType(type) {&#010; }&#010; &#010; EtchHashTableSerializer::~EtchHashTableSerializer() {&#010;@@ -98,10 +96,7 @@ status_t EtchHashTableSerializer::import&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchHashTableSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchHashTableSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {&#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -118,11 +113,11 @@ status_t EtchHashTableSerializer::Init(E&#010;   type-&gt;setComponentType(EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE());&#010; &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchHashTableSerializer(type, field));&#010;+  type-&gt;setImportExportHelper(new EtchHashTableSerializer(runtime, type, field));&#010; &#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;-  result = EtchValidatorObject::Get(1, tmp);&#010;+  result = EtchValidatorObject::Get(runtime, 1, tmp);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -28,10 +28,8 @@ const EtchString&amp; EtchListSerializer::FI&#010; &#010; // TODO: check signature regarding by value copy&#010; &#010;-EtchListSerializer::EtchListSerializer(EtchType* type, EtchField* field)&#010;-: mField(*field), mType(type) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchListSerializer::EtchListSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;+: mRuntime(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchListSerializer::~EtchListSerializer() {&#010;@@ -92,10 +90,7 @@ status_t EtchListSerializer::importValue&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchListSerializer::Init(EtchType* type, EtchClass2TypeMap * class2type) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-  &#010;+status_t EtchListSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap * class2type) {&#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -113,11 +108,11 @@ status_t EtchListSerializer::Init(EtchTy&#010; &#010;   //set the import export helper&#010;   // TODO memory EtchField&#010;-  type-&gt;setImportExportHelper(new EtchListSerializer(type, &amp;field));&#010;-  &#010;+  type-&gt;setImportExportHelper(new EtchListSerializer(runtime, type, &amp;field));&#010;+&#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; validator;&#010;-  result = EtchValidatorObject::Get(1, validator);&#010;+  result = EtchValidatorObject::Get(runtime, 1, validator);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -28,10 +28,8 @@ const EtchString&amp; EtchRuntimeExceptionSe&#010; &#010; // TODO: check signature regarding by value copy&#010; &#010;-EtchRuntimeExceptionSerializer::EtchRuntimeExceptionSerializer(EtchType* type, EtchField* field)&#010;-: mField(*field), mType(type) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchRuntimeExceptionSerializer::EtchRuntimeExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;+: mRuntime(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchRuntimeExceptionSerializer::~EtchRuntimeExceptionSerializer() {&#010;@@ -71,10 +69,7 @@ status_t EtchRuntimeExceptionSerializer:&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchRuntimeExceptionSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchRuntimeExceptionSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {&#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -91,11 +86,11 @@ status_t EtchRuntimeExceptionSerializer:&#010;   type-&gt;setComponentType(EtchRuntimeException::TYPE());&#010; &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchRuntimeExceptionSerializer(type, &amp;field));&#010;+  type-&gt;setImportExportHelper(new EtchRuntimeExceptionSerializer(runtime, type, &amp;field));&#010; &#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;-  result = EtchValidatorString::Get(0, tmp);&#010;+  result = EtchValidatorString::Get(runtime, 0, tmp);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -26,10 +26,8 @@ const EtchString&amp; EtchSetSerializer::FIE&#010;   return name;&#010; }&#010; &#010;-EtchSetSerializer::EtchSetSerializer(EtchType* type, EtchField* field)&#010;-: mField(*field), mType(type) {&#010;-  // TODO refactoring&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchSetSerializer::EtchSetSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)&#010;+: mRuntime(runtime), mField(*field), mType(type) {&#010; }&#010; &#010; EtchSetSerializer::~EtchSetSerializer() {&#010;@@ -89,10 +87,7 @@ status_t EtchSetSerializer::importValue(&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchSetSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;-  //TODO refactoring&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchSetSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {&#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -109,11 +104,11 @@ status_t EtchSetSerializer::Init(EtchTyp&#010;   type-&gt;setComponentType(EtchHashSet&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE());&#010; &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchSetSerializer(type, &amp;field));&#010;+  type-&gt;setImportExportHelper(new EtchSetSerializer(runtime, type, &amp;field));&#010; &#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;-  result = EtchValidatorObject::Get(1, tmp);&#010;+  result = EtchValidatorObject::Get(runtime, 1, tmp);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorBoole&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorBoolean::EtchValidatorBoolean(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorBoolean::TYPE(), EtchBool::TYPE(), EtchBool::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorBoolean::EtchValidatorBoolean(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: mRuntime(runtime), EtchTypeValidator(EtchValidatorBoolean::TYPE(), EtchBool::TYPE(), EtchBool::TYPE(), ndim) {&#010; }&#010; &#010; EtchValidatorBoolean::EtchValidatorBoolean(const EtchValidatorBoolean&amp; other)&#010;@@ -79,19 +77,16 @@ status_t EtchValidatorBoolean::validateV&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorBoolean::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorBoolean::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorBoolean(ndim);&#010;+    val = new EtchValidatorBoolean(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorBoolean(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorBoolean(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorBoolean has been created");&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;@@ -99,6 +94,6 @@ status_t EtchValidatorBoolean::Get(capu:&#010; }&#010; &#010; status_t EtchValidatorBoolean::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorBoolean::Get(mNDims - 1, val);&#010;+  return EtchValidatorBoolean::Get(mRuntime, mNDims - 1, val);&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,14 +31,12 @@ const EtchObjectType* EtchValidatorByte:&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorByte::EtchValidatorByte(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorByte::TYPE(), EtchByte::TYPE(), EtchByte::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorByte::EtchValidatorByte(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: mRuntime(runtime), EtchTypeValidator(EtchValidatorByte::TYPE(), EtchByte::TYPE(), EtchByte::TYPE(), ndim) {&#010; }&#010; &#010; EtchValidatorByte::EtchValidatorByte(const EtchValidatorByte&amp; other)&#010;-: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+: mRuntime(other.mRuntime), EtchTypeValidator(other) {&#010; &#010; }&#010; &#010;@@ -123,19 +121,16 @@ status_t EtchValidatorByte::validateValu&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorByte::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorByte::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorByte(ndim);&#010;+    val = new EtchValidatorByte(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorByte(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorByte(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), "EtchValidatorByte", "EtchValidatorByte has been created");&#010; &#010;   }&#010;@@ -144,5 +139,5 @@ status_t EtchValidatorByte::Get(capu::ui&#010; }&#010; &#010; status_t EtchValidatorByte::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorByte::Get(mNDims - 1, val);&#010;+  return EtchValidatorByte::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp Wed Oct 17 06:50:01 2012&#010;@@ -116,14 +116,14 @@ const EtchObjectType* EtchValidatorCusto&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorCustom::EtchValidatorCustom(const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub)&#010;-  : EtchTypeValidator(EtchValidatorCustom::TYPE(), type, type, ndim) {&#010;+EtchValidatorCustom::EtchValidatorCustom(EtchRuntime* runtime, const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub)&#010;+  : EtchTypeValidator(EtchValidatorCustom::TYPE(), type, type, ndim), mRuntime(runtime) {&#010;   // TODO refacotor type hierarchy&#010;   mSubclass = sub;&#010; }&#010; &#010; EtchValidatorCustom::EtchValidatorCustom(const EtchValidatorCustom&amp; other)&#010;- : EtchTypeValidator(other) {&#010;+ : EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010; &#010; }&#010; &#010;@@ -155,24 +155,21 @@ status_t EtchValidatorCustom::validateVa&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorCustom::Get(capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorCustom::Get(EtchRuntime* runtime, capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010; &#010;   EtchValidatorCustomKey key(type, ndim, sub);&#010;   if (Validators(runtime).get(key, &amp;val) == ETCH_ENOT_EXIST) {&#010;-    val = new EtchValidatorCustom(type, ndim, sub);&#010;+    val = new EtchValidatorCustom(runtime, type, ndim, sub);&#010;     Validators(runtime).put(key, val);&#010;   }&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchValidatorCustom::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorCustom::Get(mNDims - 1, mExpectedType-&gt;getObjectComponentType(), mSubclass, val);&#010;+  return EtchValidatorCustom::Get(mRuntime, mNDims - 1, mExpectedType-&gt;getObjectComponentType(), mSubclass, val);&#010; }&#010; &#010; EtchHashTable&lt;EtchValidatorCustomKey, capu::SmartPointer&lt;EtchValidator&gt; &gt;&amp; EtchValidatorCustom::Validators(EtchRuntime* runtime) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp Wed Oct 17 06:50:01 2012&#010;@@ -30,10 +30,8 @@ const EtchObjectType* EtchValidatorDoubl&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorDouble::EtchValidatorDouble(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorDouble::TYPE(), EtchDouble::TYPE(), EtchDouble::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorDouble::EtchValidatorDouble(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorDouble::TYPE(), EtchDouble::TYPE(), EtchDouble::TYPE(), ndim), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorDouble::EtchValidatorDouble(const EtchValidatorDouble&amp; other)&#010;@@ -78,19 +76,16 @@ status_t EtchValidatorDouble::validateVa&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorDouble::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-    //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorDouble::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorDouble(ndim);&#010;+    val = new EtchValidatorDouble(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorDouble(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorDouble(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorDouble has been created");&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;@@ -98,5 +93,5 @@ status_t EtchValidatorDouble::Get(capu::&#010; }&#010; &#010; status_t EtchValidatorDouble::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorDouble::Get(mNDims - 1, val);&#010;+  return EtchValidatorDouble::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorFloat&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorFloat::EtchValidatorFloat(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorFloat::TYPE(), EtchFloat::TYPE(), EtchFloat::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorFloat::EtchValidatorFloat(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorFloat::TYPE(), EtchFloat::TYPE(), EtchFloat::TYPE(), ndim), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorFloat::EtchValidatorFloat(const EtchValidatorFloat&amp; other)&#010;@@ -78,19 +76,16 @@ status_t EtchValidatorFloat::validateVal&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorFloat::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorFloat::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorFloat(ndim);&#010;+    val = new EtchValidatorFloat(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorFloat(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorFloat(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorFloat has been created");&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;@@ -98,5 +93,5 @@ status_t EtchValidatorFloat::Get(capu::u&#010; }&#010; &#010; status_t EtchValidatorFloat::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorFloat::Get(mNDims - 1, val);&#010;+  return EtchValidatorFloat::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399114 [2/4] - in /incubator/etch/trunk: binding-cpp/runtime/include/common/ binding-cpp/runtime/include/serialization/ binding-cpp/runtime/include/support/ binding-cpp/runtime/include/transport/ binding-cpp/runtime/include/util/ binding-...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017065010.E22FA2388A29@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017065010-E22FA2388A29@eris-apache-org%3e</id>
<updated>2012-10-17T06:50:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,14 +31,12 @@ const EtchObjectType* EtchValidatorInt::&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorInt::EtchValidatorInt(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorInt::TYPE(), EtchInt32::TYPE(), EtchInt32::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorInt::EtchValidatorInt(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: mRuntime(runtime), EtchTypeValidator(EtchValidatorInt::TYPE(), EtchInt32::TYPE(), EtchInt32::TYPE(), ndim) {&#010; }&#010; &#010; EtchValidatorInt::EtchValidatorInt(const EtchValidatorInt&amp; other)&#010;-: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+: mRuntime(other.mRuntime), EtchTypeValidator(other) {&#010; &#010; }&#010; &#010;@@ -115,19 +113,16 @@ status_t EtchValidatorInt::validateValue&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorInt::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorInt::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorInt(ndim);&#010;+    val = new EtchValidatorInt(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorInt(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorInt(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorInt has been created");&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;@@ -135,5 +130,5 @@ status_t EtchValidatorInt::Get(capu::uin&#010; }&#010; &#010; status_t EtchValidatorInt::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorInt::Get(mNDims - 1, val);&#010;+  return EtchValidatorInt::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorLong:&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorLong::EtchValidatorLong(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorLong::TYPE(), EtchLong::TYPE(), EtchLong::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorLong::EtchValidatorLong(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorLong::TYPE(), EtchLong::TYPE(), EtchLong::TYPE(), ndim), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorLong::EtchValidatorLong(const EtchValidatorLong&amp; other)&#010;@@ -109,19 +107,16 @@ status_t EtchValidatorLong::validateValu&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorLong::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorLong::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorLong(ndim);&#010;+    val = new EtchValidatorLong(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorLong(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorLong(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorLong has been created");&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;@@ -129,5 +124,5 @@ status_t EtchValidatorLong::Get(capu::ui&#010; }&#010; &#010; status_t EtchValidatorLong::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorLong::Get(mNDims - 1, val);&#010;+  return EtchValidatorLong::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp Wed Oct 17 06:50:01 2012&#010;@@ -29,10 +29,8 @@ const EtchObjectType* EtchValidatorNone:&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorNone::EtchValidatorNone()&#010;-: EtchValidator(EtchValidatorNone::TYPE()) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorNone::EtchValidatorNone(EtchRuntime* runtime)&#010;+: EtchValidator(EtchValidatorNone::TYPE()), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorNone::EtchValidatorNone(const EtchValidatorNone&amp; other)&#010;@@ -58,12 +56,9 @@ status_t EtchValidatorNone::validateValu&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorNone::Get(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorNone::Get(EtchRuntime* runtime, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (Validators(runtime)[0].get() == NULL) {&#010;-    Validators(runtime)[0] = new EtchValidatorNone();&#010;+    Validators(runtime)[0] = new EtchValidatorNone(runtime);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), "EtchValidatorNone", "EtchValidatorNone has been created");&#010;   }&#010;   val = Validators(runtime)[0];&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp Wed Oct 17 06:50:01 2012&#010;@@ -29,10 +29,8 @@ const EtchObjectType* EtchValidatorObjec&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorObject::EtchValidatorObject(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorObject::TYPE(), EtchObject::TYPE(), EtchObject::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorObject::EtchValidatorObject(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorObject::TYPE(), EtchObject::TYPE(), EtchObject::TYPE(), ndim), mRuntime(runtime) {&#010;   mSubclass = true;&#010; }&#010; &#010;@@ -65,25 +63,22 @@ status_t EtchValidatorObject::validateVa&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorObject::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorObject::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS)&#010;     return ETCH_EINVAL;&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorObject(ndim);&#010;+    val = new EtchValidatorObject(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   //TODO thread safety&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), "EtchValidatorObject", "EtchValidatorObject has been created");&#010;-    Validators(runtime)[ndim] = new EtchValidatorObject(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorObject(runtime, ndim);&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchValidatorObject::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorObject::Get(mNDims - 1, val);&#010;+  return EtchValidatorObject::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorRunti&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorRuntimeException::EtchValidatorRuntimeException()&#010;-: EtchValidator(EtchValidatorRuntimeException::TYPE()) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorRuntimeException::EtchValidatorRuntimeException(EtchRuntime* runtime)&#010;+: EtchValidator(EtchValidatorRuntimeException::TYPE()), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorRuntimeException::EtchValidatorRuntimeException(const EtchValidatorRuntimeException&amp; other)&#010;@@ -62,12 +60,9 @@ status_t EtchValidatorRuntimeException::&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorRuntimeException::Get(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorRuntimeException::Get(EtchRuntime* runtime, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (Validators(runtime)[0].get() == NULL) {&#010;-    Validators(runtime)[0] = new EtchValidatorRuntimeException();&#010;+    Validators(runtime)[0] = new EtchValidatorRuntimeException(runtime);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), "EtchValidatorRuntimeException", "EtchValidatorRuntimeException has been created");&#010;   }&#010;   val = Validators(runtime)[0];&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorShort&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorShort::EtchValidatorShort(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorShort::TYPE(), EtchShort::TYPE(), EtchShort::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorShort::EtchValidatorShort(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorShort::TYPE(), EtchShort::TYPE(), EtchShort::TYPE(), ndim), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorShort::EtchValidatorShort(const EtchValidatorShort&amp; other)&#010;@@ -118,25 +116,22 @@ status_t EtchValidatorShort::validateVal&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorShort::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorShort::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorShort(ndim);&#010;+    val = new EtchValidatorShort(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), "EtchValidatorShort", "EtchValidatorShort has been created");&#010;-    Validators(runtime)[ndim] = new EtchValidatorShort(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorShort(runtime, ndim);&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchValidatorShort::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorShort::Get(mNDims - 1, val);&#010;+  return EtchValidatorShort::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp Wed Oct 17 06:50:01 2012&#010;@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorStrin&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorString::EtchValidatorString(capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorString::TYPE(), EtchString::TYPE(), EtchString::TYPE(), ndim) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorString::EtchValidatorString(EtchRuntime* runtime, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorString::TYPE(), EtchString::TYPE(), EtchString::TYPE(), ndim), mRuntime(runtime) {&#010; }&#010; &#010; EtchValidatorString::EtchValidatorString(const EtchValidatorString&amp; other)&#010;@@ -76,19 +74,16 @@ status_t EtchValidatorString::validateVa&#010;   }&#010; }&#010; &#010;-status_t EtchValidatorString::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorString::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   if (ndim &gt;= MAX_CACHED) {&#010;-    val = new EtchValidatorString(ndim);&#010;+    val = new EtchValidatorString(runtime, ndim);&#010;     return ETCH_OK;&#010;   }&#010;   if (Validators(runtime)[ndim].get() == NULL) {&#010;-    Validators(runtime)[ndim] = new EtchValidatorString(ndim);&#010;+    Validators(runtime)[ndim] = new EtchValidatorString(runtime, ndim);&#010;     CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorString has been created");&#010;   }&#010;   val = Validators(runtime)[ndim];&#010;@@ -96,5 +91,5 @@ status_t EtchValidatorString::Get(capu::&#010; }&#010; &#010; status_t EtchValidatorString::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return EtchValidatorString::Get(mNDims - 1, val);&#010;+  return EtchValidatorString::Get(mRuntime, mNDims - 1, val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp Wed Oct 17 06:50:01 2012&#010;@@ -26,14 +26,13 @@ const EtchObjectType* EtchValidatorStruc&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValidatorStructValue::EtchValidatorStructValue(EtchType* type, capu::uint32_t ndim)&#010;-: EtchTypeValidator(EtchValidatorStructValue::TYPE(), EtchStructValue::TYPE(), EtchStructValue::TYPE(), ndim), mType(type) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchValidatorStructValue::EtchValidatorStructValue(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim)&#010;+: EtchTypeValidator(EtchValidatorStructValue::TYPE(), EtchStructValue::TYPE(), EtchStructValue::TYPE(), ndim)&#010;+, mRuntime(runtime), mType(type) {&#010; }&#010; &#010; EtchValidatorStructValue::EtchValidatorStructValue(const EtchValidatorStructValue&amp; other)&#010;-: EtchTypeValidator(other), mType(other.mType), mRuntime(other.mRuntime) {&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime), mType(other.mType) {&#010; &#010; }&#010; &#010;@@ -73,18 +72,15 @@ capu::bool_t EtchValidatorStructValue::v&#010; }&#010; &#010; status_t EtchValidatorStructValue::getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  return Get(mType, mNDims - 1, val);&#010;+  return Get(mRuntime, mType, mNDims - 1, val);&#010; }&#010; &#010;-status_t EtchValidatorStructValue::Get(EtchType* type, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;+status_t EtchValidatorStructValue::Get(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;   CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorShort has been created");&#010;-  val = capu::SmartPointer &lt;EtchValidator &gt; (new EtchValidatorStructValue(type, ndim));&#010;+  val = capu::SmartPointer &lt;EtchValidator &gt; (new EtchValidatorStructValue(runtime, type, ndim));&#010;   return ETCH_OK;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp Wed Oct 17 06:50:01 2012&#010;@@ -78,7 +78,7 @@ status_t EtchDefaultServerFactory::trans&#010;   if(mListener == NULL) {&#010;     return ETCH_ERANGE;&#010;   }&#010;-  return mListener-&gt;transportControl(control, value);;&#010;+  return mListener-&gt;transportControl(control, value);&#010; }&#010; &#010; status_t EtchDefaultServerFactory::transportNotify( capu::SmartPointer&lt;EtchObject&gt; event ) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp Wed Oct 17 06:50:01 2012&#010;@@ -24,10 +24,8 @@&#010; &#010; static char* TAG = "EtchRemoteBase";&#010; &#010;-EtchRemoteBase::EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack) &#010;-  : mSvc(svc), mVf(vf), mStack(stack) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchRemoteBase::EtchRemoteBase(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack)&#010;+  : mRuntime(runtime), mSvc(svc), mVf(vf), mStack(stack) {&#010; }&#010; &#010; EtchRemoteBase::~EtchRemoteBase() {&#010;@@ -51,7 +49,7 @@ status_t EtchRemoteBase::send(capu::Smar&#010; }&#010; &#010; status_t EtchRemoteBase::begincall(capu::SmartPointer&lt;EtchMessage&gt; msg, EtchMailbox *&amp;result) {&#010;-  CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), TAG, "Begin call for the message is initiated");  &#010;+  CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), TAG, "Begin call for the message is initiated");&#010;   return mSvc-&gt;begincall(msg, result);&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp Wed Oct 17 06:50:01 2012&#010;@@ -21,21 +21,15 @@&#010; #include "support/EtchTransportHelper.h"&#010; #include "util/EtchLogger.h"&#010; &#010;-//TODO remove this after refactoring&#010;-EtchRuntime* EtchRuntime::sRuntime = NULL;&#010;-&#010; EtchRuntime::EtchRuntime()&#010;-  : mIsClosed(false)&#010;-  , mLogger(NULL) {&#010;+  : mIsClosed(false) {&#010;   mMutex.lock();&#010;   mId = getNextId();&#010;   mMutex.unlock();&#010;-&#010;-  //TODO remove this after refactoring&#010;-  sRuntime = this;&#010; }&#010; &#010; EtchRuntime::~EtchRuntime() {&#010;+  //do nothing&#010; }&#010; &#010; capu::uint64_t EtchRuntime::getId() {&#010;@@ -101,19 +95,6 @@ capu::uint64_t EtchRuntime::getNextId() &#010;   return sId++;&#010; }&#010; &#010;-status_t EtchRuntime::setLogger(EtchLogger* logger) {&#010;-  if(logger == NULL) {&#010;-    return ETCH_EINVAL;&#010;-  }&#010;-  mLogger = logger;&#010;-  return ETCH_OK;&#010;-}&#010;-&#010;-EtchLogger* EtchRuntime::getLogger() {&#010;+EtchLogger&amp; EtchRuntime::getLogger() {&#010;   return mLogger;&#010; }&#010;-&#010;-EtchRuntime* EtchRuntime::getRuntime() {&#010;-  return sRuntime;&#010;-}&#010;-&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp Wed Oct 17 06:50:01 2012&#010;@@ -23,19 +23,19 @@ const EtchObjectType* EtchStackClient::T&#010;    return &amp;TYPE;&#010; }&#010; &#010;-EtchStackClient::EtchStackClient() : EtchStack(), mStaticResources(NULL) {&#010;+EtchStackClient::EtchStackClient(EtchRuntime* runtime) : EtchStack(), mRuntime(runtime), mStaticResources(NULL) {&#010;   addObjectType(EtchStackClient::TYPE());&#010; }&#010; &#010; EtchStackClient::EtchStackClient(const EtchStackClient&amp; other)&#010;- : EtchStack(other), mStaticResources(other.mStaticResources)&#010;+ : EtchStack(other), mRuntime(other.mRuntime), mStaticResources(other.mStaticResources)&#010; {&#010; &#010; }&#010; &#010; EtchStackClient::~EtchStackClient() {&#010;   if (mStaticResources != NULL) {&#010;-    EtchTransportHelper::DestroyResources(mStaticResources);&#010;+    EtchTransportHelper::DestroyResources(mRuntime, mStaticResources);&#010;   }&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp Wed Oct 17 06:50:01 2012&#010;@@ -42,16 +42,13 @@ const EtchString&amp; EtchTransportHelper::X&#010;   return type;&#010; }&#010; &#010;-status_t EtchTransportHelper::InitResources(EtchResources* resources, EtchResources*&amp; result) {&#010;+status_t EtchTransportHelper::InitResources(EtchRuntime* runtime, EtchResources* resources, EtchResources*&amp; result) {&#010;   if(resources == NULL) {&#010;     resources = new EtchResources();&#010;   } else {&#010;     resources = new EtchResources(*resources);&#010;   }&#010; &#010;-  //TODO rafactor this&#010;-  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-&#010;   EtchObject* obj = NULL;&#010;   EtchObject* objOld = NULL;&#010;   // Queued Pool&#010;@@ -72,16 +69,14 @@ status_t EtchTransportHelper::InitResour&#010;   return ETCH_OK;&#010; }&#010; &#010;-status_t EtchTransportHelper::DestroyResources(EtchResources* resources) {&#010;-  status_t result; &#010;+status_t EtchTransportHelper::DestroyResources(EtchRuntime* runtime, EtchResources* resources) {&#010;+  status_t result;&#010;   if (resources == NULL) {&#010;     return ETCH_EINVAL;&#010;   } else {&#010;-    //TODO rafactor this&#010;-    EtchRuntime* runtime = EtchRuntime::getRuntime();&#010; &#010;     EtchObject* returnValue = NULL;&#010;-    &#010;+&#010;     //get queued pool and delete it&#010;     result = resources-&gt;get(EtchTransportHelper::QUEUED_POOL(), returnValue);&#010;     if(result == ETCH_OK &amp;&amp; returnValue != NULL) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp Wed Oct 17 06:50:01 2012&#010;@@ -29,20 +29,14 @@ const EtchString&amp; EtchDefaultDeliverySer&#010;   return name;&#010; }&#010; &#010;-EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchMailboxManager* transport, const EtchString&amp; uri)&#010;+EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, const EtchString&amp; uri)&#010; : mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;   EtchURL url(uri);&#010;   init(&amp;url);&#010; }&#010; &#010;-EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchMailboxManager* transport, EtchURL* uri)&#010;-: mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;+EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, EtchURL* uri)&#010;+: mRuntime(runtime), mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {&#010;   init(uri);&#010; }&#010; &#010;@@ -150,7 +144,7 @@ status_t EtchDefaultDeliveryService::tra&#010; }&#010; &#010; status_t EtchDefaultDeliveryService::begincall(capu::SmartPointer&lt;EtchMessage&gt; msg, EtchMailbox*&amp; result) {&#010;-  CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), TAG, "Begin call for the message has been initiated");  &#010;+  CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), TAG, "Begin call for the message has been initiated");&#010;   return mTransport-&gt;transportCall(NULL, msg, result);&#010; }&#010; &#010;@@ -165,7 +159,7 @@ status_t EtchDefaultDeliveryService::end&#010;   status_t res = mb-&gt;read(mbe, timeout);&#010;   if (res != ETCH_OK) {&#010;     mb-&gt;closeRead();&#010;-    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Error on mailbox read, might be caused by timeout"); &#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Error on mailbox read, might be caused by timeout");&#010;     //TODO: Add error handling&#010;     return res;&#010;   }&#010;@@ -193,7 +187,7 @@ status_t EtchDefaultDeliveryService::end&#010;   } else if (err != ETCH_OK) {&#010;     mb-&gt;closeRead();&#010;     rmsg-&gt;clear();&#010;-    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Error on getting respective field on message structure"); &#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Error on getting respective field on message structure");&#010;     delete mbe;&#010;     return ETCH_ERROR;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -26,10 +26,8 @@ const EtchString&amp; EtchMessagizer::FORMAT&#010; }&#010; capu::Mutex EtchMessagizer::mutex;&#010; &#010;-EtchMessagizer::EtchMessagizer(EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources)&#010;-: mTransport(transport) {&#010;-  //TODO refactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchMessagizer::EtchMessagizer(EtchRuntime* runtime, EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources)&#010;+: mRuntime(runtime), mTransport(transport) {&#010; &#010;   EtchString format;&#010;   EtchObject * val;&#010;@@ -38,14 +36,14 @@ EtchMessagizer::EtchMessagizer(EtchTrans&#010;   if (uri-&gt;getTerms().get(FORMAT(), &amp;format) == ETCH_OK) {&#010; &#010;     if (format.equals(&amp;EtchFormat::BINARY())) {&#010;-      mTdi = new EtchBinaryTaggedDataInput((EtchValueFactory *) val);&#010;-      mTdo = new EtchBinaryTaggedDataOutput((EtchValueFactory *) val, uri);&#010;+      mTdi = new EtchBinaryTaggedDataInput(runtime, (EtchValueFactory *) val);&#010;+      mTdo = new EtchBinaryTaggedDataOutput(runtime, (EtchValueFactory *) val, uri);&#010;     } else if (format.equals(&amp;EtchFormat::XML())) {&#010;       //we dont need serialization via xml currently&#010;     }&#010;   } else {&#010;-    mTdi = new EtchBinaryTaggedDataInput((EtchValueFactory *) val);&#010;-    mTdo = new EtchBinaryTaggedDataOutput((EtchValueFactory *) val, uri);&#010;+    mTdi = new EtchBinaryTaggedDataInput(runtime, (EtchValueFactory *) val);&#010;+    mTdo = new EtchBinaryTaggedDataOutput(runtime, (EtchValueFactory *) val, uri);&#010;   }&#010;   transport-&gt;setSession(this);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp Wed Oct 17 06:50:01 2012&#010;@@ -41,11 +41,8 @@ const EtchString&amp; EtchPacketizer::MAX_PK&#010;   return pktSize;&#010; }&#010; &#010;-EtchPacketizer::EtchPacketizer(EtchTransportData* transport, EtchString&amp; uri)&#010;-: mTransport(transport), mBodyLen(0), mWantHeader(true) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;+EtchPacketizer::EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchString&amp; uri)&#010;+: mRuntime(runtime), mTransport(transport), mBodyLen(0), mWantHeader(true) {&#010;   if (mTransport != NULL)&#010;     mTransport-&gt;setSession(this);&#010; &#010;@@ -63,11 +60,8 @@ EtchPacketizer::EtchPacketizer(EtchTrans&#010;   mSavedBuf = new EtchFlexBuffer();&#010; }&#010; &#010;-EtchPacketizer::EtchPacketizer(EtchTransportData* transport, EtchURL* uri)&#010;-: mTransport(transport), mBodyLen(0), mWantHeader(true) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;+EtchPacketizer::EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchURL* uri)&#010;+: mRuntime(runtime), mTransport(transport), mBodyLen(0), mWantHeader(true) {&#010;   EtchString value("");&#010;   if (mTransport != NULL)&#010;     transport-&gt;setSession(this);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp Wed Oct 17 06:50:01 2012&#010;@@ -19,10 +19,8 @@&#010; #include "support/EtchRuntime.h"&#010; #include "capu/os/Debug.h"&#010; &#010;-EtchPlainMailboxManager::EtchPlainMailboxManager(EtchTransportMessage* transport, const EtchString&amp; uri, EtchResources* resources)&#010;-: mSession(NULL), mTransport(transport), mUp(false) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;+EtchPlainMailboxManager::EtchPlainMailboxManager(EtchRuntime* runtime, EtchTransportMessage* transport, const EtchString&amp; uri, EtchResources* resources)&#010;+: mRuntime(runtime), mSession(NULL), mTransport(transport), mUp(false) {&#010;   capu::Debug::Assert(mRuntime != NULL);&#010;   mTransport-&gt;setSession(this);&#010; }&#010;@@ -58,7 +56,7 @@ status_t EtchPlainMailboxManager::regist&#010;     mMutex.unlock();&#010;     return ETCH_EINVAL;&#010;   }&#010;-  &#010;+&#010;   EtchMailbox* tmp = NULL;&#010;   if (mMailboxes.get(msgid, &amp;tmp) != ETCH_ENOT_EXIST) {&#010;     mMutex.unlock();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp Wed Oct 17 06:50:01 2012&#010;@@ -48,11 +48,8 @@ const EtchString&amp; EtchTcpListener::CONNE&#010;   return name;&#010; }&#010; &#010;-EtchTcpListener::EtchTcpListener(EtchURL *url)&#010;-: mPort(url-&gt;getPort()) {&#010;-  //TODO rafactor this&#010;-  mRuntime = EtchRuntime::getRuntime();&#010;-&#010;+EtchTcpListener::EtchTcpListener(EtchRuntime* runtime, EtchURL *url)&#010;+: mRuntime(runtime), mPort(url-&gt;getPort()) {&#010;   EtchString str;&#010;   if (url-&gt;getTerms().get(BACKLOG(), &amp;str) != ETCH_OK) {&#010;     mBackLog = 0;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp Wed Oct 17 06:50:01 2012&#010;@@ -69,10 +69,10 @@ status_t EtchTcpTransportFactory::newTra&#010;   }&#010;   stack-&gt;setTransportData(c);&#010; &#010;-  EtchTransportPacket* p = new EtchPacketizer(c, &amp;u);&#010;+  EtchTransportPacket* p = new EtchPacketizer(mRuntime, c, &amp;u);&#010;   stack-&gt;setTransportPacket(p);&#010; &#010;-  EtchTransportMessage* m = new EtchMessagizer(p, &amp;u, resources);&#010;+  EtchTransportMessage* m = new EtchMessagizer(mRuntime, p, &amp;u, resources);&#010;   stack-&gt;setTransportMessage(m);&#010; &#010;   //TODO: ADD FILTERS HERE&#010;@@ -98,7 +98,7 @@ status_t EtchTcpTransportFactory::newLis&#010;     //TODO secure communication&#010;     return ETCH_EUNIMPL;&#010;   } else {&#010;-    l = new EtchTcpListener(&amp;u);&#010;+    l = new EtchTcpListener(mRuntime, &amp;u);&#010;   }&#010; &#010;   result = new MySessionListener(mRuntime, this, l, uri, resources, mIsSecure);&#010;@@ -128,7 +128,7 @@ EtchTcpTransportFactory::MySessionListen&#010;     delete mFactory;&#010;   }&#010;   if (mResources != NULL) {&#010;-    EtchTransportHelper::DestroyResources(mResources);&#010;+    EtchTransportHelper::DestroyResources(mRuntime, mResources);&#010;   }&#010; &#010;   capu::List&lt;EtchStack*&gt;::Iterator it = mConnectionStacks-&gt;begin();&#010;@@ -168,7 +168,7 @@ status_t EtchTcpTransportFactory::MySess&#010; &#010; status_t EtchTcpTransportFactory::MySessionListener::sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;   if (event-&gt;equals(&amp;EtchTcpListener::CONNECTION_CHECK())) {&#010;-    //go through the list of connection and check if the connection is still dead and we have to clean the stack up &#010;+    //go through the list of connection and check if the connection is still dead and we have to clean the stack up&#010;     capu::List&lt;EtchStack*&gt;::Iterator it = mConnectionStacks-&gt;begin();&#010;     while (it.hasNext()) {&#010;       EtchStack* stack = NULL;&#010;@@ -190,7 +190,7 @@ status_t EtchTcpTransportFactory::MySess&#010;   }&#010; &#010;   return mSession-&gt;sessionNotify(event);&#010;-  &#010;+&#010; }&#010; &#010; status_t EtchTcpTransportFactory::MySessionListener::sessionAccepted(EtchSocket* connection) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp Wed Oct 17 06:50:01 2012&#010;@@ -21,13 +21,13 @@&#010; #include "util/EtchCircularQueue.h"&#010; &#010; EtchCircularQueue::EtchCircularQueue()&#010;-: mSize(10), mItems(NULL), mClosed(false), mCount(0), mHead(0), mTail(0) {&#010;+: mItems(NULL), mClosed(false), mCount(0), mSize(10), mHead(0), mTail(0) {&#010;   mItems = new EtchMailbox::EtchElement*[mSize];&#010;   capu::Memory::Set(mItems, 0, sizeof(EtchMailbox::EtchElement*) * mSize);&#010; }&#010; &#010; EtchCircularQueue::EtchCircularQueue(capu::uint32_t size)&#010;-: mSize(size), mItems(NULL), mClosed(false), mCount(0), mHead(0), mTail(0) {&#010;+: mItems(NULL), mClosed(false), mCount(0), mSize(size), mHead(0), mTail(0) {&#010;   mItems = new EtchMailbox::EtchElement*[mSize];&#010;   capu::Memory::Set(mItems, 0, sizeof(EtchMailbox::EtchElement*) * mSize);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -76,7 +76,7 @@ TEST(EtchArrayValueTest, getTest) {&#010;   capu::SmartPointer&lt;EtchObject&gt; result;&#010;   EtchArrayValue *av = new EtchArrayValue(array, 5);&#010; &#010;-  EXPECT_EQ(5, av-&gt;getSize());&#010;+  EXPECT_EQ(5u, av-&gt;getSize());&#010;   capu::int32_t index = 0;&#010; &#010;   EXPECT_EQ(ETCH_OK, av-&gt;get(index++, result));&#010;@@ -106,7 +106,7 @@ TEST(EtchArrayValueTest, getTest) {&#010; &#010;   EtchArrayValue *av2 = new EtchArrayValue(nativeTypeArray, 5);&#010; &#010;-  EXPECT_EQ(5, av2-&gt;getSize());&#010;+  EXPECT_EQ(5u, av2-&gt;getSize());&#010;   index = 0;&#010; &#010;   capu::SmartPointer&lt;EtchInt32&gt; intResult;&#010;@@ -150,7 +150,7 @@ TEST(EtchArrayValueTest, addTest) {&#010;   capu::SmartPointer&lt;EtchObject&gt; result;&#010;   EtchArrayValue *av = new EtchArrayValue(array, 5);&#010; &#010;-  EXPECT_EQ(5, av-&gt;getSize());&#010;+  EXPECT_EQ(5u, av-&gt;getSize());&#010;   capu::int32_t index = 0;&#010; &#010;   EXPECT_EQ(ETCH_OK, av-&gt;get(index++, result));&#010;@@ -173,10 +173,10 @@ TEST(EtchArrayValueTest, addTest) {&#010;   EXPECT_EQ(ETCH_OK, av-&gt;get(index++, result));&#010;   EXPECT_TRUE(result-&gt;equals(dt.get()));&#010;   //size should be doubled&#010;-  EXPECT_EQ(10, av-&gt;getSize());&#010;+  EXPECT_EQ(10u, av-&gt;getSize());&#010; &#010;   av-&gt;add(NULL);&#010;-  EXPECT_EQ(10, av-&gt;getSize());&#010;+  EXPECT_EQ(10u, av-&gt;getSize());&#010; &#010;   delete av;&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -118,9 +118,9 @@ TEST(EtchNativeArrayTest, Constructor_Ar&#010; &#010;   EtchNativeArray&lt;capu::int8_t&gt; *na2 = new EtchNativeArray&lt;capu::int8_t&gt;(2, 1, (capu::int8_t*)nativeArray);&#010; &#010;-  EXPECT_EQ(1, na2-&gt;getDim());&#010;+  EXPECT_EQ(1u, na2-&gt;getDim());&#010;   EXPECT_EQ(2, na2-&gt;getLength());&#010;-  &#010;+&#010;   capu::int8_t nativeResult;&#010;   EXPECT_EQ(ETCH_OK, na2-&gt;get(0,&amp;nativeResult));&#010;   EXPECT_EQ(1, nativeResult);&#010;@@ -138,9 +138,9 @@ TEST(EtchNativeArrayTest, Constructor_Ar&#010; &#010;   EtchNativeArray&lt;capu::int8_t&gt; *na3 = new EtchNativeArray&lt;capu::int8_t&gt;(2, 2, (capu::int8_t*)nativeArray2);&#010; &#010;-  EXPECT_EQ(2, na3-&gt;getDim());&#010;+  EXPECT_EQ(2u, na3-&gt;getDim());&#010;   EXPECT_EQ(2, na3-&gt;getLength());&#010;-  &#010;+&#010;   EXPECT_EQ(ETCH_OK, na3-&gt;get(Pos(0,0),&amp;nativeResult));&#010;   EXPECT_EQ(0, nativeResult);&#010;   EXPECT_EQ(ETCH_OK, na3-&gt;get(Pos(0,1),&amp;nativeResult));&#010;@@ -205,7 +205,7 @@ TEST(EtchNativeArrayTest, setGetArray) {&#010;   //data == NULL&#010;   ret = na-&gt;set(0,NULL,0,0,0,&amp;elementsWritten);&#010;   EXPECT_EQ(ETCH_EINVAL, ret);&#010;-  &#010;+&#010;   //data == NULL&#010;   ret = na-&gt;get(0,NULL,0,0,0,&amp;elementsRead);&#010;   EXPECT_EQ(ETCH_EINVAL, ret);&#010;@@ -230,7 +230,7 @@ TEST(EtchNativeArrayTest, setGetArray) {&#010;   ret = na-&gt;set(0, arr1, 6, 0, 6, &amp;elementsWritten);&#010;   EXPECT_EQ(ret, ETCH_OK);&#010;   EXPECT_EQ(elementsWritten, 6);&#010;-  &#010;+&#010;   na-&gt;get(0,&amp;temp);&#010;   EXPECT_EQ(temp-&gt;get(), 1);&#010;   na-&gt;set(0, int2);&#010;@@ -441,11 +441,11 @@ TEST(EtchNativeArrayTest, setSubarray) {&#010;   //fill main array&#010;   mainArray-&gt;set(Pos(0, 0, 0), int1);&#010;   mainArray-&gt;set(Pos(0, 0, 1), int2);&#010;-  &#010;+&#010;   //fill sub array&#010;   subArray-&gt;set(Pos(0),int3);&#010;   subArray-&gt;set(Pos(0),int4);&#010;-  &#010;+&#010;   //set sub array in data array, must return error&#010;   ret = mainArray-&gt;set(Pos(1, 0, 0), subArray);&#010;   EXPECT_EQ(ETCH_ERANGE, ret);&#010;@@ -500,4 +500,4 @@ TEST(EtchNativeArrayTest, setSubarray) {&#010;   delete na;&#010; &#010; &#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -71,16 +71,11 @@ class EtchAuthenticationExceptionSeriali&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -93,7 +88,7 @@ TEST_F(EtchAuthenticationExceptionSerial&#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;   EtchType* result;&#010;-  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   c2type-&gt;get(EtchAuthenticationException::TYPE(), &amp;result);&#010; &#010;   //check the added type to class to type matching&#010;@@ -109,7 +104,7 @@ TEST_F(EtchAuthenticationExceptionSerial&#010;   //check validator&#010;   type-&gt;getValidator(field, validator);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorString::Get(0, val);&#010;+  EtchValidatorString::Get(mRuntime, 0, val);&#010;   EXPECT_TRUE(validator == val);&#010;   delete type;&#010;   delete c2type;&#010;@@ -126,7 +121,7 @@ TEST_F(EtchAuthenticationExceptionSerial&#010;   capu::SmartPointer&lt;EtchObject&gt; object3;&#010;   EtchStructValue* result;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //check with invalid values&#010;   EXPECT_TRUE(test-&gt;exportValue(NULL, NULL, result) == ETCH_EINVAL);&#010;@@ -165,7 +160,7 @@ TEST_F(EtchAuthenticationExceptionSerial&#010;   capu::SmartPointer&lt;EtchObject&gt; object = new EtchAuthenticationException(message);&#010;   EtchStructValue* structValue;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   //get the serializer&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //export values&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -88,8 +88,8 @@ public:&#010;    */&#010; public:&#010; &#010;-  MyValueFactory(EtchString uri) {&#010;-    EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  MyValueFactory(EtchRuntime* runtime, EtchString uri) {&#010;+    EtchDefaultValueFactory::Init(runtime, &amp;types, &amp;class2type);&#010;     factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;   }&#010; &#010;@@ -134,8 +134,8 @@ public:&#010;     return vals;&#010;   }&#010; &#010;-  static void test(capu::SmartPointer&lt;EtchObject&gt; x, capu::SmartPointer&lt;EtchValidator&gt; v, capu::bool_t stringTypeAndField) {&#010;-    MyValueFactory vf("tcp:");&#010;+  static void test(EtchRuntime* runtime, capu::SmartPointer&lt;EtchObject&gt; x, capu::SmartPointer&lt;EtchValidator&gt; v, capu::bool_t stringTypeAndField) {&#010;+    MyValueFactory vf(runtime, "tcp:");&#010;     EtchType *mt_foo = NULL;&#010;     EtchField mf_x("x");&#010;     EtchString foo("foo");&#010;@@ -148,10 +148,10 @@ public:&#010;     capu::uint32_t length;&#010;     capu::int8_t * buffer;&#010;     //SERIALIZE DATA INTO FLEX BUFFER&#010;-    msg2bytes(msg, stringTypeAndField, length, buffer, vf);&#010;+    msg2bytes(runtime, msg, stringTypeAndField, length, buffer, vf);&#010;     capu::SmartPointer&lt;EtchMessage&gt; msg2;&#010;     //DESERIALIZE DATA FROM FLEX BYTE ARRAY&#010;-    bytes2msg(buffer, length, msg2, vf);&#010;+    bytes2msg(runtime, buffer, length, msg2, vf);&#010;     //TYPE CHECK&#010;     EXPECT_TRUE(msg2-&gt;isType(mt_foo));&#010;     EXPECT_TRUE(msg2-&gt;count() == 1);&#010;@@ -191,13 +191,13 @@ public:&#010;     }&#010;   }&#010; &#010;-  static void msg2bytes(capu::SmartPointer&lt;EtchMessage&gt; msg, capu::bool_t stringTypeAndField, capu::uint32_t &amp;size, capu::int8_t *&amp;buffer, MyValueFactory &amp;vf) {&#010;+  static void msg2bytes(EtchRuntime* runtime, capu::SmartPointer&lt;EtchMessage&gt; msg, capu::bool_t stringTypeAndField, capu::uint32_t &amp;size, capu::int8_t *&amp;buffer, MyValueFactory &amp;vf) {&#010;     capu::SmartPointer&lt;EtchFlexBuffer&gt; buf = new EtchFlexBuffer();&#010; &#010;     EtchURL u("none:");&#010;     //    u.addTerm(EtchBinaryTaggedDataOutput::STRING_TYPE_AND_FIELD(), stringTypeAndField);&#010; &#010;-    EtchBinaryTaggedDataOutput btdo(vf.factory, &amp;u);&#010;+    EtchBinaryTaggedDataOutput btdo(runtime, vf.factory, &amp;u);&#010;     EXPECT_TRUE(btdo.writeMessage(msg, buf) == ETCH_OK);&#010;     buf-&gt;setIndex(0);&#010;     size = buf-&gt;getAvailableBytes();&#010;@@ -207,23 +207,23 @@ public:&#010;     return;&#010;   }&#010; &#010;-  static void bytes2msg(capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer&lt;EtchMessage&gt; &amp;msg, MyValueFactory &amp;vf) {&#010;-    bytes2msg(buf, length, msg, LEVEL_FULL, vf);&#010;+  static void bytes2msg(EtchRuntime* runtime, capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer&lt;EtchMessage&gt; &amp;msg, MyValueFactory &amp;vf) {&#010;+    bytes2msg(runtime, buf, length, msg, LEVEL_FULL, vf);&#010;   }&#010; &#010;-  static void bytes2msg(capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer&lt;EtchMessage&gt; &amp;msg, EtchLevel level, MyValueFactory &amp;vf) {&#010;+  static void bytes2msg(EtchRuntime* runtime, capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer&lt;EtchMessage&gt; &amp;msg, EtchLevel level, MyValueFactory &amp;vf) {&#010;     EtchLevel oldLevel = vf.factory-&gt;setLevel(level);&#010;-    EtchBinaryTaggedDataInput btdi(vf.factory);&#010;+    EtchBinaryTaggedDataInput btdi(runtime, vf.factory);&#010;     capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer(buf, length);&#010;     buffer-&gt;setIndex(0);&#010;     EXPECT_TRUE(btdi.readMessage(buffer, msg) == ETCH_OK);&#010;     vf.factory-&gt;setLevel(oldLevel);&#010;   }&#010; &#010;-  static void test_bto_write(capu::SmartPointer&lt;EtchObject&gt; x, capu::int8_t *compare_buffer, capu::SmartPointer&lt;EtchValidator&gt; v) {&#010;+  static void test_bto_write(EtchRuntime* runtime, capu::SmartPointer&lt;EtchObject&gt; x, capu::int8_t *compare_buffer, capu::SmartPointer&lt;EtchValidator&gt; v) {&#010;     EtchString type("a");&#010;     EtchString field("b");&#010;-    MyValueFactory vf("tcp:");&#010;+    MyValueFactory vf(runtime, "tcp:");&#010; &#010;     EtchType t(1, type);&#010;     EtchField f(2, field);&#010;@@ -232,7 +232,7 @@ public:&#010;     capu::SmartPointer&lt;EtchMessage&gt; msg = new EtchMessage(&amp;t, vf.factory);&#010;     msg-&gt;put(f, x);&#010;     EtchURL u("none:");&#010;-    EtchBinaryTaggedDataOutput btdo(vf.factory, &amp;u);&#010;+    EtchBinaryTaggedDataOutput btdo(runtime, vf.factory, &amp;u);&#010;     capu::SmartPointer&lt;EtchFlexBuffer&gt; buf = new EtchFlexBuffer();&#010;     buf-&gt;setByteRepresentation(ETCH_BIG_ENDIAN);&#010;     EXPECT_TRUE(btdo.writeMessage(msg, buf) == ETCH_OK);&#010;@@ -253,16 +253,11 @@ class EtchBinaryTaggedDataInputOutputTes&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -272,14 +267,14 @@ protected:&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, createTest) {&#010;   MockValueFactory9 *factory = new MockValueFactory9();&#010;-  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(factory);&#010;+  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(mRuntime, factory);&#010;   delete dataIn;&#010;   delete factory;&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, checkTest) {&#010;   MockValueFactory9 *factory = new MockValueFactory9();&#010;-  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(factory);&#010;+  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(mRuntime, factory);&#010; &#010;   // i'm testing with hard coded constants on the left hand&#010;   // side here because this represents our external interface&#010;@@ -421,13 +416,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorBoolean::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorBoolean::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorBoolean::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; //&#010; &#010;@@ -445,13 +440,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorInt::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorInt::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorInt::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorInt::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, string_serialization) {&#010;@@ -470,13 +465,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorString::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorString::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorString::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorString::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, long_serialization) {&#010;@@ -493,13 +488,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorLong::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorLong::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorLong::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, byte_serialization) {&#010;@@ -507,8 +502,8 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   capu::SmartPointer&lt;EtchByte&gt; content1 = new EtchByte(90);&#010;   //array can not be tested because it is optimized as native&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorByte::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;+  EtchValidatorByte::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, short_serialization) {&#010;@@ -525,13 +520,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorShort::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorShort::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorShort::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorShort::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, float_serialization) {&#010;@@ -548,13 +543,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorFloat::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorFloat::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorFloat::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorFloat::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, double_serialization) {&#010;@@ -571,20 +566,20 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorDouble::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorDouble::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorDouble::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorDouble::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, empty_string_serialization) {&#010;   capu::SmartPointer&lt;EtchString&gt; str = new EtchString(NULL, 0, "utf-8");&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorString::Get(0, val);&#010;-  Utility::test(str, val, false);&#010;+  EtchValidatorString::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, str, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, date_serialization) {&#010;@@ -605,13 +600,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorObject::Get(2, val);&#010;-  Utility::test(carray1, val, false);&#010;-  EtchValidatorObject::Get(0, val);&#010;-  Utility::test(content1, val, false);&#010;-  Utility::test(content2, val, false);&#010;-  Utility::test(content3, val, false);&#010;-  Utility::test(content4, val, false);&#010;+  EtchValidatorObject::Get(mRuntime, 2, val);&#010;+  Utility::test(mRuntime, carray1, val, false);&#010;+  EtchValidatorObject::Get(mRuntime, 0, val);&#010;+  Utility::test(mRuntime, content1, val, false);&#010;+  Utility::test(mRuntime, content2, val, false);&#010;+  Utility::test(mRuntime, content3, val, false);&#010;+  Utility::test(mRuntime, content4, val, false);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_object_serialization) {&#010;@@ -624,8 +619,8 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(1, content2);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorObject::Get(1, val);&#010;-  Utility::test_bto_write(carray1, byte_array, val);&#010;+  EtchValidatorObject::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray1, byte_array, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_boolean_write) {&#010;@@ -639,11 +634,11 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(0, content1);&#010;   carray-&gt;set(1, content2);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorBoolean::Get(0, val);&#010;-  Utility::test_bto_write(content2, byte_false, val);&#010;-  Utility::test_bto_write(content1, byte_true, val);&#010;-  EtchValidatorBoolean::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content2, byte_false, val);&#010;+  Utility::test_bto_write(mRuntime, content1, byte_true, val);&#010;+  EtchValidatorBoolean::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; &#010; }&#010; &#010;@@ -668,14 +663,14 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(2, content5);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010; &#010;-  EtchValidatorByte::Get(0, val);&#010;-  Utility::test_bto_write(content1, byte_pos, val);&#010;-  Utility::test_bto_write(content2, byte_neg, val);&#010;-  Utility::test_bto_write(content0, byte_zero, val);&#010;-  Utility::test_bto_write(content7, bytes, val);&#010;+  EtchValidatorByte::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content1, byte_pos, val);&#010;+  Utility::test_bto_write(mRuntime, content2, byte_neg, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_zero, val);&#010;+  Utility::test_bto_write(mRuntime, content7, bytes, val);&#010; &#010;-  EtchValidatorByte::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorByte::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; &#010; }&#010; &#010;@@ -695,12 +690,12 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(2, content3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010; &#010;-  EtchValidatorShort::Get(0, val);&#010;-  Utility::test_bto_write(content0, byte_pos, val);&#010;-  Utility::test_bto_write(content7, byte_neg, val);&#010;+  EtchValidatorShort::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);&#010;+  Utility::test_bto_write(mRuntime, content7, byte_neg, val);&#010; &#010;-  EtchValidatorShort::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorShort::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; &#010; }&#010; &#010;@@ -720,12 +715,12 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(2, content3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010; &#010;-  EtchValidatorInt::Get(0, val);&#010;-  Utility::test_bto_write(content0, byte_pos, val);&#010;-  Utility::test_bto_write(content7, byte_neg, val);&#010;+  EtchValidatorInt::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);&#010;+  Utility::test_bto_write(mRuntime, content7, byte_neg, val);&#010; &#010;-  EtchValidatorInt::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorInt::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_long_write) {&#010;@@ -744,12 +739,12 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(2, content3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010; &#010;-  EtchValidatorLong::Get(0, val);&#010;-  Utility::test_bto_write(content0, byte_pos, val);&#010;-  Utility::test_bto_write(content7, byte_neg, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);&#010;+  Utility::test_bto_write(mRuntime, content7, byte_neg, val);&#010; &#010;-  EtchValidatorLong::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorLong::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_float_write) {&#010;@@ -765,11 +760,11 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(2, content3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010; &#010;-  EtchValidatorFloat::Get(0, val);&#010;-  Utility::test_bto_write(content0, byte_pos, val);&#010;+  EtchValidatorFloat::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);&#010; &#010;-  EtchValidatorFloat::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorFloat::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_double_write) {&#010;@@ -785,19 +780,19 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(2, content3);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010; &#010;-  EtchValidatorDouble::Get(0, val);&#010;-  Utility::test_bto_write(content0, byte_pos, val);&#010;+  EtchValidatorDouble::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);&#010; &#010;-  EtchValidatorDouble::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorDouble::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_empty_string_write) {&#010;   capu::int8_t byte_pos[] = {3, 1, 1, 2, -110, -127};&#010;   capu::SmartPointer&lt;EtchString&gt; content0 = new EtchString("");&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorString::Get(0, val);&#010;-  Utility::test_bto_write(content0, byte_pos, val);&#010;+  EtchValidatorString::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_date_write) {&#010;@@ -814,18 +809,18 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray-&gt;set(1, content2);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorObject::Get(1, val);&#010;-  Utility::test_bto_write(carray, byte_array, val);&#010;+  EtchValidatorObject::Get(mRuntime, 1, val);&#010;+  Utility::test_bto_write(mRuntime, carray, byte_array, val);&#010; &#010;-  EtchValidatorObject::Get(0, val);&#010;-  Utility::test_bto_write(date, byte_pos, val);&#010;+  EtchValidatorObject::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, date, byte_pos, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, null_write) {&#010;   capu::int8_t byte_pos[] = {3, 1, 0, -127};&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorObject::Get(0, val);&#010;-  Utility::test_bto_write(NULL, byte_pos, val);&#010;+  EtchValidatorObject::Get(mRuntime, 0, val);&#010;+  Utility::test_bto_write(mRuntime, NULL, byte_pos, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, multi_dimension_test) {&#010;@@ -842,8 +837,8 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 0), content3);&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorBoolean::Get(2, val);&#010;-  Utility::test_bto_write(carray1, byte_pos, val);&#010;+  EtchValidatorBoolean::Get(mRuntime, 2, val);&#010;+  Utility::test_bto_write(mRuntime, carray1, byte_pos, val);&#010; }&#010; &#010; TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_multi_array_write) {&#010;@@ -860,6 +855,6 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe&#010;   carray1-&gt;set(Pos(1, 0), content3);&#010;   carray1-&gt;set(Pos(1, 1), content4);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val = NULL;&#010;-  EtchValidatorObject::Get(2, val);&#010;-  Utility::test_bto_write(carray1, byte_array ,val);&#010;+  EtchValidatorObject::Get(mRuntime, 2, val);&#010;+  Utility::test_bto_write(mRuntime, carray1, byte_array ,val);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -25,16 +25,11 @@ class EtchComboValidatorTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -46,8 +41,8 @@ TEST_F(EtchComboValidatorTest, createTes&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr2;&#010; &#010;-  EtchValidatorString::Get(0, ptr);&#010;-  EtchValidatorInt::Get(0, ptr2);&#010;+  EtchValidatorString::Get(mRuntime, 0, ptr);&#010;+  EtchValidatorInt::Get(mRuntime, 0, ptr2);&#010; &#010;   EtchComboValidator *combo = new EtchComboValidator(ptr, ptr2);&#010;   EXPECT_TRUE(combo != NULL);&#010;@@ -87,8 +82,8 @@ TEST_F(EtchComboValidatorTest, validateT&#010;   EtchComboValidator *ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr2;&#010;-  EtchValidatorInt::Get(0, ptr1);&#010;-  EtchValidatorString::Get(0, ptr2);&#010;+  EtchValidatorInt::Get(mRuntime, 0, ptr1);&#010;+  EtchValidatorString::Get(mRuntime, 0, ptr2);&#010;   ptr = new EtchComboValidator(ptr1, ptr2);&#010; &#010;   EXPECT_FALSE(ptr-&gt;validate(byte));&#010;@@ -127,8 +122,8 @@ TEST_F(EtchComboValidatorTest, validateV&#010;   EtchComboValidator *ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr2;&#010;-  EtchValidatorInt::Get(0, ptr1);&#010;-  EtchValidatorString::Get(0, ptr2);&#010;+  EtchValidatorInt::Get(mRuntime, 0, ptr1);&#010;+  EtchValidatorString::Get(mRuntime, 0, ptr2);&#010;   ptr = new EtchComboValidator(ptr1, ptr2);&#010;   //INT TESTS&#010;   EXPECT_TRUE(ptr-&gt;validateValue(byte, result) == ETCH_ERROR);&#010;@@ -154,8 +149,8 @@ TEST_F(EtchComboValidatorTest, elementVa&#010;   EtchComboValidator *ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr2;&#010;-  EtchValidatorInt::Get(1, ptr1);&#010;-  EtchValidatorString::Get(1, ptr2);&#010;+  EtchValidatorInt::Get(mRuntime, 1, ptr1);&#010;+  EtchValidatorString::Get(mRuntime, 1, ptr2);&#010;   ptr = new EtchComboValidator(ptr1, ptr2);&#010;   capu::SmartPointer&lt;EtchValidator&gt; element_validator;&#010;   ptr-&gt;getElementValidator(element_validator);&#010;@@ -207,4 +202,4 @@ TEST_F(EtchComboValidatorTest, elementVa&#010;   EXPECT_FALSE(element_validator-&gt;validate(str));&#010;   EXPECT_TRUE(element_validator-&gt;validate(str2));&#010;   delete ptr;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -71,16 +71,11 @@ class EtchDateSerializationTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -93,7 +88,7 @@ TEST_F(EtchDateSerializationTest, initTe&#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;   EtchType* result;&#010;-  EXPECT_TRUE(EtchDateSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchDateSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   c2type-&gt;get(EtchDate::TYPE(), &amp;result);&#010; &#010;   //check the added type to class to type matching&#010;@@ -109,7 +104,7 @@ TEST_F(EtchDateSerializationTest, initTe&#010;   //check validator&#010;   type-&gt;getValidator(field, validator);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;   EXPECT_TRUE(validator == val);&#010;   delete type;&#010;   delete c2type;&#010;@@ -125,7 +120,7 @@ TEST_F(EtchDateSerializationTest, export&#010;   capu::SmartPointer&lt;EtchObject&gt; object3;&#010;   EtchStructValue* result;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchDateSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchDateSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //some test values&#010;   (capu::smartpointer_cast&lt;EtchDate &gt; (object))-&gt;set(5);&#010;@@ -166,7 +161,7 @@ TEST_F(EtchDateSerializationTest, import&#010;   capu::SmartPointer&lt;EtchObject&gt; object = new EtchDate();&#010;   EtchStructValue* structValue;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchDateSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchDateSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   //get the serializer&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //some test values&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -26,16 +26,11 @@ class EtchDefaultValueFactoryTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -56,7 +51,7 @@ TEST_F(EtchDefaultValueFactoryTest, crea&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -86,7 +81,7 @@ TEST_F(EtchDefaultValueFactoryTest, type&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -169,7 +164,7 @@ TEST_F(EtchDefaultValueFactoryTest, expo&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -188,7 +183,7 @@ TEST_F(EtchDefaultValueFactoryTest, expo&#010;   EtchString strRuntime = "_Etch_RuntimeException";&#010;   test-&gt;getType(strRuntime, type);&#010;   EXPECT_TRUE(sv-&gt;isType(type));&#010;-  EXPECT_EQ(1, sv-&gt;count());&#010;+  EXPECT_EQ(1u, sv-&gt;count());&#010;   EXPECT_EQ(ETCH_OK, sv-&gt;get(EtchDefaultValueFactory::_mf_msg(), &amp;serialized));&#010;   EXPECT_TRUE(serialized-&gt;equals(&amp;str));&#010; &#010;@@ -221,7 +216,7 @@ TEST_F(EtchDefaultValueFactoryTest, impo&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -276,7 +271,7 @@ TEST_F(EtchDefaultValueFactoryTest, lock&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -319,7 +314,7 @@ TEST_F(EtchDefaultValueFactoryTest, mess&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -331,7 +326,7 @@ TEST_F(EtchDefaultValueFactoryTest, mess&#010;   EtchType *mt_foo = new EtchType(str);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;   mt_foo-&gt;putValidator(EtchDefaultValueFactory::_mf__messageId(), val);&#010; &#010;   EtchMessage *msg = new EtchMessage(mt_foo, test);&#010;@@ -369,7 +364,7 @@ TEST_F(EtchDefaultValueFactoryTest, inRe&#010;   types-&gt;get(str, _mt_x);&#010;   str.set("y");&#010;   types-&gt;get(str, _mt_y);&#010;-  EtchDefaultValueFactory::Init(types, class2type);&#010;+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);&#010;   types-&gt;lock();&#010;   class2type-&gt;lock();&#010; &#010;@@ -381,7 +376,7 @@ TEST_F(EtchDefaultValueFactoryTest, inRe&#010;   EtchType *mt_foo = new EtchType(str);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorLong::Get(0, val);&#010;+  EtchValidatorLong::Get(mRuntime, 0, val);&#010;   mt_foo-&gt;putValidator(EtchDefaultValueFactory::_mf__inReplyTo(), val);&#010; &#010;   EtchMessage *msg = new EtchMessage(mt_foo, test);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -71,16 +71,11 @@ class EtchHashTableSerializerTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -93,7 +88,7 @@ TEST_F(EtchHashTableSerializerTest, init&#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;   EtchType* result = 0;&#010;-  EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchHashTableSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   c2type-&gt;get(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), &amp;result);&#010; &#010;   //check the added type to class to type matching&#010;@@ -108,7 +103,7 @@ TEST_F(EtchHashTableSerializerTest, init&#010;   type-&gt;getField(typeName, &amp;field);&#010;   type-&gt;getValidator(field, validator);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorObject::Get(1, val);&#010;+  EtchValidatorObject::Get(mRuntime, 1, val);&#010;   EXPECT_TRUE(validator == val);&#010;   delete type;&#010;   delete c2type;&#010;@@ -125,7 +120,7 @@ TEST_F(EtchHashTableSerializerTest, expo&#010;   capu::SmartPointer&lt;EtchObject&gt; object3;&#010;   EtchStructValue* result;&#010;   //  //initialize the serializer&#010;-  EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchHashTableSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //  //check with invalid values&#010;   EXPECT_TRUE(test-&gt;exportValue(NULL, NULL, result) == ETCH_EINVAL);&#010;@@ -176,7 +171,7 @@ TEST_F(EtchHashTableSerializerTest, impo&#010;   capu::SmartPointer&lt;EtchObject&gt; object2_value = new EtchInt32(91);&#010;   EtchStructValue* structValue;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchHashTableSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   //get the serializer&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //add some test entries&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -72,16 +72,11 @@ class EtchListSerializerTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -94,7 +89,7 @@ TEST_F(EtchListSerializerTest, initTest)&#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;   EtchType* result;&#010;-  EXPECT_TRUE(EtchListSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchListSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   c2type-&gt;get(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), &amp;result);&#010; &#010;   //check the added type to class to type matching&#010;@@ -110,7 +105,7 @@ TEST_F(EtchListSerializerTest, initTest)&#010;   type-&gt;getValidator(field, validator);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorObject::Get(1, val);&#010;+  EtchValidatorObject::Get(mRuntime, 1, val);&#010;   EXPECT_TRUE(validator == val);&#010;   delete type;&#010;   delete c2type;&#010;@@ -126,7 +121,7 @@ TEST_F(EtchListSerializerTest, exportTes&#010;   capu::SmartPointer&lt;EtchObject&gt; object3;&#010;   EtchStructValue* result;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchListSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchListSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //check with invalid values&#010;   EXPECT_TRUE(test-&gt;exportValue(NULL, NULL, result) == ETCH_EINVAL);&#010;@@ -173,7 +168,7 @@ TEST_F(EtchListSerializerTest, importTes&#010;   capu::SmartPointer&lt;EtchObject&gt; object2 = NULL;&#010;   EtchStructValue* structValue;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchListSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchListSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   //get the serializer&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //check with invalid values&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -73,16 +73,11 @@ class EtchRuntimeExceptionSerializationT&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -95,7 +90,7 @@ TEST_F(EtchRuntimeExceptionSerialization&#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;   EtchType* result;&#010;-  EtchRuntimeExceptionSerializer::Init(type, c2type);&#010;+  EtchRuntimeExceptionSerializer::Init(mRuntime, type, c2type);&#010;   c2type-&gt;get(EtchRuntimeException::TYPE(), &amp;result);&#010; &#010;   //check the added type to class to type matching&#010;@@ -111,7 +106,7 @@ TEST_F(EtchRuntimeExceptionSerialization&#010;   //check validator&#010;   type-&gt;getValidator(field, validator);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorString::Get(0, val);&#010;+  EtchValidatorString::Get(mRuntime, 0, val);&#010;   EXPECT_TRUE(validator == val);&#010;   delete type;&#010;   delete c2type;&#010;@@ -128,7 +123,7 @@ TEST_F(EtchRuntimeExceptionSerialization&#010;   capu::SmartPointer&lt;EtchObject&gt; object3;&#010;   EtchStructValue* result;&#010;   //initialize the serializer&#010;-  EtchRuntimeExceptionSerializer::Init(type, c2type);&#010;+  EtchRuntimeExceptionSerializer::Init(mRuntime, type, c2type);&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //check with invalid values&#010;   EXPECT_TRUE(test-&gt;exportValue(NULL, NULL, result) == ETCH_EINVAL);&#010;@@ -167,7 +162,7 @@ TEST_F(EtchRuntimeExceptionSerialization&#010;   capu::SmartPointer&lt;EtchObject&gt; object = new EtchRuntimeException(message, ETCH_ERROR);&#010;   EtchStructValue* structValue;&#010;   //initialize the serializer&#010;-  EtchRuntimeExceptionSerializer::Init(type, c2type);&#010;+  EtchRuntimeExceptionSerializer::Init(mRuntime, type, c2type);&#010;   //get the serializer&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //export values&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -71,16 +71,11 @@ class EtchSetSerializerTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -93,7 +88,7 @@ TEST_F(EtchSetSerializerTest, initTest) &#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;   EtchType* result;&#010;-  EXPECT_TRUE(EtchSetSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchSetSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   c2type-&gt;get(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), &amp;result);&#010; &#010;   //check the added type to class to type matching&#010;@@ -108,7 +103,7 @@ TEST_F(EtchSetSerializerTest, initTest) &#010;   type-&gt;getField(typeName, &amp;field);&#010;   type-&gt;getValidator(field, validator);&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;-  EtchValidatorObject::Get(1, val);&#010;+  EtchValidatorObject::Get(mRuntime, 1, val);&#010;   EXPECT_TRUE(validator == val);&#010;   delete type;&#010;   delete c2type;&#010;@@ -124,7 +119,7 @@ TEST_F(EtchSetSerializerTest, exportTest&#010;   capu::SmartPointer&lt;EtchObject&gt; object3;&#010;   EtchStructValue* result;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchSetSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchSetSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //check with invalid values&#010;   EXPECT_TRUE(test-&gt;exportValue(NULL, NULL, result) == ETCH_EINVAL);&#010;@@ -170,7 +165,7 @@ TEST_F(EtchSetSerializerTest, importTest&#010;   capu::SmartPointer&lt;EtchObject&gt; object2;&#010;   EtchStructValue* structValue;&#010;   //initialize the serializer&#010;-  EXPECT_TRUE(EtchSetSerializer::Init(type, c2type) == ETCH_OK);&#010;+  EXPECT_TRUE(EtchSetSerializer::Init(mRuntime, type, c2type) == ETCH_OK);&#010;   //get the serializer&#010;   EtchImportExportHelper* test = type-&gt;getImportExportHelper();&#010;   //check with invalid values&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp?rev=1399114&amp;r1=1399113&amp;r2=1399114&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp Wed Oct 17 06:50:01 2012&#010;@@ -161,16 +161,11 @@ class EtchStructValueTest&#010; protected:&#010;   virtual void SetUp() {&#010;     mRuntime = new EtchRuntime();&#010;-    mRuntime-&gt;setLogger(new EtchLogger());&#010;     mRuntime-&gt;start();&#010;   }&#010; &#010;   virtual void TearDown() {&#010;     mRuntime-&gt;shutdown();&#010;-    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;-    if(logger != NULL) {&#010;-      delete logger;&#010;-    }&#010;     delete mRuntime;&#010;     mRuntime = NULL;&#010;   }&#010;@@ -189,8 +184,8 @@ TEST_F(EtchStructValueTest, createTest) &#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -216,8 +211,8 @@ TEST_F(EtchStructValueTest, getTypeTest)&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -242,8 +237,8 @@ TEST_F(EtchStructValueTest, isType) {&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -278,8 +273,8 @@ TEST_F(EtchStructValueTest, putTest_FULL&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -328,8 +323,8 @@ TEST_F(EtchStructValueTest, putTest_MISS&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -378,8 +373,8 @@ TEST_F(EtchStructValueTest, putTest_NONE&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -422,8 +417,8 @@ TEST_F(EtchStructValueTest, getTest) {&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;   capu::SmartPointer&lt;EtchValidator&gt; v2;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;-  EtchValidatorBoolean::Get(0, v2);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v2);&#010; &#010;   comp-&gt;putValidator(field1, v1);&#010;   comp-&gt;putValidator(field2, v2);&#010;@@ -462,7 +457,7 @@ TEST_F(EtchStructValueTest, removeTest) &#010;   EtchType* comp = new EtchType(90, typeName);&#010; &#010;   capu::SmartPointer&lt;EtchValidator&gt; v1;&#010;-  EtchValidatorBoolean::Get(0, v1);&#010;+  EtchValidatorBoolean::Get(mRuntime, 0, v1);&#010;   comp-&gt;putValidator(field1, v1);&#010; &#010;   EtchStructValue *sv = new EtchStructValue(comp, factory);&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399113 - in /incubator/etch/trunk/binding-cpp: compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ runtime/include/support/ runtime/include/transport/ runtime/src/main/support/ runtime/src/main/transport/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017064929.35F2C23889B8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017064929-35F2C23889B8@eris-apache-org%3e</id>
<updated>2012-10-17T06:49:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:49:27 2012&#010;New Revision: 1399113&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399113&amp;view=rev&#010;Log:&#010;ETCH-243 Fixed bug in void function calls&#010;&#010;Changed Connection Checker in order to avoid Race Condition&#010;Enabling recreation of runtime if it has been destroyed before&#010;&#010;Change-Id: Ia7d16052af22a5f7a4dfa2ee0708506222add095&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;Wed Oct 17 06:49:27 2012&#010;@@ -55,14 +55,21 @@ status_t $clname::$n.name()AsyncResultRe&#010;       // TODO set result to a runtime exception &#010;       return ETCH_OK;&#010;     }&#010;-    if(result-&gt;isInstanceOf(EtchException::TYPE())) {&#010;-      setException(result);&#010;-    }&#010;+    &#010;+    //result is NULL if it was a void call and no exception has been set&#010;+    if (result.get() != NULL) {&#010;+      if(result-&gt;isInstanceOf(EtchException::TYPE())) {&#010;+        setException(result);&#010;+      }&#010; #if($n.hasReturn())&#010;-    else {&#010;-      setResult(result);&#010;-    }&#010;+      else {&#010;+        setResult(result);&#010;+      }&#010; #end&#010;+    } else {&#010;+      setMailboxStatus();&#010;+    }&#010;+&#010; &#010;   }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;Wed Oct 17 06:49:27 2012&#010;@@ -46,10 +46,6 @@ status_t $vf::Etch${intf.name()}RuntimeL&#010;     //the runtime is closed and is removed&#010;     $vf::SRuntimes.removeAt(index);&#010;   }&#010;-  if ($vf::SRuntimes.isEmpty()) {&#010;-    //clean up all static members&#010;-    $vf::DestroyValueFactory();&#010;-  }&#010;   return ETCH_OK;&#010; }&#010; &#010;@@ -148,13 +144,13 @@ class ImportExportHelper$n.vname( $helpe&#010; &#010; //Static Variable Initialization&#010; EtchTypeMap* $vf::types() {&#010;-static EtchTypeMap* ret = new EtchTypeMap();&#010;-return ret;&#010;+static EtchTypeMap ret;&#010;+return &amp;ret;&#010; }&#010; &#010; EtchClass2TypeMap* $vf::class2type() {&#010;-static EtchClass2TypeMap* ret = new EtchClass2TypeMap();&#010;-return ret;&#010;+static EtchClass2TypeMap ret;&#010;+return &amp;ret;&#010; }&#010; &#010; #foreach ( $n in $intf.iterator() )&#010;@@ -399,12 +395,4 @@ status_t $vf::InitValueFactory(EtchRunti&#010;   class2type()-&gt;lock();&#010;   &#010;   return ETCH_OK;&#010;-}&#010;-&#010;-status_t $vf::DestroyValueFactory()&#010;-{&#010;-  $vf::types()-&gt;clear();&#010;-  delete $vf::types();&#010;-  delete $vf::class2type();&#010;-  return ETCH_OK;&#010; }&#010;\ No newline at end of file&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;Wed Oct 17 06:49:27 2012&#010;@@ -105,15 +105,13 @@ namespace $namespace {&#010;        */&#010;       status_t onRuntimeChanged(EtchRuntime* runtime);&#010;     };&#010;-  &#010;+&#010;     friend class ${i}Helper;&#010;     friend class Etch${i}RuntimeListener;&#010;     static status_t InitValueFactory(EtchRuntime* runtime);&#010;-    static status_t DestroyValueFactory();&#010;     static capu::Mutex SRuntimesMutex;&#010;     static capu::List&lt;capu::uint64_t&gt; SRuntimes;&#010;     static Etch${i}RuntimeListener S${i}RuntimeListener;&#010;-    &#010;   };&#010; }&#010; #endif&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h Wed Oct 17&#010;06:49:27 2012&#010;@@ -50,8 +50,6 @@ public:&#010;   capu::bool_t hasResult() {&#010;     mMutex.lock();&#010;     while(!mHasMailboxStatus) {&#010;-      // TODO wait&#010;-      break;&#010;       mCond.wait(&amp;mMutex);&#010;     }&#010;     mMutex.unlock();&#010;@@ -64,11 +62,8 @@ public:&#010;   status_t setResult(capu::SmartPointer&lt;T&gt; result) {&#010;     mResult = result;&#010;     mHasResult = true;&#010;-    &#010;-    mMutex.lock();&#010;-    mHasMailboxStatus = true;&#010;-    mCond.signal();&#010;-    mMutex.unlock();&#010;+&#010;+    setMailboxStatus();&#010;     return ETCH_OK;&#010;   }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h Wed Oct&#010;17 06:49:27 2012&#010;@@ -65,6 +65,11 @@ public:&#010;   virtual status_t mailboxStatus(EtchMailbox* mb, EtchObject* state, capu::bool_t closed)&#010;{return ETCH_OK;};&#010; &#010; protected:&#010;+  /**&#010;+   * Sets the mailbox status to true and signals waiting threads&#010;+   */&#010;+  void setMailboxStatus();&#010;+&#010;   EtchRuntime* mRuntime;&#010;   EtchMailbox* mMailbox;&#010;   capu::Mutex mMutex;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h Wed Oct 17 06:49:27&#010;2012&#010;@@ -149,20 +149,30 @@ status_t EtchStubBase&lt;T&gt;::sessionMessage&#010;   switch (type-&gt;getAsyncMode()) {&#010;     case QUEUED:&#010;       runnable = new EtchStubPoolRunnable&lt;T&gt;(this, sender, msg, helper);&#010;+      //TODO: inject runtime and enable logging&#010;+      //CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchStubBase", "Adding stub pool runnable&#010;to queued pool");&#010;       res = mQueuedPool-&gt;add(runnable);&#010;-      if (res != ETCH_OK)&#010;+      if (res != ETCH_OK) {&#010;+        //CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchStubBase", "Error while adding runnable&#010;to pool");&#010;         sessionNotify(NULL); //TODO Exception Handling&#010;+      }&#010;       return res;&#010;     case FREE:&#010;       runnable = new EtchStubPoolRunnable&lt;T&gt;(this, sender, msg, helper);&#010;+      //CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchStubBase", "Adding stub pool runnable&#010;to free pool");&#010;       res = mFreePool-&gt;add(runnable);&#010;-      if (res != ETCH_OK)&#010;+      if (res != ETCH_OK) {&#010;+        //CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchStubBase", "Error while adding runnable&#010;to pool");&#010;         sessionNotify(NULL); //TODO Exception Handling&#010;+      }&#010;       return res;&#010;     case NONE:&#010;+      //CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchStubBase", "Executing function in receiver&#010;thread");&#010;       res = helper-&gt;run(this, mSvc, mObj, sender, msg);&#010;-      if (res != ETCH_OK)&#010;+      if (res != ETCH_OK) {&#010;+        //CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchStubBase", "Error while executing&#010;function");&#010;         sessionNotify(NULL); //TODO Exception Handling&#010;+      }&#010;       return res;&#010;     default:&#010;       //  throw new IllegalArgumentException("unknown async mode "+type.getAsyncMode());&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h Wed Oct 17&#010;06:49:27 2012&#010;@@ -65,6 +65,13 @@ public:&#010;   virtual capu::bool_t isStarted() = 0;&#010; &#010;   /**&#010;+   * Check whether the receiving thread is terminated or not&#010;+   * @return true if it is terminated&#010;+   *         false otherwise&#010;+   */&#010;+  virtual capu::bool_t isTerminated() = 0;&#010;+&#010;+  /**&#010;    * Main function that will be executed by thread&#010;    * @param param parameter that will be passed to the thread&#010;    */&#010;@@ -125,6 +132,7 @@ protected:&#010;   S *mSession;&#010;   capu::Thread *mThread;&#010;   capu::bool_t mIsStarted;&#010;+  capu::bool_t mIsTerminated;&#010;   static capu::Mutex mMutex;&#010;   static capu::Mutex mMutexConnection;&#010;   EtchMonitor mStatus;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h Wed Oct&#010;17 06:49:27 2012&#010;@@ -92,6 +92,11 @@ public:&#010;    * @see EtchConnection&#010;    */&#010;   capu::bool_t isStarted();&#010;+&#010;+  /**&#010;+   * @see EtchConnection&#010;+   */&#010;+  capu::bool_t isTerminated();&#010; &#010;   /**&#010;    * @see capu::thread&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Wed Oct 17&#010;06:49:27 2012&#010;@@ -55,8 +55,16 @@ public:&#010;    */&#010;   virtual ~EtchTcpListener();&#010; &#010;+  /**&#010;+   * @see EtchConnection&#010;+   */&#010;   virtual capu::bool_t isStarted();&#010; &#010;+  /**&#010;+   * @see EtchConnection&#010;+   */&#010;+  virtual capu::bool_t isTerminated();&#010;+&#010;   virtual status_t close();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp Wed&#010;Oct 17 06:49:27 2012&#010;@@ -21,7 +21,7 @@&#010; #define MAILBOX_NOTIFY_TIMEOUT 2000&#010; &#010; EtchAsyncResultNone::EtchAsyncResultNone(EtchRuntime* runtime, EtchMailbox* mailbox)&#010;-  : mRuntime(runtime), mMailbox(mailbox), mHasMailboxStatus(false), mHasException(false)&#010;{&#010;+  : mRuntime(runtime), mMailbox(mailbox), mHasMailboxStatus(false), mHasException(false),&#010;mException(NULL) {&#010;     if(mailbox != NULL) {&#010;       mMailbox-&gt;registerNotify(this, NULL, MAILBOX_NOTIFY_TIMEOUT);&#010;     }&#010;@@ -31,13 +31,14 @@ EtchAsyncResultNone::EtchAsyncResultNone&#010; EtchAsyncResultNone::~EtchAsyncResultNone() {&#010;   if(mMailbox != NULL) {&#010;     mMailbox-&gt;unregisterNotify(this);&#010;+    mMailbox-&gt;closeDelivery();&#010;     delete mMailbox;&#010;   }&#010; }&#010; &#010; capu::bool_t EtchAsyncResultNone::hasException() {&#010;   mMutex.lock();&#010;-  while(!mHasMailboxStatus) {&#010;+  while(mMailbox != NULL &amp;&amp; !mHasMailboxStatus) {&#010;     mCond.wait(&amp;mMutex);&#010;   }&#010;   mMutex.unlock();&#010;@@ -53,7 +54,10 @@ capu::SmartPointer&lt;EtchException&gt; EtchAs&#010; void EtchAsyncResultNone::setException(capu::SmartPointer&lt;EtchException&gt; exception)&#010;{&#010;   mException = exception;&#010;   mHasException = true;&#010;+  setMailboxStatus();&#010;+}&#010; &#010;+void EtchAsyncResultNone::setMailboxStatus() {&#010;   mMutex.lock();&#010;   mHasMailboxStatus = true;&#010;   mCond.signal();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp Wed Oct 17&#010;06:49:27 2012&#010;@@ -44,7 +44,7 @@ public:&#010;   void run() {&#010;     if(mRunnable.get() != NULL) {&#010;       if(ETCH_OK != mRunnable-&gt;run()) {&#010;-        // Log exception&#010;+        //TODO: Log exception&#010;         if(mRunnable-&gt;hasException()) {&#010;           capu::SmartPointer&lt;EtchException&gt; exception;&#010;           mRunnable-&gt;getException(&amp;exception);&#010;@@ -67,7 +67,7 @@ const EtchObjectType* EtchQueuedPool::TY&#010; EtchQueuedPool::EtchQueuedPool(capu::int32_t size)&#010; : mSizeMax(size), mIsOpen(true) {&#010;   addObjectType(TYPE());&#010;-  mPool = new capu::ThreadPool(mSizeMax);&#010;+  mPool = new capu::ThreadPool(1);&#010; }&#010; &#010; EtchQueuedPool::~EtchQueuedPool() {&#010;@@ -90,6 +90,7 @@ status_t EtchQueuedPool::add(capu::Smart&#010;   }&#010; &#010;   EtchQueuedPoolRunnable* pr = new EtchQueuedPoolRunnable(this, runnable);&#010;+  //TODO: check max Size before adding a new Runnable&#010;   capu::status_t status = mPool-&gt;add(pr);&#010;   if(status != capu::CAPU_OK) {&#010;     return ETCH_ERROR;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp Wed&#010;Oct 17 06:49:27 2012&#010;@@ -32,6 +32,7 @@ EtchTcpConnection::EtchTcpConnection(Etc&#010;   }&#010;   mThread = NULL;&#010;   mIsStarted = false;&#010;+  mIsTerminated = false;&#010;   mSession = NULL;&#010;   mSocket = socket;&#010; }&#010;@@ -96,7 +97,7 @@ status_t EtchTcpConnection::openSocket(c&#010;     mMutexConnection.unlock();&#010;     return ETCH_ERROR;&#010;   }&#010;-  // if a reconnect but no retries allowed, then fail.&#010;+  // if a reconnect but retries not allowed, then fail.&#010;   if (reconnect &amp;&amp; (mOptions.getReconnectDelay() == 0)) {&#010;     mMutexConnection.unlock();&#010;     return ETCH_ERROR;&#010;@@ -255,6 +256,10 @@ capu::bool_t EtchTcpConnection::isStarte&#010;   return mIsStarted;&#010; }&#010; &#010;+capu::bool_t EtchTcpConnection::isTerminated() {&#010;+  return mIsTerminated;&#010;+}&#010;+&#010; void EtchTcpConnection::run() {&#010; &#010;   status_t status;&#010;@@ -270,6 +275,7 @@ void EtchTcpConnection::run() {&#010; &#010;     status = setupSocket();&#010;     if (status != ETCH_OK) {&#010;+      CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Socket&#010;has not been successfully opened", mHost.c_str(), mPort);&#010;       close();&#010;       break;&#010;     }&#010;@@ -283,21 +289,26 @@ void EtchTcpConnection::run() {&#010;     close();&#010;     first = false;&#010;   }&#010;+   mIsTerminated = true;&#010; }&#010; &#010; status_t EtchTcpConnection::setupSocket() {&#010;   if (mOptions.getBufferSize() != 0) {&#010;     if (mSocket-&gt;setBufferSize(mOptions.getBufferSize()) != ETCH_OK) {&#010;+      CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; setupSocket:&#010;Error while setting buffer size", mHost.c_str(), mPort);&#010;       return ETCH_ERROR;&#010;     }&#010;   }&#010;   if (mSocket-&gt;setKeepAlive((mOptions.getKeepAlive() != 0)) != ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; setupSocket:&#010;Error while setting keep alive", mHost.c_str(), mPort);&#010;     return ETCH_ERROR;&#010;   }&#010;   if (mSocket-&gt;setLingerOption((mOptions.getLingerTime() &gt;= 0), mOptions.getLingerTime())&#010;!= ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; setupSocket:&#010;Error while setting linger time", mHost.c_str(), mPort);&#010;     return ETCH_ERROR;&#010;   }&#010;   if (mSocket-&gt;setNoDelay((mOptions.getNoDelay() != 0)) != ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; setupSocket:&#010;Error while setting delay", mHost.c_str(), mPort);&#010;     return ETCH_ERROR;&#010;   }&#010;   CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Settings for&#010;socket has been successfully configured", mHost.c_str(), mPort);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp Wed Oct&#010;17 06:49:27 2012&#010;@@ -65,6 +65,7 @@ EtchTcpListener::EtchTcpListener(EtchURL&#010;   }&#010;   mSession = NULL;&#010;   mIsStarted = false;&#010;+  mIsTerminated = false;&#010;   mThread = NULL;&#010;   mSocket = NULL;&#010;   mConnectionCheckerThread = NULL;&#010;@@ -94,6 +95,10 @@ capu::bool_t EtchTcpListener::isStarted(&#010;   return mIsStarted;&#010; }&#010; &#010;+capu::bool_t EtchTcpListener::isTerminated() {&#010;+  return mIsTerminated;&#010;+}&#010;+&#010; status_t EtchTcpListener::close() {&#010;   if (mSocket != NULL) {&#010;     return mSocket-&gt;close();&#010;@@ -276,6 +281,7 @@ void EtchTcpListener::run() {&#010;     first = false;&#010;   }&#010;   mIsStarted = false;&#010;+  mIsTerminated = true;&#010; }&#010; &#010; status_t EtchTcpListener::setupSocket() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp?rev=1399113&amp;r1=1399112&amp;r2=1399113&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;Wed Oct 17 06:49:27 2012&#010;@@ -176,7 +176,7 @@ status_t EtchTcpTransportFactory::MySess&#010;       if (res == ETCH_OK) {&#010;         EtchTcpConnection* con = (EtchTcpConnection*) stack-&gt;getTransportData();&#010;         if (con != NULL) {&#010;-          if (!con-&gt;isStarted()) {&#010;+          if (con-&gt;isTerminated()) {&#010;             //delete all instances for this stack&#010;             delete stack;&#010;             //remote stack from list&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399112 - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ src/main/ src/main/common/ src/main/serialization/ src/test/ src/test/common/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017064918.11F632388A64@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017064918-11F632388A64@eris-apache-org%3e</id>
<updated>2012-10-17T06:49:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:49:14 2012&#010;New Revision: 1399112&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399112&amp;view=rev&#010;Log:&#010;ETCH-249 Added EtchNumber class&#010;&#010;Etch number types derive now from EtchNumber&#010;BinaryTaggedDataOutput uses EtchNumber to get the value&#010;&#010;Change-Id: I7a487dcab3e6f489083031008ca91912da7655d0&#010;&#010;Added:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNumber.h&#010;      - copied, changed from r1399111, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNumberTest.cpp   (with props)&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h Wed Oct 17 06:49:14&#010;2012&#010;@@ -19,12 +19,12 @@&#010; #ifndef __ETCHBYTE_H__&#010; #define __ETCHBYTE_H__&#010; &#010;-#include "common/EtchObject.h"&#010;+#include "common/EtchNumber.h"&#010; #include "common/EtchObjectType.h"&#010; #include "common/EtchError.h"&#010; &#010; class EtchByte :&#010;-public EtchObject {&#010;+public EtchNumber {&#010; &#010; public:&#010; &#010;@@ -69,6 +69,27 @@ public:&#010;    */&#010;   capu::uint32_t getHashCode() const;&#010; &#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int64_t getLongValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int32_t getInt32Value() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int16_t getShortValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int8_t getByteValue() const;&#010;+&#010;+&#010; private:&#010; &#010;   capu::int8_t mValue;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h Wed Oct 17 06:49:14&#010;2012&#010;@@ -19,10 +19,10 @@&#010; #ifndef __ETCHINT32_H__&#010; #define __ETCHINT32_H__&#010; &#010;-#include "common/EtchObject.h"&#010;+#include "common/EtchNumber.h"&#010; &#010; class EtchInt32 :&#010;-public EtchObject {&#010;+public EtchNumber {&#010; &#010; public:&#010; &#010;@@ -114,6 +114,26 @@ public:&#010;    */&#010;   capu::bool_t operator!=(const EtchObject&amp; other) const;&#010; &#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int64_t getLongValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int32_t getInt32Value() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int16_t getShortValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int8_t getByteValue() const;&#010;+&#010; private:&#010;   capu::int32_t mValue;&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h Wed Oct 17 06:49:14&#010;2012&#010;@@ -19,12 +19,12 @@&#010; #ifndef __ETCHLONG_H__&#010; #define __ETCHLONG_H__&#010; &#010;-#include "common/EtchObject.h"&#010;+#include "common/EtchNumber.h"&#010; #include "common/EtchObjectType.h"&#010; #include "common/EtchError.h"&#010; &#010; class EtchLong :&#010;-public EtchObject {&#010;+public EtchNumber {&#010; &#010; public:&#010; &#010;@@ -70,6 +70,26 @@ public:&#010;    */&#010;   capu::bool_t equals(const EtchObject * other) const;&#010; &#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int64_t getLongValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int32_t getInt32Value() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int16_t getShortValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int8_t getByteValue() const;&#010;+&#010; private:&#010; &#010;   capu::int64_t mValue;&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNumber.h (from r1399111,&#010;incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNumber.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNumber.h&amp;p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&amp;r1=1399111&amp;r2=1399112&amp;rev=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNumber.h Wed Oct 17 06:49:14&#010;2012&#010;@@ -1,81 +1,71 @@&#010;-/* $Id$&#010;- *&#010;- * Licensed to the Apache Software Foundation (ASF) under one or more&#010;- * contributor license agreements. See the NOTICE file distributed with&#010;- * this work for additional information regarding copyright ownership.&#010;- * The ASF licenses this file to you under the Apache License, Version&#010;- * 2.0 (the "License"); you may not use this file except in compliance&#010;- * with the License. You may obtain a copy of the License at&#010;- *&#010;- * http://www.apache.org/licenses/LICENSE-2.0&#010;- *&#010;- * Unless required by applicable law or agreed to in writing, software&#010;- * distributed under the License is distributed on an "AS IS" BASIS,&#010;- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;- * See the License for the specific language governing permissions and&#010;- * limitations under the License.&#010;- */&#010;-&#010;-#ifndef __ETCHLONG_H__&#010;-#define __ETCHLONG_H__&#010;-&#010;-#include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010;-&#010;-class EtchLong :&#010;-public EtchObject {&#010;-&#010;-public:&#010;-&#010;-  /**&#010;-   * EtchObjectType for EtchLong.&#010;-   */&#010;-  static const EtchObjectType* TYPE();&#010;-&#010;-  /**&#010;-   * Constructs a EtchLong object.&#010;-   */&#010;-  EtchLong();&#010;-&#010;-  /**&#010;-   * Constructs a EtchLong object with given value.&#010;-   */&#010;-  EtchLong(capu::int64_t value);&#010;-&#010;-  /**&#010;-   * Constructs a copy of EtchLong.&#010;-   */&#010;-  EtchLong(const EtchLong&amp; other);&#010;-&#010;-&#010;-  /**&#010;-   * Sets long value.&#010;-   */&#010;-  void set(capu::int64_t value);&#010;-&#010;-  /**&#010;-   * Returns long value.&#010;-   */&#010;-  capu::int64_t get();&#010;-&#010;-  /**&#010;-   * Returns hash code&#010;-   */&#010;-  capu::uint32_t getHashCode() const;&#010;-&#010;-  /**&#010;-   * @return true if two object is equal&#010;-   *         false otherwise&#010;-   */&#010;-  capu::bool_t equals(const EtchObject * other) const;&#010;-&#010;-private:&#010;-&#010;-  capu::int64_t mValue;&#010;-&#010;-};&#010;-&#010;-typedef capu::SmartPointer&lt;EtchLong&gt; EtchLongPtr;&#010;-&#010;-#endif&#010;+/* $Id$&#010;+ *&#010;+ * Licensed to the Apache Software Foundation (ASF) under one or more&#010;+ * contributor license agreements. See the NOTICE file distributed with&#010;+ * this work for additional information regarding copyright ownership.&#010;+ * The ASF licenses this file to you under the Apache License, Version&#010;+ * 2.0 (the "License"); you may not use this file except in compliance&#010;+ * with the License. You may obtain a copy of the License at&#010;+ *&#010;+ * http://www.apache.org/licenses/LICENSE-2.0&#010;+ *&#010;+ * Unless required by applicable law or agreed to in writing, software&#010;+ * distributed under the License is distributed on an "AS IS" BASIS,&#010;+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+ * See the License for the specific language governing permissions and&#010;+ * limitations under the License.&#010;+ */&#010;+&#010;+#ifndef __ETCHNUMBER_H__&#010;+#define __ETCHNUMBER_H__&#010;+&#010;+#include "common/EtchObject.h"&#010;+#include "common/EtchObjectType.h"&#010;+&#010;+class EtchNumber :&#010;+public EtchObject {&#010;+&#010;+public:&#010;+&#010;+  /**&#010;+   * EtchObjectType for EtchLong.&#010;+   */&#010;+  static const EtchObjectType* TYPE() {&#010;+    const static EtchObjectType TYPE(EOTID_NUMBER, NULL);&#010;+    return &amp;TYPE;&#010;+  }&#010;+&#010;+  /**&#010;+   * Constructor&#010;+   */&#010;+  EtchNumber() {&#010;+    addObjectType(TYPE());&#010;+  }&#010;+&#010;+  /**&#010;+   * returns the value as a long&#010;+   * @return int64 value&#010;+   */&#010;+  virtual capu::int64_t getLongValue() const = 0;&#010;+&#010;+  /**&#010;+   * returns the value as an int32&#010;+   * @return int32 value&#010;+   */&#010;+  virtual capu::int32_t getInt32Value() const = 0;&#010;+&#010;+  /**&#010;+   * returns the value as a short&#010;+   * @return int16 value&#010;+   */&#010;+  virtual capu::int16_t getShortValue() const = 0;&#010;+&#010;+  /**&#010;+   * returns the value as a byte&#010;+   * @return int8 value&#010;+   */&#010;+  virtual capu::int8_t getByteValue() const = 0;&#010;+&#010;+};&#010;+&#010;+#endif&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h Wed Oct 17 06:49:14&#010;2012&#010;@@ -27,6 +27,7 @@&#010; &#010; enum EtchObjectTypeIds {&#010;   EOTID_OBJECT = 0,&#010;+  EOTID_NUMBER,&#010;   EOTID_INT32,&#010;   EOTID_BOOL,&#010;   EOTID_BYTE,&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h Wed Oct 17 06:49:14&#010;2012&#010;@@ -19,12 +19,12 @@&#010; #ifndef __ETCHSHORT_H__&#010; #define __ETCHSHORT_H__&#010; &#010;-#include "common/EtchObject.h"&#010;+#include "common/EtchNumber.h"&#010; #include "common/EtchObjectType.h"&#010; #include "common/EtchError.h"&#010; &#010; class EtchShort :&#010;-public EtchObject {&#010;+public EtchNumber {&#010; &#010; public:&#010; &#010;@@ -69,6 +69,26 @@ public:&#010;    */&#010;   capu::bool_t equals(const EtchObject * other) const;&#010; &#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int64_t getLongValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int32_t getInt32Value() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int16_t getShortValue() const;&#010;+&#010;+  /**&#010;+   * @see EtchNumber&#010;+   */&#010;+  capu::int8_t getByteValue() const;&#010;+&#010; private:&#010; &#010;   capu::int16_t mValue;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt Wed Oct 17 06:49:14 2012&#010;@@ -24,6 +24,7 @@ SET(MAIN_INCLUDES&#010;     ${PROJECT_SOURCE_DIR}/include/common/EtchObject.h&#010;     ${PROJECT_SOURCE_DIR}/include/common/EtchObjectType.h&#010;     ${PROJECT_SOURCE_DIR}/include/common/EtchString.h&#010;+    ${PROJECT_SOURCE_DIR}/include/common/EtchNumber.h&#010;     ${PROJECT_SOURCE_DIR}/include/common/EtchInt32.h&#010;     ${PROJECT_SOURCE_DIR}/include/common/EtchBool.h&#010;     ${PROJECT_SOURCE_DIR}/include/common/EtchByte.h&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp Wed Oct 17 06:49:14&#010;2012&#010;@@ -34,7 +34,8 @@ EtchByte::EtchByte(capu::int8_t value)&#010; }&#010; &#010; EtchByte::EtchByte(const EtchByte &amp;other)&#010;- : EtchObject(other), mValue(other.mValue) {&#010;+ : mValue(other.mValue) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; void EtchByte::set(capu::int8_t value){&#010;@@ -59,3 +60,19 @@ capu::uint32_t EtchByte::getHashCode() c&#010;   capu::uint32_t result = mValue + 128;&#010;   return result;&#010; }&#010;+&#010;+capu::int64_t EtchByte::getLongValue() const {&#010;+  return static_cast&lt;capu::int64_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int32_t EtchByte::getInt32Value() const {&#010;+  return static_cast&lt;capu::int32_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int16_t EtchByte::getShortValue() const {&#010;+  return static_cast&lt;capu::int16_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int8_t EtchByte::getByteValue() const {&#010;+  return mValue;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp Wed Oct 17 06:49:14&#010;2012&#010;@@ -36,7 +36,8 @@ EtchInt32::EtchInt32(capu::int32_t value&#010; }&#010; &#010; EtchInt32::EtchInt32(const EtchInt32&amp; other)&#010;- : EtchObject(other), mValue(other.mValue) {&#010;+ : mValue(other.mValue) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchInt32::~EtchInt32() {&#010;@@ -116,3 +117,19 @@ capu::bool_t EtchInt32::operator!=(const&#010; {&#010;   return !(*this == other);&#010; }&#010;+&#010;+capu::int64_t EtchInt32::getLongValue() const {&#010;+  return static_cast&lt;capu::int64_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int32_t EtchInt32::getInt32Value() const {&#010;+  return mValue;&#010;+}&#010;+&#010;+capu::int16_t EtchInt32::getShortValue() const {&#010;+  return static_cast&lt;capu::int16_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int8_t EtchInt32::getByteValue() const {&#010;+  return static_cast&lt;capu::int8_t&gt;(mValue);&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp Wed Oct 17 06:49:14&#010;2012&#010;@@ -34,7 +34,8 @@ EtchLong::EtchLong(capu::int64_t value)&#010; }&#010; &#010; EtchLong::EtchLong(const EtchLong&amp; other)&#010;- : EtchObject(other), mValue(other.mValue) {&#010;+ : mValue(other.mValue) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; void EtchLong::set(capu::int64_t value) {&#010;@@ -58,3 +59,19 @@ capu::bool_t EtchLong::equals(const Etch&#010;   EtchLong * a = (EtchLong*) other;&#010;   return (a-&gt;mValue == this-&gt;mValue);&#010; }&#010;+&#010;+capu::int64_t EtchLong::getLongValue() const {&#010;+  return mValue;&#010;+}&#010;+&#010;+capu::int32_t EtchLong::getInt32Value() const {&#010;+  return static_cast&lt;capu::int32_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int16_t EtchLong::getShortValue() const {&#010;+  return static_cast&lt;capu::int16_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int8_t EtchLong::getByteValue() const {&#010;+  return static_cast&lt;capu::int8_t&gt;(mValue);&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp Wed Oct 17 06:49:14&#010;2012&#010;@@ -34,7 +34,8 @@ EtchShort::EtchShort(capu::int16_t value&#010; }&#010; &#010; EtchShort::EtchShort(const EtchShort&amp; other)&#010;- : EtchObject(other), mValue(other.mValue) {&#010;+ : mValue(other.mValue) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; void EtchShort::set(capu::int16_t value) {&#010;@@ -59,3 +60,19 @@ capu::bool_t EtchShort::equals(const Etc&#010;   EtchShort * a = (EtchShort*) other;&#010;   return (a-&gt;mValue == this-&gt;mValue);&#010; }&#010;+&#010;+capu::int64_t EtchShort::getLongValue() const {&#010;+  return static_cast&lt;capu::int64_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int32_t EtchShort::getInt32Value() const {&#010;+  return static_cast&lt;capu::int32_t&gt;(mValue);&#010;+}&#010;+&#010;+capu::int16_t EtchShort::getShortValue() const {&#010;+  return mValue;&#010;+}&#010;+&#010;+capu::int8_t EtchShort::getByteValue() const {&#010;+  return static_cast&lt;capu::int8_t&gt;(mValue);&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp&#010;Wed Oct 17 06:49:14 2012&#010;@@ -304,19 +304,19 @@ status_t EtchBinaryTaggedDataOutput::wri&#010; &#010;     case EtchTypeCode::BYTE:&#010;       CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Byte has been serialized");&#010;-      return mBuffer-&gt;putByte(((EtchByte*) value.get())-&gt;get());&#010;+      return mBuffer-&gt;putByte(((EtchNumber*) value.get())-&gt;getByteValue());&#010; &#010;     case EtchTypeCode::SHORT:&#010;       CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Short has been serialized");&#010;-      return mBuffer-&gt;putShort(((EtchShort*) value.get())-&gt;get());&#010;+      return mBuffer-&gt;putShort(((EtchNumber*) value.get())-&gt;getShortValue());&#010; &#010;     case EtchTypeCode::INT:&#010;       CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Int has been serialized");&#010;-      return mBuffer-&gt;putInt(((EtchInt32*) value.get())-&gt;get());&#010;+      return mBuffer-&gt;putInt(((EtchNumber*) value.get())-&gt;getInt32Value());&#010; &#010;     case EtchTypeCode::LONG:&#010;       CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Long has been serialized");&#010;-      return mBuffer-&gt;putLong(((EtchLong*) value.get())-&gt;get());&#010;+      return mBuffer-&gt;putLong(((EtchNumber*) value.get())-&gt;getLongValue());&#010; &#010;     case EtchTypeCode::FLOAT:&#010;       CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Float has been serialized");&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt?rev=1399112&amp;r1=1399111&amp;r2=1399112&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/CMakeLists.txt Wed Oct 17 06:49:14 2012&#010;@@ -30,7 +30,8 @@ IF (WIN32 AND BUILD_CHECK_MEMORY)&#010; ENDIF (WIN32 AND BUILD_CHECK_MEMORY)&#010; &#010; add_executable (etch-cpp-test&#010;-    common/EtchInt32Test.cpp&#010;+    common/EtchNumberTest.cpp&#010;+&#009;common/EtchInt32Test.cpp&#010;     common/EtchBoolTest.cpp&#010;     common/EtchByteTest.cpp&#010;     common/EtchShortTest.cpp&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNumberTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNumberTest.cpp?rev=1399112&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNumberTest.cpp (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNumberTest.cpp Wed Oct 17&#010;06:49:14 2012&#010;@@ -0,0 +1,32 @@&#010;+/* $Id$&#010;+ *&#010;+ * Licensed to the Apache Software Foundation (ASF) under one or more&#010;+ * contributor license agreements. See the NOTICE file distributed with&#010;+ * this work for additional information regarding copyright ownership.&#010;+ * The ASF licenses this file to you under the Apache License, Version&#010;+ * 2.0 (the "License"); you may not use this file except in compliance&#010;+ * with the License. You may obtain a copy of the License at&#010;+ *&#010;+ * http://www.apache.org/licenses/LICENSE-2.0&#010;+ *&#010;+ * Unless required by applicable law or agreed to in writing, software&#010;+ * distributed under the License is distributed on an "AS IS" BASIS,&#010;+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+ * See the License for the specific language governing permissions and&#010;+ * limitations under the License.&#010;+ */&#010;+&#010;+#include &lt;gtest/gtest.h&gt;&#010;+#include "common/EtchNumber.h"&#010;+#include "common/EtchByte.h"&#010;+#include "common/EtchString.h"&#010;+&#010;+TEST(EtchNumberTest, isInstanceOf) {&#010;+  EtchNumber* o1 = new EtchByte(2);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchNumber::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchByte::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;+&#010;&#010;Propchange: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNumberTest.cpp&#010;------------------------------------------------------------------------------&#010;    svn:eol-style = native&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399111 [2/2] - in /incubator/etch/trunk/binding-cpp: compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ runtime/include/common/ runtime/include/serialization/ runtime/include/support/ runtime/include/transport/ runtime/src...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017064903.11C842388A3F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017064903-11C842388A3F@eris-apache-org%3e</id>
<updated>2012-10-17T06:48:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,13 +24,17 @@ const EtchObjectType* EtchStructValue::T&#010; }&#010; &#010; EtchStructValue::EtchStructValue(EtchType* type, EtchValueFactory* vf)&#010;-: EtchObject(EtchStructValue::TYPE()), mType(type), mLevel(vf-&gt;getLevel()), mTable(DEFAULT_SIZE) {&#010;-&#010;+ : mType(type), mLevel(vf-&gt;getLevel()), mTable(DEFAULT_SIZE) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchStructValue::EtchStructValue(EtchType* type, EtchValueFactory* vf, capu::uint32_t length)&#010;-: EtchObject(EtchStructValue::TYPE()), mType(type), mLevel(vf-&gt;getLevel()), mTable(length &gt; 0 ? (length * 4 + 2) / 3 : DEFAULT_SIZE) {&#010;+ : mType(type), mLevel(vf-&gt;getLevel()), mTable(length &gt; 0 ? (length * 4 + 2) / 3 : DEFAULT_SIZE) {&#010;+  addObjectType(TYPE());&#010;+}&#010; &#010;+EtchStructValue::EtchStructValue(const EtchStructValue&amp; other)&#010;+ : EtchObject(other), mType(other.mType), mLevel(other.mLevel), mTable(other.mTable) {&#010; }&#010; &#010; EtchStructValue::~EtchStructValue() {&#010;@@ -93,7 +97,7 @@ status_t EtchStructValue::get(const Etch&#010;   return mTable.get(key, value);&#010; }&#010; &#010;-EtchStructValue::Iterator EtchStructValue::begin()&#010;+EtchStructValue::Iterator EtchStructValue::begin() const&#010; {&#010;   return mTable.begin();&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp Wed Oct 17 06:48:53 2012&#010;@@ -23,21 +23,29 @@ const EtchObjectType* EtchType::TYPE() {&#010;   const static EtchObjectType TYPE(EOTID_TYPE, NULL);&#010;   return &amp;TYPE;&#010; }&#010;-&#010; EtchType::EtchType()&#010;-: EtchObject(EtchType::TYPE()), mId(0), mTimeout(0), mName(""), mSuperType(NULL),&#010;-mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {&#010;+: mId(0), mTimeout(0), mName(""), mSuperType(NULL), mResultType(NULL),&#010;+  mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchType::EtchType(EtchString name)&#010;-: EtchObject(EtchType::TYPE()), mTimeout(0), mName(name), mSuperType(NULL),&#010;+: mTimeout(0), mName(name), mSuperType(NULL),&#010; mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {&#010;-  mId = EtchHashEx::Digest(mName);;&#010;+  mId = EtchHashEx::Digest(mName);&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchType::EtchType(capu::uint32_t id, EtchString name)&#010;-: EtchObject(EtchType::TYPE()), mId(id), mTimeout(0), mName(name), mSuperType(NULL),&#010;+: mId(id), mTimeout(0), mName(name), mSuperType(NULL),&#010; mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+EtchType::EtchType(const EtchType&amp; other)&#010;+ : EtchObject(other), mId(other.mId), mTimeout(other.mTimeout), mName(other.mName), mSuperType(other.mSuperType),&#010;+   mResultType(other.mResultType), mDirection(other.mDirection), mAsyncMode(other.mAsyncMode), mLocked(other.mLocked),&#010;+   mComponentType(other.mComponentType), mHelper(other.mHelper), mStubHelper(other.mStubHelper) {&#010; }&#010; &#010; EtchType::~EtchType() {&#010;@@ -49,7 +57,6 @@ EtchType::~EtchType() {&#010;     //TODO: Check memory management&#010;     delete mStubHelper;&#010;   }&#010;-&#010; }&#010; &#010; capu::uint64_t EtchType::getHashCode() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeValidator.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeValidator.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeValidator.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeValidator.cpp Wed Oct 17 06:48:53 2012&#010;@@ -25,7 +25,7 @@ EtchTypeValidator::EtchTypeValidator(con&#010; &#010;   if (mNDims == 0)&#010;     mExpectedType = new EtchObjectType(scalarClass-&gt;getTypeId(),scalarClass-&gt;getObjectComponentType());&#010;-  else if (mNDims &gt; 0){    &#010;+  else if (mNDims &gt; 0){&#010;     EtchObjectType *type = new EtchObjectType(EOTID_NATIVE_ARRAY, scalarClass);&#010;     mExpectedType = type;&#010;     mArrayComponentType = scalarClass;&#010;@@ -33,6 +33,11 @@ EtchTypeValidator::EtchTypeValidator(con&#010; &#010; }&#010; &#010;+EtchTypeValidator::EtchTypeValidator(const EtchTypeValidator&amp; other)&#010;+ : EtchValidator(other), mNDims(other.mNDims), mExpectedType(other.mExpectedType),&#010;+   mArrayComponentType(other.mArrayComponentType), mSubclass(other.mSubclass) {&#010;+}&#010;+&#010; EtchTypeValidator::~EtchTypeValidator(){&#010;   delete mExpectedType;&#010; }&#010;@@ -50,4 +55,4 @@ status_t EtchTypeValidator::checkDimensi&#010;     return ETCH_OK;&#010;   else&#010;     return ETCH_ERROR;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,10 @@ EtchValidatorBoolean::EtchValidatorBoole&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorBoolean::EtchValidatorBoolean(const EtchValidatorBoolean&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+}&#010;+&#010; EtchValidatorBoolean::~EtchValidatorBoolean() {&#010; &#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorByte::EtchValidatorByte(cap&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorByte::EtchValidatorByte(const EtchValidatorByte&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorByte::~EtchValidatorByte() {&#010; &#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp Wed Oct 17 06:48:53 2012&#010;@@ -82,17 +82,17 @@ const EtchObjectType* EtchValidatorCusto&#010; }&#010; &#010; EtchValidatorCustomKey::EtchValidatorCustomKey()&#010;-: EtchObject(EtchValidatorCustomKey::TYPE())&#010;-, mType(NULL)&#010;-, mDims(0)&#010;-, mSubclassOk(false) {&#010;+ : mType(NULL), mDims(0), mSubclassOk(false) {&#010;+  addObjectType(EtchValidatorCustomKey::TYPE());&#010; }&#010; &#010; EtchValidatorCustomKey::EtchValidatorCustomKey(const EtchObjectType * type, capu::int32_t dim, capu::bool_t sub)&#010;-: EtchObject(EtchValidatorCustomKey::TYPE())&#010;-, mType(type)&#010;-, mDims(dim)&#010;-, mSubclassOk(sub) {&#010;+ : mType(type), mDims(dim), mSubclassOk(sub) {&#010;+  addObjectType(EtchValidatorCustomKey::TYPE());&#010;+}&#010;+&#010;+EtchValidatorCustomKey::EtchValidatorCustomKey(const EtchValidatorCustomKey&amp; other)&#010;+ : EtchObject(other), mType(other.mType), mDims(other.mDims), mSubclassOk(other.mSubclassOk) {&#010; }&#010; &#010; EtchValidatorCustomKey::~EtchValidatorCustomKey() {&#010;@@ -122,6 +122,11 @@ EtchValidatorCustom::EtchValidatorCustom&#010;   mSubclass = sub;&#010; }&#010; &#010;+EtchValidatorCustom::EtchValidatorCustom(const EtchValidatorCustom&amp; other)&#010;+ : EtchTypeValidator(other) {&#010;+&#010;+}&#010;+&#010; EtchValidatorCustom::~EtchValidatorCustom() {&#010; }&#010; &#010;@@ -173,4 +178,4 @@ status_t EtchValidatorCustom::getElement&#010; EtchHashTable&lt;EtchValidatorCustomKey, capu::SmartPointer&lt;EtchValidator&gt; &gt;&amp; EtchValidatorCustom::Validators(EtchRuntime* runtime) {&#010;   static EtchValidatorCustomCaches validators;&#010;   return validators.get(runtime);&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp Wed Oct 17 06:48:53 2012&#010;@@ -36,6 +36,11 @@ EtchValidatorDouble::EtchValidatorDouble&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorDouble::EtchValidatorDouble(const EtchValidatorDouble&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorDouble::~EtchValidatorDouble() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorFloat::EtchValidatorFloat(c&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorFloat::EtchValidatorFloat(const EtchValidatorFloat&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorFloat::~EtchValidatorFloat() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorInt::EtchValidatorInt(capu:&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorInt::EtchValidatorInt(const EtchValidatorInt&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorInt::~EtchValidatorInt() {&#010; &#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorLong::EtchValidatorLong(cap&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorLong::EtchValidatorLong(const EtchValidatorLong&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorLong::~EtchValidatorLong() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp Wed Oct 17 06:48:53 2012&#010;@@ -35,6 +35,11 @@ EtchValidatorNone::EtchValidatorNone()&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorNone::EtchValidatorNone(const EtchValidatorNone&amp; other)&#010;+: EtchValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorNone::~EtchValidatorNone() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp Wed Oct 17 06:48:53 2012&#010;@@ -36,6 +36,11 @@ EtchValidatorObject::EtchValidatorObject&#010;   mSubclass = true;&#010; }&#010; &#010;+EtchValidatorObject::EtchValidatorObject(const EtchValidatorObject&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorObject::~EtchValidatorObject() {&#010; }&#010; &#010;@@ -63,7 +68,7 @@ status_t EtchValidatorObject::validateVa&#010; status_t EtchValidatorObject::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;   //TODO rafactor this&#010;   EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;-  &#010;+&#010;   if (ndim &gt; MAX_NDIMS)&#010;     return ETCH_EINVAL;&#010;   if (ndim &gt;= MAX_CACHED) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorRuntimeException::EtchValid&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorRuntimeException::EtchValidatorRuntimeException(const EtchValidatorRuntimeException&amp; other)&#010;+: EtchValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorRuntimeException::~EtchValidatorRuntimeException() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorShort::EtchValidatorShort(c&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorShort::EtchValidatorShort(const EtchValidatorShort&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorShort::~EtchValidatorShort() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ EtchValidatorString::EtchValidatorString&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorString::EtchValidatorString(const EtchValidatorString&amp; other)&#010;+: EtchTypeValidator(other), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorString::~EtchValidatorString() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp Wed Oct 17 06:48:53 2012&#010;@@ -32,6 +32,11 @@ EtchValidatorStructValue::EtchValidatorS&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010;+EtchValidatorStructValue::EtchValidatorStructValue(const EtchValidatorStructValue&amp; other)&#010;+: EtchTypeValidator(other), mType(other.mType), mRuntime(other.mRuntime) {&#010;+&#010;+}&#010;+&#010; EtchValidatorStructValue::~EtchValidatorStructValue() {&#010; }&#010; &#010;@@ -85,4 +90,4 @@ status_t EtchValidatorStructValue::Get(E&#010; &#010; EtchType* EtchValidatorStructValue::getType() {&#010;   return mType;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValueFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValueFactory.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValueFactory.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValueFactory.cpp Wed Oct 17 06:48:53 2012&#010;@@ -23,8 +23,12 @@ const EtchObjectType* EtchValueFactory::&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchValueFactory::EtchValueFactory()&#010;-: EtchObject(EtchValueFactory::TYPE()) {&#010;+EtchValueFactory::EtchValueFactory() {&#010;+  addObjectType(EtchValueFactory::TYPE());&#010;+}&#010;+&#010;+EtchValueFactory::EtchValueFactory(const EtchValueFactory&amp; other)&#010;+ : EtchObject(other) {&#010; }&#010; &#010; EtchString EtchValueFactory::getStringEncoding() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchFreePool.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchFreePool.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchFreePool.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchFreePool.cpp Wed Oct 17 06:48:53 2012&#010;@@ -67,13 +67,10 @@ const EtchObjectType* EtchFreePool::TYPE&#010; }&#010; &#010; EtchFreePool::EtchFreePool(capu::int32_t size)&#010;- : EtchPool(EtchFreePool::TYPE())&#010;- , mSize(0)&#010;- , mSizeMax(size)&#010;- , mIsOpen(true) {&#010;-&#010;-   mThreads = new capu::Thread*[mSizeMax];&#010;-   capu::Memory::Set(mThreads, 0, sizeof(capu::Thread*)*mSizeMax);&#010;+ : mSize(0), mSizeMax(size), mIsOpen(true) {&#010;+  addObjectType(TYPE());&#010;+  mThreads = new capu::Thread*[mSizeMax];&#010;+  capu::Memory::Set(mThreads, 0, sizeof(capu::Thread*)*mSizeMax);&#010; }&#010; &#010; EtchFreePool::~EtchFreePool() {&#010;@@ -116,7 +113,7 @@ status_t EtchFreePool::add(capu::SmartPo&#010;   if(!mIsOpen) {&#010;     return ETCH_ERROR;&#010;   }&#010;-  &#010;+&#010;   mMutex.lock();&#010; &#010;   // clean thread list&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPool.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPool.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPool.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPool.cpp Wed Oct 17 06:48:53 2012&#010;@@ -20,3 +20,7 @@&#010; &#010; #include "support/EtchPool.h"&#010; &#010;+const EtchObjectType* EtchPool::TYPE() {&#010;+  const static EtchObjectType TYPE(EOTID_POOL, NULL);&#010;+  return &amp;TYPE;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp Wed Oct 17 06:48:53 2012&#010;@@ -65,10 +65,9 @@ const EtchObjectType* EtchQueuedPool::TY&#010; }&#010; &#010; EtchQueuedPool::EtchQueuedPool(capu::int32_t size)&#010;-  : EtchPool(EtchQueuedPool::TYPE())&#010;-  , mSizeMax(size)&#010;-  , mIsOpen(true) {&#010;-    mPool = new capu::ThreadPool(mSizeMax);&#010;+: mSizeMax(size), mIsOpen(true) {&#010;+  addObjectType(TYPE());&#010;+  mPool = new capu::ThreadPool(mSizeMax);&#010; }&#010; &#010; EtchQueuedPool::~EtchQueuedPool() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp Wed Oct 17 06:48:53 2012&#010;@@ -38,7 +38,18 @@ EtchStack::EtchStack() : EtchObject()&#010;   , mDeliveryService(NULL)&#010;   , mStub(NULL)&#010;   {&#010;-    EtchObject::addObjectType(EtchStack::TYPE());&#010;+    addObjectType(EtchStack::TYPE());&#010;+}&#010;+&#010;+EtchStack::EtchStack(const EtchStack&amp; other) : EtchObject(other)&#010;+, mTransportData(other.mTransportData)&#010;+, mTransportPacket(other.mTransportPacket)&#010;+, mTransportMessage(other.mTransportMessage)&#010;+, mResources(other.mResources)&#010;+, mValueFactory(other.mValueFactory)&#010;+, mMailboxManager(other.mMailboxManager)&#010;+, mDeliveryService(other.mDeliveryService)&#010;+, mStub(other.mStub) {&#010; }&#010; &#010; EtchStack::~EtchStack() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,8 +24,13 @@ const EtchObjectType* EtchStackClient::T&#010; }&#010; &#010; EtchStackClient::EtchStackClient() : EtchStack(), mStaticResources(NULL) {&#010;-  EtchObject::addObjectType(EtchStackClient::TYPE());&#010;-  EtchObject::setObjectType(EtchStackClient::TYPE());&#010;+  addObjectType(EtchStackClient::TYPE());&#010;+}&#010;+&#010;+EtchStackClient::EtchStackClient(const EtchStackClient&amp; other)&#010;+ : EtchStack(other), mStaticResources(other.mStaticResources)&#010;+{&#010;+&#010; }&#010; &#010; EtchStackClient::~EtchStackClient() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp Wed Oct 17 06:48:53 2012&#010;@@ -23,11 +23,12 @@ const EtchObjectType* EtchStackServer::T&#010; }&#010; &#010; EtchStackServer::EtchStackServer()&#010;-: EtchStack()&#010;-  , mRemote(NULL)&#010;-{&#010;-  EtchObject::addObjectType(EtchStackServer::TYPE());&#010;-  EtchObject::setObjectType(EtchStackServer::TYPE());&#010;+: EtchStack(), mRemote(NULL) {&#010;+  addObjectType(EtchStackServer::TYPE());&#010;+}&#010;+&#010;+EtchStackServer::EtchStackServer(const EtchStackServer&amp; other)&#010;+: EtchStack(other), mRemote(other.mRemote) {&#010; }&#010; &#010; EtchStackServer::~EtchStackServer() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessage.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessage.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessage.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessage.cpp Wed Oct 17 06:48:53 2012&#010;@@ -29,6 +29,10 @@ EtchMessage::EtchMessage(EtchType* type,&#010; &#010; }&#010; &#010;+EtchMessage::EtchMessage(const EtchMessage&amp; other)&#010;+ : EtchStructValue(other), mVf(other.mVf) {&#010;+}&#010;+&#010; EtchMessage::~EtchMessage() {&#010; &#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -195,5 +195,22 @@ TEST(EtchArrayValueTest, addTest) {&#010;   delete av2;&#010; }&#010; &#010;+TEST(EtchArrayValueTest, copyTest) {&#010;+  capu::SmartPointer&lt;EtchNativeArray&lt;capu::int8_t&gt; &gt; nativeTypeArray = new EtchNativeArray&lt;capu::int8_t&gt;(1);&#010;+  nativeTypeArray-&gt;set(0, 1);&#010;+  EtchArrayValue o1(nativeTypeArray, 1);&#010;+  EtchArrayValue o2(o1);&#010;+  EtchArrayValue o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010; &#010;+TEST(EtchArrayValueTest, isInstanceOf) {&#010;+  capu::SmartPointer&lt;EtchNativeArray&lt;capu::int8_t&gt; &gt; nativeTypeArray = new EtchNativeArray&lt;capu::int8_t&gt;(1);&#010;+  EtchObject* o1 =  new EtchArrayValue(nativeTypeArray, 1);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchArrayValue::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchAuthenticationExceptionTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchAuthenticationExceptionTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchAuthenticationExceptionTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchAuthenticationExceptionTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -60,3 +60,22 @@ TEST(EtchAuthenticationExceptionTest, eq&#010;   delete test2;&#010;   delete test3;&#010; }&#010;+&#010;+TEST(EtchAuthenticationExceptionTest, copyTest) {&#010;+  EtchString str("test message");&#010;+  EtchAuthenticationException o1(str);&#010;+  EtchAuthenticationException o2(o1);&#010;+  EtchAuthenticationException o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchAuthenticationExceptionTest, isInstanceOf) {&#010;+  EtchString str("test message");&#010;+  EtchObject* o1 = new EtchAuthenticationException(str);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchException::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchAuthenticationException::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchBoolTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchBoolTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchBoolTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchBoolTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,44 +18,62 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchBool.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchBoolTest, Constructor_Default){&#010;   EtchBool* i1 = new EtchBool();&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchBool::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == false);&#010;+  EXPECT_FALSE(i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchBoolTest, Constructor_Bool){&#010;   EtchBool* i1 = new EtchBool(true);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchBool::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == true);&#010;+  EXPECT_TRUE(i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchBoolTest, set){&#010;   EtchBool* i1 = new EtchBool();&#010;   i1-&gt;set(true);&#010;-  EXPECT_TRUE(i1-&gt;get() == true);&#010;+  EXPECT_TRUE(i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchBoolTest, get){&#010;   EtchBool* i1 = new EtchBool();&#010;-  EXPECT_TRUE(i1-&gt;get() == false);&#010;+  EXPECT_FALSE(i1-&gt;get());&#010;   i1-&gt;set(true);&#010;-  EXPECT_TRUE(i1-&gt;get() == true);&#010;+  EXPECT_TRUE(i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchBoolTest, equals){&#010;   EtchBool i1, i2;&#010;-  EXPECT_TRUE(i1.get() == false);&#010;+  EXPECT_FALSE(i1.get());&#010;   i1.set(true);&#010;   i2.set(false);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(true);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010; }&#010;+&#010;+TEST(EtchBoolTest, copyTest) {&#010;+  EtchBool o1(true);&#010;+  EtchBool o2(o1);&#010;+  EtchBool o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchBoolTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchBool(true);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchBool::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;+&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchByteTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchByteTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchByteTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchByteTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,44 +18,63 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchByte.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchByteTest, Constructor_Default){&#010;   EtchByte* i1 = new EtchByte();&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchByte::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 0);&#010;+  EXPECT_EQ(0, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchByteTest, Constructor_Byte){&#010;   EtchByte* i1 = new EtchByte(42);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchByte::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 42);&#010;+  EXPECT_EQ(42, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchByteTest, set){&#010;   EtchByte* i1 = new EtchByte();&#010;   i1-&gt;set(43);&#010;-  EXPECT_TRUE(i1-&gt;get() == 43);&#010;+  EXPECT_EQ(43, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchByteTest, get){&#010;   EtchByte* i1 = new EtchByte();&#010;-  EXPECT_TRUE(i1-&gt;get() == 0);&#010;+  EXPECT_EQ(0, i1-&gt;get());&#010;   i1-&gt;set(41);&#010;-  EXPECT_TRUE(i1-&gt;get() == 41);&#010;+  EXPECT_EQ(41, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchByteTest, equals){&#010;   EtchByte i1, i2;&#010;-  EXPECT_TRUE(i1.get() == false);&#010;+  EXPECT_FALSE(i1.get());&#010;   i1.set(40);&#010;   i2.set(41);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(40);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010; }&#010;+&#010;+&#010;+TEST(EtchByteTest, copyTest) {&#010;+  EtchByte o1(2);&#010;+  EtchByte o2(o1);&#010;+  EtchByte o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchByteTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchByte(2);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchByte::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;+&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDateTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDateTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDateTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDateTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,6 +18,7 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchDate.h"&#010;+#include "common/EtchString.h"&#010; &#010; TEST(EtchDateTest, Constructor) {&#010;   EtchDate* i1 = new EtchDate();&#010;@@ -49,3 +50,22 @@ TEST(EtchDateTest, equals) {&#010;   i2.set(_time);&#010;   EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010; }&#010;+&#010;+&#010;+TEST(EtchDateTest, copyTest) {&#010;+  EtchDate o1;&#010;+  time_t _time = 1234567;&#010;+  o1.set(_time);&#010;+  EtchDate o2(o1);&#010;+  EtchDate o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchDateTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchDate();&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchDate::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDoubleTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDoubleTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDoubleTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDoubleTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,44 +18,61 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchDouble.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchDoubleTest, Constructor_Default){&#010;   EtchDouble* i1 = new EtchDouble();&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchDouble::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 0.0L);&#010;+  EXPECT_EQ(0.0L, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchDoubleTest, Constructor_Double){&#010;   EtchDouble* i1 = new EtchDouble(42.0L);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchDouble::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 42.0L);&#010;+  EXPECT_EQ(42.0L, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchDoubleTest, set){&#010;   EtchDouble* i1 = new EtchDouble();&#010;   i1-&gt;set(43.0L);&#010;-  EXPECT_EQ(i1-&gt;get(), 43.0L);&#010;+  EXPECT_EQ(43.0L, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchDoubleTest, get){&#010;   EtchDouble* i1 = new EtchDouble();&#010;-  EXPECT_TRUE(i1-&gt;get() == 0.0L);&#010;+  EXPECT_EQ(0.0L, i1-&gt;get());&#010;   i1-&gt;set(41.0L);&#010;-  EXPECT_TRUE(i1-&gt;get() == 41.0L);&#010;+  EXPECT_EQ(41.0L, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchDoubleTest, equals){&#010;   EtchDouble i1, i2;&#010;-  EXPECT_TRUE(i1.get() == 0.0);&#010;+  EXPECT_EQ(0.0L, i1.get());&#010;   i1.set(40);&#010;   i2.set(41);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(40);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010;+}&#010;+&#010;+TEST(EtchDoubleTest, copyTest) {&#010;+  EtchDouble o1(2.123);&#010;+  EtchDouble o2(o1);&#010;+  EtchDouble o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchDoubleTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchDouble(2.123);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchDouble::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchExceptionTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchExceptionTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchExceptionTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchExceptionTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,6 +18,7 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchException.h"&#010;+#include "common/EtchString.h"&#010; &#010; TEST(EtchExceptionTest, createTest) {&#010;   EtchString str("test message");&#010;@@ -59,3 +60,19 @@ TEST(EtchExceptionTest, equalsTest) {&#010;   delete test2;&#010;   delete test3;&#010; }&#010;+&#010;+TEST(EtchExceptionTest, copyTest) {&#010;+  EtchException o1(EtchString("Message"), ETCH_ERROR, EtchException::EXCPTYPE_BUILTIN);&#010;+  EtchException o2(o1);&#010;+  EtchException o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchExceptionTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchException(EtchString("Message"), ETCH_ERROR, EtchException::EXCPTYPE_BUILTIN);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchException::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchFloatTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchFloatTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchFloatTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchFloatTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,44 +18,61 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchFloat.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchFloatTest, Constructor_Default){&#010;   EtchFloat* i1 = new EtchFloat();&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchFloat::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 0.0f);&#010;+  EXPECT_EQ(0.0f, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchFloatTest, Constructor_Float){&#010;   EtchFloat* i1 = new EtchFloat(42.0f);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchFloat::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 42.0f);&#010;+  EXPECT_EQ(42.0f, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchFloatTest, set){&#010;   EtchFloat* i1 = new EtchFloat();&#010;   i1-&gt;set(43.33f);&#010;-  EXPECT_TRUE(i1-&gt;get() == 43.33f);&#010;+  EXPECT_EQ(43.33f, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchFloatTest, get){&#010;   EtchFloat* i1 = new EtchFloat();&#010;-  EXPECT_TRUE(i1-&gt;get() == 0.0f);&#010;+  EXPECT_EQ(0.0f, i1-&gt;get());&#010;   i1-&gt;set(41.0f);&#010;-  EXPECT_TRUE(i1-&gt;get() == 41.0f);&#010;+  EXPECT_EQ(41.0f, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchFloatTest, equals){&#010;   EtchFloat i1, i2;&#010;-  EXPECT_TRUE(i1.get() == 0.0f);&#010;+  EXPECT_EQ(0.0f, i1.get());&#010;   i1.set(40);&#010;   i2.set(41);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(40);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010;+}&#010;+&#010;+TEST(EtchFloatTest, copyTest) {&#010;+  EtchFloat o1(2.123);&#010;+  EtchFloat o2(o1);&#010;+  EtchFloat o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchFloatTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchFloat(2.123);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchFloat::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchInt32Test.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchInt32Test.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchInt32Test.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchInt32Test.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,6 +18,7 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchInt32.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010;@@ -31,33 +32,33 @@ TEST(EtchInt32Test, Constructor_Default)&#010; TEST(EtchInt32Test, Constructor_Int){&#010;   EtchInt32* i1 = new EtchInt32(42);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchInt32::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 42);&#010;+  EXPECT_EQ(42, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchInt32Test, set){&#010;   EtchInt32* i1 = new EtchInt32();&#010;   i1-&gt;set(42);&#010;-  EXPECT_TRUE(i1-&gt;get() == 42);&#010;+  EXPECT_EQ(42, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchInt32Test, get){&#010;   EtchInt32* i1 = new EtchInt32();&#010;-  EXPECT_TRUE(i1-&gt;get() == 0);&#010;+  EXPECT_EQ(0, i1-&gt;get());&#010;   i1-&gt;set(42);&#010;-  EXPECT_TRUE(i1-&gt;get() == 42);&#010;+  EXPECT_EQ(42, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchInt32Test, equals){&#010;   EtchInt32 i1, i2;&#010;-  EXPECT_TRUE(i1.get() == false);&#010;+  EXPECT_FALSE(i1.get());&#010;   i1.set(40);&#010;   i2.set(41);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(40);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010; }&#010; &#010; TEST(EtchInt32Test, operator_equal){&#010;@@ -127,3 +128,19 @@ TEST(EtchInt32Test, operator_unequal){&#010;   ++b;&#010;   EXPECT_FALSE(a != b);&#010; }&#010;+&#010;+TEST(EtchInt32Test, copyTest) {&#010;+  EtchInt32 o1(2);&#010;+  EtchInt32 o2(o1);&#010;+  EtchInt32 o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchInt32Test, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchInt32(2);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchInt32::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -19,6 +19,7 @@&#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchInt32.h"&#010; #include "common/EtchList.h"&#010;+#include "common/EtchString.h"&#010; &#010; TEST(EtchList, Constructor_Default) {&#010;   //create an empty linked list&#010;@@ -369,3 +370,23 @@ TEST(EtchListIterator, next) {&#010; }&#010; &#010; &#010;+TEST(EtchList, copyTest) {&#010;+  EtchList&lt;EtchInt32&gt; o1;&#010;+  o1.add(EtchInt32(2));&#010;+  o1.add(EtchInt32(3));&#010;+  EtchList&lt;EtchInt32&gt; o2(o1);&#010;+  EtchList&lt;EtchInt32&gt; o3 = o2;&#010;+&#010;+  EXPECT_EQ(o1.size(), o2.size());&#010;+  EXPECT_EQ(o2.size(), o3.size());&#010;+}&#010;+&#010;+TEST(EtchList, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchList&lt;EtchInt32&gt;();&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchList&lt;EtchInt32&gt;::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;+&#010;+&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchLongTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchLongTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchLongTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchLongTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,27 +18,28 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchLong.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchLongTest, Constructor_Default){&#010;   EtchLong* i1 = new EtchLong();&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchLong::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 0);&#010;+  EXPECT_EQ(0, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchLongTest, Constructor_Long){&#010;   EtchLong* i1 = new EtchLong(42);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchLong::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 42);&#010;+  EXPECT_EQ(42, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchLongTest, set){&#010;   EtchLong* i1 = new EtchLong();&#010;   i1-&gt;set(43000000);&#010;-  EXPECT_TRUE(i1-&gt;get() == 43000000);&#010;+  EXPECT_EQ(43000000, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010;@@ -52,10 +53,26 @@ TEST(EtchLongTest, get){&#010; &#010; TEST(EtchLongTest, equals){&#010;   EtchLong i1, i2;&#010;-  EXPECT_TRUE(i1.get() == false);&#010;+  EXPECT_FALSE(i1.get());&#010;   i1.set(40);&#010;   i2.set(41);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(40);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010;+}&#010;+&#010;+TEST(EtchLongTest, copyTest) {&#010;+  EtchLong o1(2);&#010;+  EtchLong o2(o1);&#010;+  EtchLong o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchLongTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchLong(2);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchLong::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -71,9 +71,9 @@ TEST(EtchObjectTest, getTypeTrait) {&#010; &#010; TEST(EtchObjectTest, isInstanceOf) {&#010;   EtchObjectMy1Object* o1 = new EtchObjectMy1Object();&#010;-  EXPECT_EQ(true, o1-&gt;isInstanceOf(EtchObjectMy1Object::TYPE()));&#010;-  EXPECT_EQ(true, o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;-  EXPECT_EQ(false, o1-&gt;isInstanceOf(EtchObjectMy2Object::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObjectMy1Object::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchObjectMy2Object::TYPE()));&#010; &#010;   delete o1;&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchRuntimeExceptionTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchRuntimeExceptionTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchRuntimeExceptionTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchRuntimeExceptionTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -59,3 +59,20 @@ TEST(EtchRuntimeExceptionTest, equalsTes&#010;   delete test2;&#010;   delete test3;&#010; }&#010;+&#010;+TEST(EtchRuntimeExceptionTest, copyTest) {&#010;+  EtchRuntimeException o1(EtchString("Message"), ETCH_ERROR);&#010;+  EtchRuntimeException o2(o1);&#010;+  EtchRuntimeException o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchRuntimeExceptionTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchRuntimeException(EtchString("Message"), ETCH_ERROR);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchException::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchRuntimeException::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchShortTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchShortTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchShortTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchShortTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,44 +18,61 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchShort.h"&#010;+#include "common/EtchString.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchShortTest, Constructor_Default){&#010;   EtchShort* i1 = new EtchShort();&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchShort::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 0);&#010;+  EXPECT_EQ(0, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchShortTest, Constructor_Short){&#010;   EtchShort* i1 = new EtchShort(42);&#010;   EXPECT_TRUE(i1-&gt;getObjectType()-&gt;equals(EtchShort::TYPE()));&#010;-  EXPECT_TRUE(i1-&gt;get() == 42);&#010;+  EXPECT_EQ(42, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchShortTest, set){&#010;   EtchShort* i1 = new EtchShort();&#010;   i1-&gt;set(43);&#010;-  EXPECT_TRUE(i1-&gt;get() == 43);&#010;+  EXPECT_EQ(43, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchShortTest, get){&#010;   EtchShort* i1 = new EtchShort();&#010;-  EXPECT_TRUE(i1-&gt;get() == 0);&#010;+  EXPECT_EQ(0, i1-&gt;get());&#010;   i1-&gt;set(41);&#010;-  EXPECT_TRUE(i1-&gt;get() == 41);&#010;+  EXPECT_EQ(41, i1-&gt;get());&#010;   delete i1;&#010; }&#010; &#010; TEST(EtchShortTest, equals){&#010;   EtchShort i1, i2;&#010;-  EXPECT_TRUE(i1.get() == false);&#010;+  EXPECT_FALSE(i1.get());&#010;   i1.set(40);&#010;   i2.set(41);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == false);&#010;+  EXPECT_FALSE(i1.equals(&amp;i2));&#010;   i2.set(40);&#010;-  EXPECT_TRUE(i1.equals(&amp;i2) == true);&#010;+  EXPECT_TRUE(i1.equals(&amp;i2));&#010;+}&#010;+&#010;+TEST(EtchShortTest, copyTest) {&#010;+  EtchShort o1(2);&#010;+  EtchShort o2(o1);&#010;+  EtchShort o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchShortTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchShort(2);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchShort::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchStringTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchStringTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchStringTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchStringTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -18,13 +18,14 @@&#010; &#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchString.h"&#010;+#include "common/EtchInt32.h"&#010; &#010; // Tests positive input.&#010; &#010; TEST(EtchStringTest, Constructor_Default) {&#010;   EtchString* s1 = new EtchString();&#010;   EXPECT_TRUE(s1-&gt;getObjectType()-&gt;equals(EtchString::TYPE()));&#010;-  EXPECT_TRUE(s1-&gt;c_str() == NULL);&#010;+  EXPECT_EQ(NULL, s1-&gt;c_str());&#010;   delete s1;&#010; }&#010; &#010;@@ -198,4 +199,19 @@ TEST(EtchStringTest, UTF8_substringTest)&#010;   status_t result;&#010;   result = str1.substring(0, 5, &amp;tmp);&#010;   EXPECT_TRUE(result == ETCH_EUNIMPL);&#010;-}&#010;\ No newline at end of file&#010;+}&#010;+TEST(EtchStringTest, copyTest) {&#010;+  EtchString o1("2");&#010;+  EtchString o2(o1);&#010;+  EtchString o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST(EtchStringTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchString("2");&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchInt32::TYPE()));&#010;+  delete o1;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -208,7 +208,7 @@ public:&#010;   }&#010; &#010;   static void bytes2msg(capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer&lt;EtchMessage&gt; &amp;msg, MyValueFactory &amp;vf) {&#010;-    return bytes2msg(buf, length, msg, LEVEL_FULL, vf);&#010;+    bytes2msg(buf, length, msg, LEVEL_FULL, vf);&#010;   }&#010; &#010;   static void bytes2msg(capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer&lt;EtchMessage&gt; &amp;msg, EtchLevel level, MyValueFactory &amp;vf) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -195,7 +195,7 @@ TEST_F(EtchDefaultValueFactoryTest, expo&#010;   EtchStructValue* sv_unknown;&#010; &#010;   //TRY UNKNOWN VALUE&#010;-  capu::SmartPointer&lt;EtchObject&gt; unknown = new EtchObject(EtchObject::TYPE());&#010;+  capu::SmartPointer&lt;EtchObject&gt; unknown = new EtchObject();&#010;   EXPECT_TRUE(test-&gt;exportCustomValue(unknown, sv_unknown) == ETCH_EINVAL);&#010; &#010;   //clear the added types&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -92,7 +92,7 @@ TEST_F(EtchHashTableSerializerTest, init&#010;   EtchClass2TypeMap* c2type = new EtchClass2TypeMap();&#010;   EtchString typeName("type1");&#010;   EtchType* type = new EtchType(10, typeName);&#010;-  EtchType* result;&#010;+  EtchType* result = 0;&#010;   EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);&#010;   c2type-&gt;get(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), &amp;result);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -498,3 +498,15 @@ TEST_F(EtchStructValueTest, removeTest) &#010;   delete factory;&#010; }&#010; &#010;+TEST_F(EtchStructValueTest, isInstanceOf) {&#010;+  EtchString typeName("comp");&#010;+  EtchType* comp = new EtchType(90, typeName);&#010;+  EtchValueFactory* factory = new MockValueFactory_FULL();&#010;+  EtchObject* o1 = new EtchStructValue(comp, factory);&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchStructValue::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchInt32::TYPE()));&#010;+  delete o1;&#010;+  delete comp;&#010;+  delete factory;&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -164,3 +164,20 @@ TEST_F(EtchTypeTest, lockTest) {&#010;   EXPECT_TRUE(t.getSuperType() == NULL);&#010;   delete t2;&#010; }&#010;+&#010;+TEST_F(EtchTypeTest, copyTest) {&#010;+  EtchType o1(EtchString("test"));&#010;+  EtchType o2(o1);&#010;+  EtchType o3 = o2;&#010;+  EXPECT_TRUE(o1.equals(&amp;o2));&#010;+  EXPECT_TRUE(o2.equals(&amp;o3));&#010;+}&#010;+&#010;+TEST_F(EtchTypeTest, isInstanceOf) {&#010;+  EtchObject* o1 = new EtchType(EtchString("test"));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_TRUE(o1-&gt;isInstanceOf(EtchType::TYPE()));&#010;+  EXPECT_FALSE(o1-&gt;isInstanceOf(EtchString::TYPE()));&#010;+  delete o1;&#010;+}&#010;+&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -26,8 +26,8 @@&#010; class MockGeneratedClass : public EtchObject {&#010; public:&#010; &#010;-  MockGeneratedClass()&#010;-  : EtchObject(MockGeneratedClass::TYPE()) {&#010;+  MockGeneratedClass() {&#010;+    addObjectType(MockGeneratedClass::TYPE());&#010;   }&#010; &#010;   virtual ~MockGeneratedClass() {&#010;@@ -144,7 +144,7 @@ TEST_F(EtchValidatorCustomTest, validate&#010;   capu::SmartPointer&lt;EtchObject&gt; integer2 = new EtchInt32(5);&#010;   capu::SmartPointer&lt;EtchObject&gt; integer3 = new EtchInt32(127);&#010;   capu::SmartPointer&lt;EtchObject&gt; byte2 = new EtchByte(3);&#010;-  &#010;+&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;   capu::SmartPointer&lt;EtchObject&gt; generatedClass = new MockGeneratedClass();&#010; &#010;@@ -165,7 +165,7 @@ TEST_F(EtchValidatorCustomTest, validate&#010; TEST_F(EtchValidatorCustomTest, elementValidatorTest) {&#010;   status_t status;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr = NULL;&#010;-  &#010;+&#010;   status = EtchValidatorCustom::Get(1, MockGeneratedClass::TYPE(), true, ptr);&#010;   EXPECT_EQ(ETCH_OK, status);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp Wed Oct 17 06:48:53 2012&#010;@@ -136,7 +136,7 @@ TEST_F(EtchMessageTest, getTypeTest) {&#010; &#010;   //Create Value Factory&#010;   EtchValueFactory* factory = new MockValueFactory7();&#010;-  &#010;+&#010;   //create message&#010;   EtchMessage *sv = new EtchMessage(comp, factory);&#010;   EXPECT_TRUE(sv-&gt;getType()-&gt;equals(comp));&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399111 [1/2] - in /incubator/etch/trunk/binding-cpp: compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ runtime/include/common/ runtime/include/serialization/ runtime/include/support/ runtime/include/transport/ runtime/src...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017064903.0EFCD2388A29@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017064903-0EFCD2388A29@eris-apache-org%3e</id>
<updated>2012-10-17T06:48:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:48:53 2012&#010;New Revision: 1399111&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399111&amp;view=rev&#010;Log:&#010;ETCH-222 Refactored EtchObjectType hierarchy&#010;&#010;Change-Id: Ia0df372b9d34e300d7a87537bdc34ec77e291501&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchAuthenticationException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeValidator.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPool.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPoolRunnable.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchAuthenticationException.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchBool.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDate.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDouble.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchFloat.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchRuntimeException.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchField.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeValidator.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValueFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchFreePool.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPool.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessage.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchAuthenticationExceptionTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchBoolTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchByteTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDateTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchDoubleTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchExceptionTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchFloatTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchInt32Test.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchLongTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchRuntimeExceptionTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchShortTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchStringTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_cpp.vm Wed Oct 17 06:48:53 2012&#010;@@ -64,13 +64,11 @@ const EtchObjectType* $class::$n.name():&#010;  * Constructs the $n.name().&#010;  */&#010; $class::$n.name()::$n.name()()&#010;-#if(!$n.isExcept())&#010;-  : EtchObject($class::$n.name()::TYPE())&#010;-#else&#010;-  : EtchException("${n.name()}", ETCH_ERROR, EXCPTYPE_USERDEFINED, $class::$n.name()::TYPE())&#010;+#if($n.isExcept())&#010;+  : EtchException("${n.name()}", ETCH_ERROR, EXCPTYPE_USERDEFINED)&#010; #end&#010; {&#010;-  //nothing to do!&#010;+  addObjectType($class::$n.name()::TYPE());&#010; }&#010; #if ($n.hasAnyParameters())&#010; /**&#010;@@ -85,16 +83,14 @@ $class::$n.name()::$n.name()()&#010;  */&#010; $class::$n.name()::$n.name()(#set($sep = "")#foreach($i in $n.getAllParameters())$sep$helper.getEtchTypeName($i.type(), true) $i.name() #set( $sep = ", " )#end)&#010; #if($n.hasExtends())&#010;-  : $n.name()(#set($sep = "")#foreach($i in $n.getExtends().getAllParameters())$sep$i.name()#set( $sep = ", " ))#end#if(!$n.isExcept()),&#010;-  EtchObject($class::$n.name()::TYPE())#end&#010;-#else&#010;-#if(!$n.isExcept())&#010;-  : EtchObject($class::$n.name()::TYPE())&#010;+  : $n.name()(#set($sep = "")#foreach($i in $n.getExtends().getAllParameters())$sep$i.name()#set( $sep = ", " ))#end&#010; #else&#010;-  : EtchException("${n.name()}", ETCH_ERROR, EXCPTYPE_USERDEFINED, $class::$n.name()::TYPE())&#010;+#if($n.isExcept())&#010;+  : EtchException("${n.name()}", ETCH_ERROR, EXCPTYPE_USERDEFINED)&#010; #end&#010; #end&#010; {&#010;+  addObjectType($class::$n.name()::TYPE());&#010; #foreach( $i in $n.getParameters() )&#010;   this-&gt;$i.name() = $i.name();&#010; #end&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm Wed Oct 17 06:48:53 2012&#010;@@ -83,9 +83,8 @@ namespace $namespace {&#010; #end&#010;    */&#010; #end&#010;-  class $n.name() :&#010;-    public EtchObject&#010;-  {&#010;+  class $n.name() &#010;+  : public EtchObject {&#010;   public:&#010;     static const EtchObjectType* TYPE();&#010;     enum _eval{&#010;@@ -104,8 +103,13 @@ namespace $namespace {&#010; &#010;     } Value;&#010; &#010;-    $n.name()() : EtchObject($n.name()::TYPE()) { }&#010;-    $n.name()(_eval eval) : EtchObject($n.name()::TYPE()) { Value = eval; }&#010;+    $n.name()() {&#010;+      addObjectType($n.name()::TYPE());&#010;+    }&#010;+    $n.name()(_eval eval) { &#010;+      addObjectType($n.name()::TYPE());&#010;+      Value = eval; &#010;+    }&#010;   };&#010;   typedef capu::SmartPointer&lt;$n.name()&gt; $n.name()Ptr;&#010; #end&#010;@@ -218,7 +222,7 @@ namespace $namespace {&#010; #end&#010;     class $n.name()&#010; #if($n.hasExtends())&#010;-      : public $n.getExtends().name(), public EtchObject&#010;+      : public $n.getExtends().name()&#010; #elseif($n.isExcept())&#010;       : public EtchException&#010; #else&#010;@@ -245,9 +249,7 @@ namespace $namespace {&#010; #end&#010; #end&#010;        */&#010;-      $n.name()(#set($sep = "")#foreach($i in $n.getAllParameters())$sep$helper.getEtchTypeName($i.type(), true) $i.name() #set( $sep = ", " )#end)#if(!$n.hasExtends());&#010;-#else&#010;-        : $n.name();#end&#010;+      $n.name()(#set($sep = "")#foreach($i in $n.getAllParameters())$sep$helper.getEtchTypeName($i.type(), true) $i.name() #set( $sep = ", " )#end);&#010; #end&#010; &#010;       virtual ~$n.name()() {}&#010;@@ -293,27 +295,20 @@ namespace $namespace {&#010; #end&#010;     };&#010;     typedef capu::SmartPointer&lt;${n.name()}&gt; $n.name()Ptr;&#010;+    //TODO: we may not be able to serialize NativeArrays of custom user Types! &#010;+    typedef capu::SmartPointer&lt;EtchNativeArray&lt;${n.name()}Ptr&gt; &gt; EtchNativeArray$n.name()Ptr;&#010; &#010; #end&#010; #elseif ($n.isBuiltin())&#010; ## nothing to do.&#010; #elseif ($n.isEnumx())&#010;     typedef capu::SmartPointer&lt;${n.name()}&gt; $n.name()Ptr;&#010;+    typedef capu::SmartPointer&lt;EtchNativeArray&lt;${n.name()}Ptr&gt; &gt; EtchNativeArray$n.name()Ptr;&#010; &#010; #else&#010;     *** intf.vm: don't know what to do with $n ***&#010; #end&#010; #end&#010;-#foreach($n in $intf.iterator())&#010;-#if ($n.hasAnyParameters())&#010;-#foreach( $i in $n.getAllParameters() )&#010;-#if($i.type().dim() &gt; 0)&#010;-    typedef capu::SmartPointer&lt;EtchNativeArray&lt;${n.name()}Ptr&gt; &gt; EtchNativeArray$n.name()Ptr;&#010;-    ##typedef EtchNativeArray&lt;${n.name()}Ptr&gt; EtchNativeArray$n.name()Obj;&#010;-#end&#010;-#end&#010;-#end  &#010;-#end&#010;   };&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm Wed Oct 17 06:48:53 2012&#010;@@ -205,8 +205,6 @@ status_t ${vf}::InitTypes()&#010; &#010; status_t ${vf}::InitResults()&#010; {&#010;-//AF: TO-REVIEW: finde die Verwendung von Anonymer Enum bei EchtDirection und bei EtchAsyncMode unschoen&#010;-&#010; #foreach ( $n in $intf.iterator() )&#010; #if ($n.isMessage())&#010;   ${vf}::${n.vname( $helper )}-&gt;setDirection((EtchDirection)$n.msgDir());&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h Wed Oct 17 06:48:53 2012&#010;@@ -61,6 +61,13 @@ public:&#010;    */&#010;   EtchArrayValue(capu::SmartPointer&lt;EtchNativeArrayBase&gt; array, capu::int32_t size);&#010; &#010;+  /**&#010;+   * Constructs an array value copy with no type info. This is used perhaps&#010;+   * by extern struct serializers.&#010;+   * @param other Array Value&#010;+   */&#010;+  EtchArrayValue(const EtchArrayValue&amp; other);&#010;+&#010;   virtual ~EtchArrayValue();&#010; &#010;   /**&#010;@@ -97,6 +104,11 @@ public:&#010;    */&#010;   void setIndex(capu::int32_t val);&#010; &#010;+  /**&#010;+   * @return true if two object is equal&#010;+   *         false otherwise&#010;+   */&#010;+  virtual capu::bool_t equals(const EtchObject * other) const;&#010; &#010;   /**&#010;    * @param index&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchAuthenticationException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchAuthenticationException.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchAuthenticationException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchAuthenticationException.h Wed Oct 17 06:48:53 2012&#010;@@ -25,10 +25,17 @@ public:&#010; &#010;   static const EtchObjectType* TYPE();&#010; &#010;-  //Default Constructor&#010;+  /**&#010;+   * Constructs a EtchAuthenticationException object.&#010;+   */&#010;   EtchAuthenticationException(EtchString &amp;msg);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchAuthenticationException.&#010;+   */&#010;+  EtchAuthenticationException(const EtchAuthenticationException&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchAuthenticationException();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h Wed Oct 17 06:48:53 2012&#010;@@ -44,6 +44,11 @@ public:&#010;   EtchBool(capu::bool_t value);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchBool&#010;+   */&#010;+  EtchBool(const EtchBool&amp; other);&#010;+&#010;+  /**&#010;    * Sets bool value.&#010;    */&#010;   void set(capu::bool_t value);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h Wed Oct 17 06:48:53 2012&#010;@@ -44,6 +44,11 @@ public:&#010;   EtchByte(capu::int8_t value);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchByte.&#010;+   */&#010;+  EtchByte(const EtchByte &amp;value);&#010;+&#010;+  /**&#010;    * Sets byte value.&#010;    */&#010;   void set(capu::int8_t value);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDate.h Wed Oct 17 06:48:53 2012&#010;@@ -40,6 +40,11 @@ public:&#010;    */&#010;   EtchDate(capu::time_t value);&#010; &#010;+  /**&#010;+   * Constructs a copy of EtchDate&#010;+   */&#010;+  EtchDate(const EtchDate&amp; other);&#010;+&#010;   //Destructor&#010;   virtual ~EtchDate();&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h Wed Oct 17 06:48:53 2012&#010;@@ -44,6 +44,11 @@ public:&#010;   EtchDouble(capu::double_t value);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchDouble.&#010;+   */&#010;+  EtchDouble(const EtchDouble&amp; other);&#010;+&#010;+  /**&#010;    * Sets double value.&#010;    */&#010;   void set(capu::double_t value);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchException.h Wed Oct 17 06:48:53 2012&#010;@@ -34,7 +34,9 @@ public:&#010;   };&#010; &#010; &#010;-  //Constructor&#010;+  /**&#010;+   * Constructs a EtchException object.&#010;+   */&#010;   EtchException();&#010; &#010;   /**&#010;@@ -43,7 +45,14 @@ public:&#010;    */&#010;   EtchException(EtchString msg, status_t errcode, EtchExceptionType type);&#010; &#010;-  //destructor&#010;+  /**&#010;+   * Constructs a copy of EtchShort.&#010;+   */&#010;+  EtchException(const EtchException&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchException();&#010; &#010;   //overridden&#010;@@ -70,18 +79,9 @@ public:&#010;   static const EtchObjectType* TYPE();&#010; &#010; protected:&#010;-&#010;   EtchString mErrorMessage;&#010;   status_t mErrorcode;&#010;   EtchExceptionType mExcptype;&#010;-&#010;-  /**&#010;-   * @param msg Message of exception&#010;-   * @param errcode Error Code such as ETCH_EINVAL etc.&#010;-   * @param type    Exception Type such as EXCPTYPE_USERDEFINED etc.&#010;-   * @param type_id Typeid of Exception&#010;-   */&#010;-  EtchException(EtchString msg, status_t errcode, EtchExceptionType type, const EtchObjectType* type_id);&#010; };&#010; &#010; #endif /* ETCHEXCEPTION_H */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h Wed Oct 17 06:48:53 2012&#010;@@ -44,6 +44,11 @@ public:&#010;   EtchFloat(capu::float_t value);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchDouble.&#010;+   */&#010;+  EtchFloat(const EtchFloat&amp; value);&#010;+&#010;+  /**&#010;    * Sets float value.&#010;    */&#010;   void set(capu::float_t value);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h Wed Oct 17 06:48:53 2012&#010;@@ -51,6 +51,12 @@ public:&#010;   inline EtchHashSet(capu::uint32_t size);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  inline EtchHashSet(const EtchHashSet&amp; other);&#010;+&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   inline ~EtchHashSet();&#010;@@ -103,15 +109,14 @@ private:&#010; };&#010; &#010; template &lt;class T, class H, class C&gt;&#010;-inline EtchHashSet&lt;T, H, C&gt;::EtchHashSet()&#010;-: EtchObject(EtchHashSet&lt;T, H, C&gt;::TYPE()) {&#010;-&#010;+inline EtchHashSet&lt;T, H, C&gt;::EtchHashSet() {&#010;+  addObjectType(EtchHashSet&lt;T, H, C&gt;::TYPE());&#010; }&#010; &#010; template &lt;class T, class H, class C&gt;&#010; inline EtchHashSet&lt;T, H, C&gt;::EtchHashSet(capu::uint32_t size)&#010;-: EtchObject(&amp;EtchHashSet&lt;T, H, C&gt;::TYPE), mHashSet(size) {&#010;-&#010;+ : mHashSet(size) {&#010;+  addObjectType(EtchHashSet&lt;T, H, C&gt;::TYPE());&#010; }&#010; &#010; template &lt;class T, class H, class C&gt;&#010;@@ -121,6 +126,12 @@ const EtchObjectType* EtchHashSet&lt;T, H, &#010; }&#010; &#010; template &lt;class T, class H, class C&gt;&#010;+inline EtchHashSet&lt;T, H, C&gt;::EtchHashSet(const EtchHashSet&amp; other)&#010;+ : EtchObject(other), mHashSet(other.mHashSet) {&#010;+&#010;+}&#010;+&#010;+template &lt;class T, class H, class C&gt;&#010; inline EtchHashSet&lt;T, H, C&gt;::~EtchHashSet() {&#010; &#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h Wed Oct 17 06:48:53 2012&#010;@@ -51,9 +51,14 @@ public:&#010;   inline EtchHashTable(capu::uint32_t size);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  inline EtchHashTable(const EtchHashTable&amp; other);&#010;+&#010;+  /**&#010;    * Destructure.&#010;    */&#010;-  inline ~EtchHashTable();&#010;+  inline virtual ~EtchHashTable();&#010; &#010;   /**&#010;    * put a new value to the EtchHashTable.&#010;@@ -109,7 +114,7 @@ public:&#010;    * Return iterator for iterating key value tuples.&#010;    * @return Iterator&#010;    */&#010;-  inline Iterator begin();&#010;+  inline Iterator begin() const;&#010; &#010; };&#010; &#010;@@ -121,14 +126,19 @@ const EtchObjectType* EtchHashTable&lt;Key,&#010; &#010; template &lt;class Key, class T, class H, class C&gt;&#010; inline EtchHashTable&lt;Key, T, H, C&gt;::EtchHashTable()&#010;-: EtchObject(EtchHashTable&lt;Key, T, H, C&gt;::TYPE()), mHashTable(ETCH_DEFAULT_HASH_TABLE_SIZE) {&#010;-&#010;+: mHashTable(ETCH_DEFAULT_HASH_TABLE_SIZE) {&#010;+  addObjectType(EtchHashTable&lt;Key, T, H, C&gt;::TYPE());&#010; }&#010; &#010; template &lt;class Key, class T, class H, class C&gt;&#010; inline EtchHashTable&lt;Key, T, H, C&gt;::EtchHashTable(capu::uint32_t size)&#010;-: EtchObject(EtchHashTable&lt;Key, T, H, C&gt;::TYPE()), mHashTable(size) {&#010;+: mHashTable(size) {&#010;+  addObjectType(EtchHashTable&lt;Key, T, H, C&gt;::TYPE());&#010;+}&#010; &#010;+template &lt;class Key, class T, class H, class C&gt;&#010;+inline EtchHashTable&lt;Key, T, H, C&gt;::EtchHashTable(const EtchHashTable&amp; other)&#010;+: EtchObject(other), mHashTable(other.mHashTable) {&#010; }&#010; &#010; template &lt;class Key, class T, class H, class C&gt;&#010;@@ -162,7 +172,7 @@ inline status_t EtchHashTable&lt;Key, T, H,&#010; }&#010; &#010; template &lt;class Key, class T, class H, class C&gt;&#010;-inline typename EtchHashTable&lt;Key, T, H, C&gt;::Iterator EtchHashTable&lt;Key, T, H, C&gt;::begin() {&#010;+inline typename EtchHashTable&lt;Key, T, H, C&gt;::Iterator EtchHashTable&lt;Key, T, H, C&gt;::begin() const {&#010;   return mHashTable.begin();&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h Wed Oct 17 06:48:53 2012&#010;@@ -20,8 +20,6 @@&#010; #define __ETCHINT32_H__&#010; &#010; #include "common/EtchObject.h"&#010;-#include "common/EtchObjectType.h"&#010;-#include "common/EtchError.h"&#010; &#010; class EtchInt32 :&#010; public EtchObject {&#010;@@ -45,6 +43,17 @@ public:&#010;   EtchInt32(capu::int32_t value);&#010; &#010;   /**&#010;+   * Constructs a EtchInt32 copy&#010;+   */&#010;+  EtchInt32(const EtchInt32&amp; other);&#010;+&#010;+&#010;+  /**&#010;+   * Destructor.&#010;+   */&#010;+  virtual ~EtchInt32();&#010;+&#010;+  /**&#010;    * Sets int32 value.&#010;    */&#010;   void set(capu::int32_t value);&#010;@@ -69,7 +78,12 @@ public:&#010;    * assigns an integer number to the stored value&#010;    */&#010;   capu::int32_t&amp; operator=(capu::int32_t const&amp; other);&#010;-  &#010;+&#010;+  /**&#010;+   * assigns an EtchInt32 to an EtchInt32&#010;+   */&#010;+  EtchInt32&amp; operator=(EtchInt32 const&amp; other);&#010;+&#010;   /**&#010;    * increments and assigns the stored integer value&#010;    */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h Wed Oct 17 06:48:53 2012&#010;@@ -45,6 +45,11 @@ public:&#010;   EtchList();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchList(const EtchList&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   ~EtchList();&#010;@@ -154,11 +159,16 @@ const EtchObjectType* EtchList&lt;T, C&gt;::TY&#010; }&#010; &#010; template&lt;class T, class C&gt;&#010;-EtchList&lt;T, C&gt;::EtchList()&#010;-: EtchObject(EtchList&lt;T, C&gt;::TYPE()) {&#010;+EtchList&lt;T, C&gt;::EtchList() {&#010;+  addObjectType(EtchList&lt;T, C&gt;::TYPE());&#010;+}&#010; &#010;+template&lt;class T, class C&gt;&#010;+EtchList&lt;T, C&gt;::EtchList(const EtchList&amp; other)&#010;+ : EtchObject(other), mList(other.mList) {&#010; }&#010; &#010;+&#010; template&lt;class T, class C&gt;&#010; EtchList&lt;T, C&gt;::~EtchList() {&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h Wed Oct 17 06:48:53 2012&#010;@@ -44,6 +44,12 @@ public:&#010;   EtchLong(capu::int64_t value);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchLong.&#010;+   */&#010;+  EtchLong(const EtchLong&amp; other);&#010;+&#010;+&#010;+  /**&#010;    * Sets long value.&#010;    */&#010;   void set(capu::int64_t value);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h Wed Oct 17 06:48:53 2012&#010;@@ -341,7 +341,7 @@ public:&#010;           //TODO: enhance performance avoiding for-loop-copy&#010;           for (capu::int8_t i = 0; i &lt; length; i++) {&#010;             mData[pos.pos[index]]-&gt;set(i,0,data[i]);&#010;-          } &#010;+          }&#010;         } else {&#010;           //redirect to next sub array&#010;           return mData[pos.pos[index]]-&gt;set(pos, index+1, data, dataSize, offset, length, written);&#010;@@ -470,8 +470,12 @@ class EtchNativeArrayBase :&#010; public EtchObject {&#010; public:&#010; &#010;-  EtchNativeArrayBase(const EtchObjectType* type)&#010;-    : EtchObject(type) {&#010;+  EtchNativeArrayBase() {&#010;+  }&#010;+&#010;+  EtchNativeArrayBase(const EtchNativeArrayBase&amp; other)&#010;+   : EtchObject(other) {&#010;+&#010;   }&#010; &#010;   /**&#010;@@ -528,6 +532,11 @@ public:&#010;   EtchNativeArray(capu::int32_t length, capu::int32_t dim, T* array);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchNativeArray(const EtchNativeArray&amp; other);&#010;+&#010;+  /**&#010;    * Destructor for Etch Nativearray.&#010;    * Frees array if content_owned was set.&#010;    */&#010;@@ -609,8 +618,8 @@ const EtchObjectType* EtchNativeArray&lt;T&gt;&#010; }&#010; &#010; template&lt;class T&gt;&#010;-EtchNativeArray&lt;T&gt;::EtchNativeArray(capu::int32_t length, capu::int32_t dim)&#010;-: EtchNativeArrayBase(EtchNativeArray&lt;T&gt;::TYPE()) {&#010;+EtchNativeArray&lt;T&gt;::EtchNativeArray(capu::int32_t length, capu::int32_t dim) {&#010;+  addObjectType(EtchNativeArray&lt;T&gt;::TYPE());&#010;   if (dim == 1) {&#010;     mData = new EtchArrayData&lt;T&gt;(length);&#010;   } else {&#010;@@ -619,8 +628,8 @@ EtchNativeArray&lt;T&gt;::EtchNativeArray(capu&#010; }&#010; &#010; template&lt;class T&gt;&#010;-EtchNativeArray&lt;T&gt;::EtchNativeArray(capu::int32_t length, capu::int32_t dim, T* array)&#010;-: EtchNativeArrayBase(EtchNativeArray&lt;T&gt;::TYPE()) {&#010;+EtchNativeArray&lt;T&gt;::EtchNativeArray(capu::int32_t length, capu::int32_t dim, T* array) {&#010;+  addObjectType(EtchNativeArray&lt;T&gt;::TYPE());&#010;   capu::int32_t bytesWritten;&#010;   if (dim == 1) {&#010;     mData = new EtchArrayData&lt;T&gt;(length);&#010;@@ -630,7 +639,7 @@ EtchNativeArray&lt;T&gt;::EtchNativeArray(capu&#010;     capu::int32_t dimCount = dim;&#010;     capu::int32_t offset = 0;&#010;     for (capu::int32_t i = 0; i &lt; length; i++) {&#010;-      mData-&gt;createArray(i, 0, 2,dim-1); &#010;+      mData-&gt;createArray(i, 0, 2,dim-1);&#010;       mData-&gt;set(i, 0, &amp;array[offset], length, 0, length, &amp;bytesWritten);&#010;       offset += length;&#010;     }&#010;@@ -640,12 +649,17 @@ EtchNativeArray&lt;T&gt;::EtchNativeArray(capu&#010; }&#010; &#010; template&lt;class T&gt;&#010;-EtchNativeArray&lt;T&gt;::EtchNativeArray(capu::SmartPointer&lt;EtchArray&lt;T&gt; &gt; array) &#010;-: EtchNativeArrayBase(EtchNativeArray&lt;T&gt;::TYPE()){&#010;+EtchNativeArray&lt;T&gt;::EtchNativeArray(capu::SmartPointer&lt;EtchArray&lt;T&gt; &gt; array) {&#010;+  addObjectType(EtchNativeArray&lt;T&gt;::TYPE());&#010;   mData = capu::smartpointer_cast&lt;EtchArrayBase&lt;T&gt; &gt; (array);&#010; }&#010; &#010; template&lt;class T&gt;&#010;+EtchNativeArray&lt;T&gt;::EtchNativeArray(const EtchNativeArray&amp; other)&#010;+ : EtchNativeArrayBase(other), mData(other.mData) {&#010;+}&#010;+&#010;+template&lt;class T&gt;&#010; EtchNativeArray&lt;T&gt;::~EtchNativeArray() {&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h Wed Oct 17 06:48:53 2012&#010;@@ -21,7 +21,7 @@&#010; &#010; #include "capu/util/SmartPointer.h"&#010; #include "capu/container/List.h"&#010;-#include "EtchError.h"&#010;+#include "common/EtchError.h"&#010; &#010; class EtchObjectType;&#010; &#010;@@ -39,9 +39,9 @@ public:&#010;   EtchObject();&#010; &#010;   /**&#010;-   * Constructor.&#010;+   * Copy Constructor.&#010;    */&#010;-  EtchObject(const EtchObjectType* type);&#010;+  EtchObject(const EtchObject&amp; other);&#010; &#010;   /**&#010;    * Destructor.&#010;@@ -78,11 +78,7 @@ protected:&#010;    */&#010;   virtual status_t addObjectType(const EtchObjectType* type);&#010; &#010;-  // TODO remove me if object hierachy was refactored&#010;-  virtual status_t setObjectType(const EtchObjectType* type);&#010;-&#010; private:&#010;-  const EtchObjectType* mType;&#010;   capu::List&lt;const EtchObjectType*&gt; mTypes;&#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h Wed Oct 17 06:48:53 2012&#010;@@ -64,6 +64,7 @@ enum EtchObjectTypeIds {&#010;   EOTID_AUTH_EXCEPTION,&#010;   EOTID_RUNTIME_EXCEPTION,&#010;   EOTID_ARRAY_VALUE,&#010;+  EOTID_POOL,&#010;   EOTID_FREEPOOL,&#010;   EOTID_QUEUEDPOOL,&#010;   EOTID_WAIT_UP,&#010;@@ -223,7 +224,7 @@ struct EtchObjectType::__Wrapper__&lt;capu:&#010;   static const EtchObjectType* getType() {&#010;     return &amp;EtchObjectType::NATIVE_INT16();&#010;   }&#010;-  &#010;+&#010;   static const EtchObjectTypeTrait getTypeTrait() {&#010;     return EtchObjectType::VALUE;&#010;   }&#010;@@ -286,7 +287,7 @@ struct EtchObjectType::__Wrapper__&lt;capu:&#010;   static const EtchObjectType* getType() {&#010;     return &amp;EtchObjectType::NATIVE_BOOL();&#010;   }&#010;-  &#010;+&#010;   static const EtchObjectTypeTrait getTypeTrait() {&#010;     return EtchObjectType::VALUE;&#010;   }&#010;@@ -312,7 +313,7 @@ struct EtchObjectType::__Wrapper__&lt;capu:&#010;   static const EtchObjectType* getType() {&#010;     return &amp;EtchObjectType::NATIVE_INT16();&#010;   }&#010;-  &#010;+&#010;   static const EtchObjectTypeTrait getTypeTrait() {&#010;     return EtchObjectType::POINTER;&#010;   }&#010;@@ -402,7 +403,7 @@ struct EtchObjectType::__Wrapper__&lt;capu:&#010;   static const EtchObjectType * getType() {&#010;     return &amp;EtchObjectType::NATIVE_INT16();&#010;   }&#010;-  &#010;+&#010;   static const EtchObjectTypeTrait getTypeTrait() {&#010;     return EtchObjectType::SMART_POINTER;&#010;   }&#010;@@ -465,7 +466,7 @@ struct EtchObjectType::__Wrapper__&lt;capu:&#010;   static const EtchObjectType * getType() {&#010;     return &amp;EtchObjectType::NATIVE_BOOL();&#010;   }&#010;-  &#010;+&#010;   static const EtchObjectTypeTrait getTypeTrait() {&#010;     return EtchObjectType::SMART_POINTER;&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchRuntimeException.h Wed Oct 17 06:48:53 2012&#010;@@ -30,10 +30,24 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;-  //Default Constructor&#010;+  /**&#010;+   * Constructs a EtchRuntimeException object.&#010;+   */&#010;+  EtchRuntimeException();&#010;+&#010;+  /**&#010;+   * EtchRuntimeException&#010;+   * @param msg Exception Message&#010;+   * @param errcode Error Code&#010;+   */&#010;   EtchRuntimeException(EtchString msg, status_t errcode);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchRuntimeException.&#010;+   */&#010;+  EtchRuntimeException(const EtchRuntimeException&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchRuntimeException();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h Wed Oct 17 06:48:53 2012&#010;@@ -39,6 +39,11 @@ public:&#010;   EtchServerSocket();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchServerSocket(const EtchServerSocket&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchServerSocket();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h Wed Oct 17 06:48:53 2012&#010;@@ -44,6 +44,11 @@ public:&#010;   EtchShort(capu::int16_t value);&#010; &#010;   /**&#010;+   * Constructs a copy of EtchShort.&#010;+   */&#010;+  EtchShort(const EtchShort&amp; value);&#010;+&#010;+  /**&#010;    * Sets short value.&#010;    */&#010;   void set(capu::int16_t value);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,12 @@ public:&#010;   EtchSocket();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchSocket(const EtchSocket&amp; other);&#010;+&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   ~EtchSocket();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h Wed Oct 17 06:48:53 2012&#010;@@ -50,6 +50,17 @@ public:&#010;   EtchField(capu::uint32_t id, EtchString &amp; name);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   * @param other&#010;+   */&#010;+  EtchField(const EtchField&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;+  virtual ~EtchField();&#010;+&#010;+  /**&#010;    * returns the hash code&#010;    * @return hash value&#010;    */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h Wed Oct 17 06:48:53 2012&#010;@@ -37,7 +37,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchHashTableSerializer(EtchType* type, EtchField* field);&#010;+  EtchHashTableSerializer(EtchType* type, EtchField&amp; field);&#010; &#010;   /**&#010;    * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h Wed Oct 17 06:48:53 2012&#010;@@ -65,6 +65,11 @@ public:&#010;   EtchStructValue(EtchType* type, EtchValueFactory* vf, capu::uint32_t length);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchStructValue(const EtchStructValue&amp; other);&#010;+&#010;+  /**&#010;    * Default Destructor&#010;    */&#010;   virtual ~EtchStructValue();&#010;@@ -142,7 +147,7 @@ public:&#010;   /**&#010;    * @return an iterator which is pointing the beginning of collection&#010;    */&#010;-  Iterator begin();&#010;+  Iterator begin() const;&#010; &#010;   /**&#010;    * @return true if the struct value is empty, otherwise false&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h Wed Oct 17 06:48:53 2012&#010;@@ -57,6 +57,11 @@ public:&#010;   EtchType(capu::uint32_t id, EtchString name);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchType(const EtchType&amp; other);&#010;+&#010;+  /**&#010;    * Default Destructor&#010;    */&#010;   virtual ~EtchType();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeValidator.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeValidator.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeValidator.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeValidator.h Wed Oct 17 06:48:53 2012&#010;@@ -36,6 +36,11 @@ public:&#010;   EtchTypeValidator(const EtchObjectType * type, const EtchObjectType* scalarClass, const EtchObjectType* arrayClass, capu::uint32_t nDims, capu::bool_t subclass = false);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchTypeValidator(const EtchTypeValidator&amp; other);&#010;+&#010;+  /**&#010;    *  Default Destructor&#010;    */&#010;   virtual ~EtchTypeValidator();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h Wed Oct 17 06:48:53 2012&#010;@@ -28,9 +28,12 @@&#010; class EtchValidator : public EtchObject {&#010; public:&#010; &#010;-  EtchValidator(const EtchObjectType *type)&#010;-  : EtchObject(type) {&#010;+  EtchValidator(const EtchObjectType *type) {&#010;+    addObjectType(type);&#010;+  }&#010; &#010;+  EtchValidator(const EtchValidator&amp; other)&#010;+   : EtchObject(other) {&#010;   }&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h Wed Oct 17 06:48:53 2012&#010;@@ -33,6 +33,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorBoolean(const EtchValidatorBoolean&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorBoolean();&#010; &#010;    /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h Wed Oct 17 06:48:53 2012&#010;@@ -38,6 +38,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorByte(const EtchValidatorByte&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorByte();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h Wed Oct 17 06:48:53 2012&#010;@@ -43,6 +43,11 @@ public:&#010;   EtchValidatorCustomKey();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorCustomKey(const EtchValidatorCustomKey&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchValidatorCustomKey();&#010;@@ -80,6 +85,8 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  EtchValidatorCustom(const EtchValidatorCustom&amp; other);&#010;+&#010;   /**&#010;    * Destructor&#010;    */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h Wed Oct 17 06:48:53 2012&#010;@@ -35,6 +35,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorDouble(const EtchValidatorDouble&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorDouble();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h Wed Oct 17 06:48:53 2012&#010;@@ -35,6 +35,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorFloat(const EtchValidatorFloat&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorFloat();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h Wed Oct 17 06:48:53 2012&#010;@@ -39,6 +39,17 @@ public:&#010;   static const EtchObjectType* TYPE();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorInt(const EtchValidatorInt&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;+  virtual ~EtchValidatorInt();&#010;+&#010;+&#010;+  /**&#010;    * @see EtchValidator&#010;    */&#010;   virtual status_t getElementValidator(capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010;@@ -58,7 +69,7 @@ public:&#010;    */&#010;   static status_t Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val);&#010; &#010;-  virtual ~EtchValidatorInt();&#010;+&#010; &#010; protected:&#010;   EtchValidatorInt(capu::uint32_t ndim);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h Wed Oct 17 06:48:53 2012&#010;@@ -37,7 +37,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorLong(const EtchValidatorLong&amp; other);&#010; &#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorLong();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h Wed Oct 17 06:48:53 2012&#010;@@ -26,6 +26,14 @@ class EtchRuntime;&#010; &#010; class EtchValidatorNone : public EtchValidator {&#010; public:&#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorNone(const EtchValidatorNone&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorNone();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h Wed Oct 17 06:48:53 2012&#010;@@ -32,6 +32,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorObject(const EtchValidatorObject&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorObject();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h Wed Oct 17 06:48:53 2012&#010;@@ -26,6 +26,14 @@ class EtchRuntime;&#010; class EtchValidatorRuntimeException : public EtchValidator {&#010; public:&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorRuntimeException(const EtchValidatorRuntimeException&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorRuntimeException();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h Wed Oct 17 06:48:53 2012&#010;@@ -38,6 +38,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorShort(const EtchValidatorShort&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorShort();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h Wed Oct 17 06:48:53 2012&#010;@@ -33,6 +33,14 @@ public:&#010;    */&#010;   static const EtchObjectType* TYPE();&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorString(const EtchValidatorString&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorString();&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h Wed Oct 17 06:48:53 2012&#010;@@ -29,6 +29,14 @@ class EtchRuntime;&#010; class EtchValidatorStructValue : public EtchTypeValidator {&#010; public:&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValidatorStructValue(const EtchValidatorStructValue&amp; other);&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;   virtual ~EtchValidatorStructValue();&#010; &#010;   /**&#010;@@ -55,7 +63,7 @@ public:&#010;    * EtchObjectType for EtchRuntimeException.&#010;    */&#010;   static const EtchObjectType* TYPE();&#010;-  &#010;+&#010;   EtchType* getType();&#010; &#010; protected:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValueFactory.h Wed Oct 17 06:48:53 2012&#010;@@ -51,6 +51,11 @@ public:&#010;   EtchValueFactory();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchValueFactory(const EtchValueFactory&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchValueFactory() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPool.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPool.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPool.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPool.h Wed Oct 17 06:48:53 2012&#010;@@ -31,12 +31,24 @@ class EtchPool&#010; public:&#010; &#010;   /**&#010;+   * EtchObjectType for EtchPool.&#010;+   */&#010;+  static const EtchObjectType* TYPE();&#010;+&#010;+  /**&#010;    * Creates a new instance of the EtchPool-Class.&#010;    */&#010;-  EtchPool(const EtchObjectType* type)&#010;-    : EtchObject(type) {}&#010;+  EtchPool() {&#010;+    addObjectType(TYPE());&#010;+  }&#010; &#010;   /**&#010;+   * Creates a copy of the EtchPool-Class.&#010;+   */&#010;+  EtchPool(const EtchObject&amp; other)&#010;+   : EtchObject(other) {&#010;+  }&#010;+  /**&#010;    * Destructure.&#010;    */&#010;   virtual ~EtchPool() {}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPoolRunnable.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPoolRunnable.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPoolRunnable.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchPoolRunnable.h Wed Oct 17 06:48:53 2012&#010;@@ -36,12 +36,18 @@ public:&#010;   virtual status_t run() = 0;&#010; &#010;   /**&#010;+   * Destructor&#010;+   */&#010;+  virtual ~EtchPoolRunnable() {}&#010;+&#010;+  /**&#010;    * Sets an exception&#010;    * @param exception that occured&#010;    * @return ETCH_OK if no error&#010;    */&#010;   status_t setException(capu::SmartPointer&lt;EtchException&gt; exception) {&#010;     mException = exception;&#010;+    return ETCH_OK;&#010;   }&#010; &#010;   capu::bool_t hasException() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h Wed Oct 17 06:48:53 2012&#010;@@ -30,7 +30,7 @@&#010; /* *&#010;  * This class serves as a container for all layers created during the setup of a new stack (connection, packetizer, messagizer, ...).&#010;  */&#010;-class EtchStack : public EtchObject{&#010;+class EtchStack : public EtchObject {&#010; public:&#010; &#010;   /**&#010;@@ -49,6 +49,12 @@ public:&#010;   EtchStack();&#010; &#010;   /**&#010;+   * Default Constructor&#010;+   */&#010;+  EtchStack(const EtchStack&amp; other);&#010;+&#010;+&#010;+  /**&#010;    * Destructor which cleans the whole stack&#010;    */&#010;   virtual ~EtchStack();&#010;@@ -87,7 +93,7 @@ public:&#010;    * sets the delivery service&#010;    */&#010;   void setDeliveryService(EtchDeliveryService* deliveryservice);&#010;-  &#010;+&#010;   /**&#010;    * sets the stub implemenation&#010;    */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h Wed Oct 17 06:48:53 2012&#010;@@ -38,6 +38,11 @@ public:&#010;   EtchStackClient();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchStackClient(const EtchStackClient&amp; other);&#010;+&#010;+  /**&#010;    * Destructor which cleans the whole stack&#010;    */&#010;   virtual ~EtchStackClient();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h Wed Oct 17 06:48:53 2012&#010;@@ -37,6 +37,11 @@ public:&#010;   EtchStackServer();&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchStackServer(const EtchStackServer&amp; other);&#010;+&#010;+  /**&#010;    * Destructor which cleans the whole stack&#010;    */&#010;   virtual ~EtchStackServer();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubHelper.h Wed Oct 17 06:48:53 2012&#010;@@ -44,11 +44,15 @@ public:&#010;    * Constructs a StubHelper which uses synchronous mode to dispatch&#010;    * method from message.&#010;    */&#010;-  EtchStubHelper()&#010;-  : EtchObject(EtchStubHelper::TYPE()) {&#010;+  EtchStubHelper() {&#010;+    addObjectType(TYPE());&#010;     // nothing to do.&#010;   }&#010; &#010;+  EtchStubHelper(const EtchStubHelper&amp; other)&#010;+  : EtchObject(other) {&#010;+  }&#010;+&#010;   /**&#010;    * Dispatches the method from message.&#010;    * @param svc&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h Wed Oct 17 06:48:53 2012&#010;@@ -39,6 +39,11 @@ public:&#010;   EtchMessage(EtchType *type, EtchValueFactory* vf, capu::uint32_t length);&#010; &#010;   /**&#010;+   * Copy Constructor&#010;+   */&#010;+  EtchMessage(const EtchMessage&amp; other);&#010;+&#010;+  /**&#010;    * Destructor&#010;    */&#010;   virtual ~EtchMessage();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h Wed Oct 17 06:48:53 2012&#010;@@ -161,7 +161,15 @@ public:&#010;    * @param maxDelay max delay in milliseconds.&#010;    */&#010;   WaitUp(capu::int32_t maxDelay)&#010;-    : EtchObject(WaitUp::TYPE()), mMaxDelay(maxDelay) {&#010;+    : mMaxDelay(maxDelay) {&#010;+    addObjectType(TYPE());&#010;+  }&#010;+&#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  WaitUp(const WaitUp&amp; other)&#010;+   : EtchObject(other), mMaxDelay(other.mMaxDelay) {&#010;   }&#010; &#010;   /**&#010;@@ -184,12 +192,19 @@ public:&#010;     return &amp;TYPE;&#010;   }&#010; &#010;+  /**&#010;+   * Copy Constructor&#010;+   */&#010;+  WaitDown(const WaitDown&amp; other)&#010;+   : EtchObject(other), mMaxDelay(other.mMaxDelay) {&#010;+  }&#010; &#010;   /**&#010;    * @param maxDelay max delay in milliseconds.&#010;    */&#010;   WaitDown(capu::int32_t maxDelay)&#010;-    : EtchObject(WaitDown::TYPE()), mMaxDelay(maxDelay) {&#010;+    : mMaxDelay(maxDelay) {&#010;+    addObjectType(TYPE());&#010;   }&#010; &#010;   /**&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp Wed Oct 17 06:48:53 2012&#010;@@ -39,13 +39,20 @@ const EtchObjectType* EtchArrayValue::TY&#010; }&#010; &#010; EtchArrayValue::EtchArrayValue(capu::SmartPointer&lt;EtchNativeArrayBase&gt; array, capu::int32_t size, capu::int8_t typeCode, EtchType* customStructType, capu::int32_t dim)&#010;-: EtchObject(EtchArrayValue::TYPE()), mArray(array), mTypeCode(typeCode),&#010;+: mArray(array), mTypeCode(typeCode),&#010; mCustomStructType(customStructType), mDim(dim), mAddIndex(size), mSize(size) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchArrayValue::EtchArrayValue(capu::SmartPointer&lt;EtchNativeArrayBase&gt; array, capu::int32_t size)&#010;-: EtchObject(EtchArrayValue::TYPE()), mArray(array), mTypeCode(0),&#010;+: mArray(array), mTypeCode(0),&#010; mCustomStructType(NULL), mDim(1), mAddIndex(size), mSize(size) {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+EtchArrayValue::EtchArrayValue(const EtchArrayValue&amp; other)&#010;+ : EtchObject(other), mArray(other.mArray), mTypeCode(other.mTypeCode), mCustomStructType(other.mCustomStructType),&#010;+   mDim(other.mDim), mAddIndex(other.mAddIndex), mSize(other.mSize) {&#010; }&#010; &#010; EtchArrayValue::~EtchArrayValue() {&#010;@@ -80,6 +87,25 @@ EtchType * EtchArrayValue::getCustomStru&#010;   return mCustomStructType;&#010; }&#010; &#010;+capu::bool_t EtchArrayValue::equals(const EtchObject* other) const {&#010;+  if(other == NULL)&#010;+    return false;&#010;+  if(!other-&gt;isInstanceOf(TYPE()))&#010;+    return false;&#010;+  EtchArrayValue* value = (EtchArrayValue*) other;&#010;+&#010;+  capu::bool_t customTypeTest = false;&#010;+  if(mCustomStructType == NULL)&#010;+    customTypeTest = mCustomStructType == value-&gt;mCustomStructType;&#010;+  else&#010;+    customTypeTest = this-&gt;mCustomStructType-&gt;equals(value-&gt;mCustomStructType);&#010;+&#010;+  if(customTypeTest &amp;&amp; this-&gt;mArray-&gt;isInstanceOf(value-&gt;mArray-&gt;TYPE())&#010;+      &amp;&amp; this-&gt;mSize == value-&gt;mSize &amp;&amp; this-&gt;mDim == value-&gt;mDim &amp;&amp; this-&gt;mAddIndex == value-&gt;mAddIndex)&#010;+    return true;&#010;+  return false;&#010;+}&#010;+&#010; status_t EtchArrayValue::get(capu::uint32_t index, capu::SmartPointer&lt;EtchObject&gt; &amp;result) {&#010;   if ((index &gt;= getSize()) || (mArray.get() == NULL)) {&#010;     return ETCH_EINVAL;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchAuthenticationException.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchAuthenticationException.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchAuthenticationException.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchAuthenticationException.cpp Wed Oct 17 06:48:53 2012&#010;@@ -23,8 +23,12 @@ const EtchObjectType* EtchAuthentication&#010; }&#010; &#010; EtchAuthenticationException::EtchAuthenticationException(EtchString&amp; msg)&#010;-: EtchException(msg, ETCH_ERROR, EXCPTYPE_BUILTIN, EtchAuthenticationException::TYPE()) {&#010;+: EtchException(msg, ETCH_ERROR, EXCPTYPE_BUILTIN) {&#010;+  addObjectType(TYPE());&#010;+}&#010; &#010;+EtchAuthenticationException::EtchAuthenticationException(const EtchAuthenticationException&amp; other)&#010;+: EtchException(other) {&#010; }&#010; &#010; EtchAuthenticationException::~EtchAuthenticationException() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchBool.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchBool.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchBool.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchBool.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,16 +24,20 @@ const EtchObjectType* EtchBool::TYPE() {&#010; }&#010; &#010; EtchBool::EtchBool()&#010;-: EtchObject(EtchBool::TYPE())&#010;-, mValue(false){&#010;-&#010;+: mValue(false){&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchBool::EtchBool(capu::bool_t value)&#010;-: EtchObject(EtchBool::TYPE())&#010;-, mValue(value){&#010;+ : mValue(value){&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+EtchBool::EtchBool(const EtchBool&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010; }&#010; &#010;+&#010; void EtchBool::set(capu::bool_t value){&#010;   mValue = value;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchByte.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,13 +24,17 @@ const EtchObjectType* EtchByte::TYPE() {&#010; }&#010; &#010; EtchByte::EtchByte()&#010;-: EtchObject(EtchByte::TYPE())&#010;-, mValue(0){&#010;+: mValue(0) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchByte::EtchByte(capu::int8_t value)&#010;-: EtchObject(EtchByte::TYPE())&#010;-, mValue(value){&#010;+: mValue(value) {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+EtchByte::EtchByte(const EtchByte &amp;other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010; }&#010; &#010; void EtchByte::set(capu::int8_t value){&#010;@@ -52,6 +56,6 @@ capu::bool_t EtchByte::equals(const Etch&#010; &#010; capu::uint32_t EtchByte::getHashCode() const{&#010;   //For better distribution&#010;-  capu::uint32_t result = mValue + 128; &#010;+  capu::uint32_t result = mValue + 128;&#010;   return result;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDate.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDate.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDate.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDate.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,11 +24,18 @@ const EtchObjectType* EtchDate::TYPE() {&#010; }&#010; &#010; EtchDate::EtchDate()&#010;-: EtchObject(EtchDate::TYPE()), mValue(0) {&#010;+: mValue(0) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchDate::EtchDate(capu::time_t value)&#010;-: EtchObject(EtchDate::TYPE()), mValue(value) {&#010;+ : mValue(value) {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+&#010;+EtchDate::EtchDate(const EtchDate&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010; }&#010; &#010; EtchDate::~EtchDate() {&#010;@@ -54,5 +61,5 @@ void EtchDate::set(capu::time_t value) {&#010; }&#010; &#010; capu::uint32_t EtchDate::getHashCode() const{&#010;-  return static_cast&lt;capu::uint32_t&gt;(mValue ^ mValue &gt;&gt; 32);;&#010;-}&#010;\ No newline at end of file&#010;+  return static_cast&lt;capu::uint32_t&gt;(mValue ^ mValue &gt;&gt; 32);&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDouble.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDouble.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDouble.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchDouble.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,13 +24,17 @@ const EtchObjectType* EtchDouble::TYPE()&#010; }&#010; &#010; EtchDouble::EtchDouble()&#010;-: EtchObject(EtchDouble::TYPE())&#010;-, mValue(0.0L){&#010;+: mValue(0.0L) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchDouble::EtchDouble(capu::double_t value)&#010;-: EtchObject(EtchDouble::TYPE())&#010;-, mValue(value){&#010;+: mValue(value) {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+EtchDouble::EtchDouble(const EtchDouble&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010; }&#010; &#010; void EtchDouble::set(capu::double_t value){&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,21 +24,16 @@ const EtchObjectType* EtchException::TYP&#010; &#010; EtchException::EtchException()&#010; : EtchObject(), mErrorMessage(""), mErrorcode(0), mExcptype(0) {&#010;-  EtchObject::addObjectType(EtchException::TYPE());&#010;-  // TODO change object hierachy&#010;-  EtchObject::setObjectType(EtchException::TYPE());&#010;+  addObjectType(EtchException::TYPE());&#010; }&#010; &#010; EtchException::EtchException(EtchString msg, status_t errcode, EtchExceptionType type)&#010; : EtchObject(), mErrorMessage(msg), mErrorcode(errcode), mExcptype(type) {&#010;-  EtchObject::addObjectType(EtchException::TYPE());&#010;-  // TODO change object hierachy&#010;-  EtchObject::setObjectType(EtchException::TYPE());&#010;+  addObjectType(EtchException::TYPE());&#010; }&#010; &#010;-EtchException::EtchException(EtchString msg, status_t errcode, EtchExceptionType type, const EtchObjectType* type_id)&#010;-: EtchObject(type_id), mErrorMessage(msg), mErrorcode(errcode), mExcptype(type) {&#010;-&#010;+EtchException::EtchException(const EtchException&amp; other)&#010;+ : EtchObject(other), mErrorMessage(other.mErrorMessage), mErrorcode(other.mErrorcode), mExcptype(other.mExcptype) {&#010; }&#010; &#010; EtchException::~EtchException() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchFloat.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchFloat.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchFloat.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchFloat.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,13 +24,17 @@ const EtchObjectType* EtchFloat::TYPE() &#010; }&#010; &#010; EtchFloat::EtchFloat()&#010;-: EtchObject(EtchFloat::TYPE())&#010;-, mValue(0.0f){&#010;+ : mValue(0.0f) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchFloat::EtchFloat(capu::float_t value)&#010;-: EtchObject(EtchFloat::TYPE())&#010;-, mValue(value){&#010;+ : mValue(value) {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010;+EtchFloat::EtchFloat(const EtchFloat&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010; }&#010; &#010; void EtchFloat::set(capu::float_t value){&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp Wed Oct 17 06:48:53 2012&#010;@@ -17,6 +17,8 @@&#010;  */&#010; &#010; #include "common/EtchInt32.h"&#010;+#include "common/EtchObjectType.h"&#010;+#include "common/EtchError.h"&#010; &#010; const EtchObjectType* EtchInt32::TYPE() {&#010;    const static EtchObjectType TYPE(EOTID_INT32, NULL);&#010;@@ -24,15 +26,23 @@ const EtchObjectType* EtchInt32::TYPE() &#010; }&#010; &#010; EtchInt32::EtchInt32()&#010;-: EtchObject(EtchInt32::TYPE())&#010;-, mValue(0){&#010;+ : mValue(0) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchInt32::EtchInt32(capu::int32_t value)&#010;-: EtchObject(EtchInt32::TYPE())&#010;-, mValue(value){&#010;+ : mValue(value) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010;+EtchInt32::EtchInt32(const EtchInt32&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010;+}&#010;+&#010;+EtchInt32::~EtchInt32() {&#010;+}&#010;+&#010;+&#010; void EtchInt32::set(capu::int32_t value){&#010;   mValue = value;&#010; }&#010;@@ -63,6 +73,15 @@ capu::int32_t&amp; EtchInt32::operator=(capu&#010;   return mValue;&#010; }&#010; &#010;+EtchInt32&amp; EtchInt32::operator=(EtchInt32 const&amp; other)&#010;+{&#010;+  if(mValue != other.mValue)&#010;+  {&#010;+    mValue = other.mValue;&#010;+  }&#010;+  return *this;&#010;+}&#010;+&#010; capu::int32_t&amp; EtchInt32::operator++() //pre increment&#010; {&#010;   ++mValue;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchLong.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,29 +24,33 @@ const EtchObjectType* EtchLong::TYPE() {&#010; }&#010; &#010; EtchLong::EtchLong()&#010;-: EtchObject(EtchLong::TYPE())&#010;-, mValue(0){&#010;+ : mValue(0) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchLong::EtchLong(capu::int64_t value)&#010;-: EtchObject(EtchLong::TYPE())&#010;-, mValue(value){&#010;+ : mValue(value) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010;-void EtchLong::set(capu::int64_t value){&#010;+EtchLong::EtchLong(const EtchLong&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010;+}&#010;+&#010;+void EtchLong::set(capu::int64_t value) {&#010;   mValue = value;&#010; }&#010; &#010;-capu::int64_t EtchLong::get(){&#010;+capu::int64_t EtchLong::get() {&#010;   return mValue;&#010; }&#010; &#010;-capu::uint32_t EtchLong::getHashCode() const{&#010;+capu::uint32_t EtchLong::getHashCode() const {&#010;   //first 32 bit xor second 32 bit of long&#010;   return static_cast&lt;capu::uint32_t&gt;(mValue ^ mValue &gt;&gt; 32);&#010; }&#010; &#010;-capu::bool_t EtchLong::equals(const EtchObject * other) const{&#010;+capu::bool_t EtchLong::equals(const EtchObject * other) const {&#010;   if (other == NULL)&#010;     return false;&#010;   else if (!other-&gt;getObjectType()-&gt;equals(EtchLong::TYPE()))&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,20 +24,21 @@ const EtchObjectType* EtchObject::TYPE()&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchObject::EtchObject()&#010;-  : mType(TYPE()) {&#010;+EtchObject::EtchObject() {&#010;   addObjectType(TYPE());&#010; }&#010; &#010;-EtchObject::EtchObject(const EtchObjectType* type){&#010;-  mType = type;&#010;+EtchObject::EtchObject(const EtchObject&amp; other)&#010;+ : mTypes(other.mTypes) {&#010; }&#010; &#010;-EtchObject::~EtchObject() {&#010;+const EtchObjectType* EtchObject::getObjectType() const {&#010;+  const EtchObjectType* ret;&#010;+  this-&gt;mTypes.get(mTypes.size()-1, &amp;ret);&#010;+  return ret;&#010; }&#010; &#010;-const EtchObjectType* EtchObject::getObjectType() const{&#010;-  return mType;&#010;+EtchObject::~EtchObject() {&#010; }&#010; &#010; capu::bool_t EtchObject::isInstanceOf(const EtchObjectType* type) const {&#010;@@ -64,9 +65,3 @@ status_t EtchObject::addObjectType(const&#010;   mTypes.add(type);&#010;   return ETCH_OK;&#010; }&#010;-&#010;-status_t EtchObject::setObjectType(const EtchObjectType* type) {&#010;-  mType = type;&#010;-  return ETCH_OK;&#010;-}&#010;-&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchRuntimeException.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchRuntimeException.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchRuntimeException.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchRuntimeException.cpp Wed Oct 17 06:48:53 2012&#010;@@ -25,8 +25,12 @@ const EtchObjectType* EtchRuntimeExcepti&#010; &#010; &#010; EtchRuntimeException::EtchRuntimeException(EtchString msg, status_t errcode)&#010;-: EtchException(msg, errcode, EtchException::EXCPTYPE_BUILTIN, EtchRuntimeException::TYPE()) {&#010;+: EtchException(msg, errcode, EtchException::EXCPTYPE_BUILTIN) {&#010;+  addObjectType(TYPE());&#010;+}&#010; &#010;+EtchRuntimeException::EtchRuntimeException(const EtchRuntimeException&amp; other)&#010;+: EtchException(other) {&#010; }&#010; &#010; EtchRuntimeException::~EtchRuntimeException() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,9 +24,13 @@ const EtchObjectType* EtchServerSocket::&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchServerSocket::EtchServerSocket()&#010;-: EtchObject(EtchServerSocket::TYPE()) {&#010;+EtchServerSocket::EtchServerSocket() {&#010;+  addObjectType(TYPE());&#010;+}&#010;+&#010; &#010;+EtchServerSocket::EtchServerSocket(const EtchServerSocket&amp; other)&#010;+ : EtchObject(other) {&#010; }&#010; &#010; EtchServerSocket::~EtchServerSocket() {&#010;@@ -52,4 +56,4 @@ EtchSocket* EtchServerSocket::accept() {&#010; status_t EtchServerSocket::bind(capu::uint16_t port, const char* addr)&#010; {&#010;   return mServerSocket.bind(port,addr);&#010;-}&#010;\ No newline at end of file&#010;+}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchShort.cpp Wed Oct 17 06:48:53 2012&#010;@@ -24,30 +24,34 @@ const EtchObjectType* EtchShort::TYPE() &#010; }&#010; &#010; EtchShort::EtchShort()&#010;-: EtchObject(EtchShort::TYPE())&#010;-, mValue(0){&#010;+ : mValue(0) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchShort::EtchShort(capu::int16_t value)&#010;-: EtchObject(EtchShort::TYPE())&#010;-, mValue(value){&#010;+ : mValue(value) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010;-void EtchShort::set(capu::int16_t value){&#010;+EtchShort::EtchShort(const EtchShort&amp; other)&#010;+ : EtchObject(other), mValue(other.mValue) {&#010;+}&#010;+&#010;+void EtchShort::set(capu::int16_t value) {&#010;   mValue = value;&#010; }&#010; &#010;-capu::int16_t EtchShort::get(){&#010;+capu::int16_t EtchShort::get() {&#010;   return mValue;&#010; }&#010; &#010;-capu::uint32_t EtchShort::getHashCode() const{&#010;+capu::uint32_t EtchShort::getHashCode() const {&#010;   //for better distribution&#010;   capu::uint32_t result = mValue + 32768;&#010;   return result;&#010; }&#010; &#010;-capu::bool_t EtchShort::equals(const EtchObject * other) const{&#010;+capu::bool_t EtchShort::equals(const EtchObject * other) const {&#010;   if (other == NULL)&#010;     return false;&#010;   else if (!other-&gt;getObjectType()-&gt;equals(EtchShort::TYPE()))&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp Wed Oct 17 06:48:53 2012&#010;@@ -23,19 +23,23 @@ const EtchObjectType* EtchSocket::TYPE()&#010;   return &amp;TYPE;&#010; }&#010; &#010;-EtchSocket::EtchSocket()&#010;-: EtchObject(EtchSocket::TYPE()) {&#010;+EtchSocket::EtchSocket() {&#010;+  addObjectType(TYPE());&#010;   mSocket = new capu::Socket();&#010; }&#010; &#010;-EtchSocket::EtchSocket(capu::Socket* soc)&#010;-: EtchObject(EtchSocket::TYPE()) {&#010;+EtchSocket::EtchSocket(capu::Socket* soc) {&#010;+  addObjectType(TYPE());&#010;   if (soc == NULL)&#010;     mSocket = new capu::Socket();&#010;   else&#010;     mSocket = soc;&#010; }&#010; &#010;+EtchSocket::EtchSocket(const EtchSocket&amp; other)&#010;+ : EtchObject(other), mSocket(other.mSocket) {&#010;+}&#010;+&#010; EtchSocket::~EtchSocket() {&#010;   delete mSocket;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp Wed Oct 17 06:48:53 2012&#010;@@ -31,13 +31,13 @@ const EtchObjectType* EtchString::TYPE()&#010; // TODO: String should support UTF-8 by default&#010; &#010; EtchString::EtchString()&#010;-: EtchObject(EtchString::TYPE())&#010;-, mData(NULL), mDataSize(0), mEncoding(ENCODING_ASCII) {&#010;+ : mData(NULL), mDataSize(0), mEncoding(ENCODING_ASCII) {&#010;+  addObjectType(TYPE());&#010; }&#010; &#010; EtchString::EtchString(const char* string)&#010;-: EtchObject(EtchString::TYPE())&#010;-, mData(NULL), mDataSize(0), mEncoding(ENCODING_ASCII) {&#010;+ : mData(NULL), mDataSize(0), mEncoding(ENCODING_ASCII) {&#010;+  addObjectType(TYPE());&#010;   if (string != NULL) {&#010;     capu::uint32_t len = capu::StringUtils::Strlen(string);&#010;     mData = new char[len + 1];&#010;@@ -47,9 +47,8 @@ EtchString::EtchString(const char* strin&#010; }&#010; &#010; EtchString::EtchString(const capu::int8_t* buffer, const capu::int32_t bufferSize, EtchString encoding)&#010;-: EtchObject(EtchString::TYPE())&#010;-, mData(NULL), mDataSize(0), mEncoding(ENCODING_ASCII) {&#010;-&#010;+: mData(NULL), mDataSize(0), mEncoding(ENCODING_ASCII) {&#010;+  addObjectType(TYPE());&#010;   EtchString enc("utf-8");&#010;   if (encoding.equals(&amp;enc)) {&#010;     mEncoding = ENCODING_UTF8;&#010;@@ -73,7 +72,7 @@ EtchString::EtchString(const capu::int8_&#010; }&#010; &#010; EtchString::EtchString(const EtchString &amp;copy)&#010;-: EtchObject(EtchString::TYPE()), mDataSize(copy.mDataSize), mEncoding(copy.mEncoding) {&#010;+: EtchObject(copy), mDataSize(copy.mDataSize), mEncoding(copy.mEncoding) {&#010;   if (copy.mData == NULL)&#010;     return;&#010;   if (mEncoding != ENCODING_UTF8) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchField.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchField.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchField.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchField.cpp Wed Oct 17 06:48:53 2012&#010;@@ -26,16 +26,26 @@ const EtchObjectType* EtchField::TYPE() &#010; }&#010; &#010; EtchField::EtchField(capu::uint32_t id, EtchString&amp; name)&#010;-: EtchObject(EtchField::TYPE()), mId(id), mName(name) {&#010;+ : mId(id), mName(name) {&#010;+  addObjectType(EtchField::TYPE());&#010; }&#010; &#010; EtchField::EtchField(const EtchString&amp; name)&#010;-: EtchObject(EtchField::TYPE()), mId(0), mName(name) {&#010;+ : mId(0), mName(name) {&#010;+  addObjectType(EtchField::TYPE());&#010;   mId = EtchHashEx::Digest(name);&#010; }&#010; &#010; EtchField::EtchField()&#010;-: EtchObject(EtchField::TYPE()), mId(0), mName("") {&#010;+ : mId(0), mName("") {&#010;+  addObjectType(EtchField::TYPE());&#010;+}&#010;+&#010;+EtchField::~EtchField() {&#010;+}&#010;+&#010;+EtchField::EtchField(const EtchField&amp; other)&#010;+ : EtchObject(other), mId(other.mId), mName(other.mName) {&#010; }&#010; &#010; capu::uint32_t EtchField::getHashCode() const{&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1399111&amp;r1=1399110&amp;r2=1399111&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp Wed Oct 17 06:48:53 2012&#010;@@ -27,8 +27,8 @@ const EtchString&amp; EtchHashTableSerialize&#010;   return name;&#010; }&#010; &#010;-EtchHashTableSerializer::EtchHashTableSerializer(EtchType* type, EtchField* field)&#010;-: mField(*field), mType(type) {&#010;+EtchHashTableSerializer::EtchHashTableSerializer(EtchType* type, EtchField&amp; field)&#010;+: mField(field), mType(type) {&#010;   //TODO refactoring&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010;@@ -109,17 +109,17 @@ status_t EtchHashTableSerializer::Init(E&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;-  &#010;+&#010;   result = class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;   if (result != ETCH_OK) {&#010;     return result;&#010;   }&#010;-  &#010;+&#010;   type-&gt;setComponentType(EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE());&#010;-  &#010;+&#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchHashTableSerializer(type, &amp;field));&#010;-  &#010;+  type-&gt;setImportExportHelper(new EtchHashTableSerializer(type, field));&#010;+&#010;   //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;   result = EtchValidatorObject::Get(1, tmp);&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1399110 - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ lib/capu/modules/capu/include/capu/container/ lib/capu/modules/capu/test/container/ src/test/common/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201210.mbox/%3c20121017064822.E30A423889B8@eris.apache.org%3e"/>
<id>urn:uuid:%3c20121017064822-E30A423889B8@eris-apache-org%3e</id>
<updated>2012-10-17T06:48:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Wed Oct 17 06:48:21 2012&#010;New Revision: 1399110&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1399110&amp;view=rev&#010;Log:&#010;ETCH-250 List refactoring&#010;&#010;Change-Id: If3d671e67bfeaa70ee310f0f7a7ee5000122ff74&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashSet.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashTable.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/List.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ListTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchComparator.h Wed Oct 17 06:48:21 2012&#010;@@ -26,12 +26,12 @@ template &lt;class T&gt;&#010; class EtchComparator {&#010; public:&#010; &#010;-  inline capu::bool_t operator() (const EtchObject &amp;first, const EtchObject &amp;second) {&#010;+  inline capu::bool_t operator() (const EtchObject &amp;first, const EtchObject &amp;second) const {&#010;     return first.equals(&amp;second);&#010;   }&#010; &#010;-  inline capu::bool_t operator() (const EtchObjectType &amp;first, const EtchObjectType &amp;second) {&#010;-&#009;return first.equals(&amp;second);&#010;+  inline capu::bool_t operator() (const EtchObjectType &amp;first, const EtchObjectType &amp;second) const {&#010;+    return first.equals(&amp;second);&#010;   }&#010; };&#010; &#010;@@ -39,11 +39,11 @@ template &lt;class T&gt;&#010; class EtchComparator &lt;T*&gt; {&#010; public:&#010; &#010;-  inline capu::bool_t operator() (const EtchObject* first, const EtchObject* second) {&#010;+  inline capu::bool_t operator() (const EtchObject* first, const EtchObject* second) const {&#010;     return first-&gt;equals(second);&#010;   }&#010; &#010;-  inline capu::bool_t operator() (const EtchObjectType* first, const EtchObjectType* second) {&#010;+  inline capu::bool_t operator() (const EtchObjectType* first, const EtchObjectType* second) const {&#010;     return first-&gt;equals(second);&#010;   }&#010; };&#010;@@ -52,11 +52,11 @@ template &lt;class T&gt;&#010; class EtchComparator &lt;capu::SmartPointer&lt;T&gt; &gt; {&#010; public:&#010; &#010;-  inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObject&gt;&amp; first, const capu::SmartPointer&lt;EtchObject&gt;&amp; second) {&#010;+  inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObject&gt;&amp; first, const capu::SmartPointer&lt;EtchObject&gt;&amp; second) const {&#010;     return first-&gt;equals(second.get());&#010;   }&#010; &#010;-  inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObjectType&gt;&amp; first, const capu::SmartPointer&lt;EtchObjectType&gt;&amp; second) {&#010;+  inline capu::bool_t operator() (const capu::SmartPointer&lt;EtchObjectType&gt;&amp; first, const capu::SmartPointer&lt;EtchObjectType&gt;&amp; second) const {&#010;     return first-&gt;equals(second.get());&#010;   }&#010; };&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchList.h Wed Oct 17 06:48:21 2012&#010;@@ -100,13 +100,13 @@ public:&#010;    * @return true if empty&#010;    *         false otherwise&#010;    */&#010;-  capu::bool_t isEmpty();&#010;+  capu::bool_t isEmpty() const;&#010; &#010;   /**&#010;    * returns an iterator pointing to the beginning of list&#010;    * @return iterator&#010;    */&#010;-  Iterator begin();&#010;+  Iterator begin() const;&#010; &#010;   /**&#010;    * finds the index of given element in the link list&#010;@@ -116,7 +116,7 @@ public:&#010;    * @return -1 if the value either does not exist or given value is NULL&#010;    *          otherwise index of value on linked list&#010;    */&#010;-  capu::int32_t find(const T &amp;element);&#010;+  capu::int32_t find(const T &amp;element) const;&#010; &#010;   /**&#010;    *&#010;@@ -175,7 +175,7 @@ status_t EtchList&lt;T, C&gt;::add(capu::int32&#010; }&#010; &#010; template&lt;class T, class C&gt;&#010;-typename EtchList&lt;T, C&gt;::Iterator EtchList&lt;T, C&gt;::begin() {&#010;+typename EtchList&lt;T, C&gt;::Iterator EtchList&lt;T, C&gt;::begin() const {&#010;   return mList.begin();&#010; }&#010; &#010;@@ -190,7 +190,7 @@ capu::bool_t EtchList&lt;T, C&gt;::contains(co&#010; }&#010; &#010; template&lt;class T, class C&gt;&#010;-capu::int32_t EtchList&lt;T, C&gt;::find(const T &amp;element) {&#010;+capu::int32_t EtchList&lt;T, C&gt;::find(const T &amp;element) const {&#010;   return mList.find(element);&#010; }&#010; &#010;@@ -200,7 +200,7 @@ status_t EtchList&lt;T, C&gt;::get(capu::int32&#010; }&#010; &#010; template&lt;class T, class C&gt;&#010;-capu::bool_t EtchList&lt;T, C&gt;::isEmpty() {&#010;+capu::bool_t EtchList&lt;T, C&gt;::isEmpty() const {&#010;   return mList.isEmpty();&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashSet.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashSet.h?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashSet.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashSet.h Wed Oct 17 06:48:21 2012&#010;@@ -237,7 +237,7 @@ namespace capu {&#010;     return CAPU_OK;&#010;   }&#010; &#010;-  &#010;+&#010;   template &lt;class T, class C, class H&gt;&#010;   bool_t HashSet&lt; T, C, H&gt;::hasElement(const T &amp;value) {&#010;     uint_t index = H::Digest(value) % mSize;&#010;@@ -266,12 +266,8 @@ namespace capu {&#010;   }&#010; &#010;   template &lt;class T, class C, class H&gt;&#010;-  HashSet&lt; T, C, H&gt;::HashSetIterator::HashSetIterator(List&lt;T, C&gt; * list, uint_t list_size) {&#010;-    mCurrentListIndex = 0;&#010;-    this-&gt;mList = list;&#010;-    mMaxListSize = list_size;&#010;-    this-&gt;mCurrentListIterator = list[mCurrentListIndex].begin();&#010;-&#010;+  HashSet&lt; T, C, H&gt;::HashSetIterator::HashSetIterator(List&lt;T, C&gt; * list, uint_t list_size)&#010;+   : mCurrentListIndex(0), mCurrentListIterator(list[0].begin()), mList(list), mMaxListSize(list_size) {&#010;     //to point the first non-empty one&#010;     for (uint_t i = 0; i &lt; list_size; ++i) {&#010;       if (!mList[i].isEmpty()) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashTable.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashTable.h?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashTable.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashTable.h Wed Oct 17 06:48:21 2012&#010;@@ -84,6 +84,12 @@ namespace capu {&#010;      */&#010;     HashTable(uint_t size);&#010; &#010;+&#010;+    /**&#010;+     * Constructs a copy of HashTable.&#010;+     */&#010;+    HashTable(const HashTable&amp; other);&#010;+&#010;     /**&#010;      * Destructure.&#010;      */&#010;@@ -111,7 +117,7 @@ namespace capu {&#010;      *         CAPU_EINVAL if value is null&#010;      *         CAPU_ENOT_EXIST if there is no pair with specified key&#010;      */&#010;-    status_t get(const Key &amp;key, T* value);&#010;+    status_t get(const Key &amp;key, T* value) const;&#010; &#010;     /**&#010;      * Remove value associated with key in the hashtable.&#010;@@ -143,7 +149,7 @@ namespace capu {&#010;      * Return iterator for iterating key value tuples.&#010;      * @return Iterator&#010;      */&#010;-    Iterator begin();&#010;+    Iterator begin() const;&#010; &#010;   private:&#010; &#010;@@ -155,7 +161,7 @@ namespace capu {&#010;      * @return -1 if the key is unique&#010;      *          otherwise the index in the linked list&#010;      */&#010;-    int_t getKeyIndexFromBucket(uint_t index, const Key &amp;k) {&#010;+    int_t getKeyIndexFromBucket(uint_t index, const Key &amp;k) const {&#010;       int_t count = 0;&#010;       typename List&lt;Pair&lt;Key, T&gt; &gt;::Iterator it = mLists[index].begin();&#010;       Pair&lt;Key, T&gt; pair;&#010;@@ -179,8 +185,7 @@ namespace capu {&#010; &#010;   template &lt;class Key, class T, class C, class Hash&gt;&#010;   HashTable&lt;Key, T, C, Hash&gt;::HashTable()&#010;-  : mSize(HASH_TABLE_DEFAULT_SIZE)&#010;-  , mCount(0) {&#010;+  : mSize(HASH_TABLE_DEFAULT_SIZE), mCount(0) {&#010;     mLists = new List&lt;Pair&lt;Key, T&gt;, Comparator &gt;[mSize];&#010;   }&#010; &#010;@@ -196,6 +201,19 @@ namespace capu {&#010;   }&#010; &#010;   template &lt;class Key, class T, class C, class Hash&gt;&#010;+  HashTable&lt;Key, T, C, Hash&gt;::HashTable(const HashTable&amp; other)&#010;+   : mSize(other.mSize), mCount(0) {&#010;+    mLists = new List&lt;Pair&lt;Key, T&gt;, Comparator &gt;[mSize];&#010;+    typename HashTable&lt;Key, T, C, Hash&gt;::Iterator iterator = other.begin();&#010;+    Pair&lt;Key, T&gt; pair;&#010;+    while(iterator.hasNext())&#010;+    {&#010;+      iterator.next(&amp;pair);&#010;+      put(pair.first, pair.second, NULL);&#010;+    }&#010;+  }&#010;+&#010;+  template &lt;class Key, class T, class C, class Hash&gt;&#010;   HashTable&lt;Key, T, C, Hash&gt;::~HashTable() {&#010;     delete [] mLists;&#010;   }&#010;@@ -245,7 +263,7 @@ namespace capu {&#010;   }&#010; &#010;   template &lt;class Key, class T, class C, class Hash&gt;&#010;-  status_t HashTable&lt;Key, T, C, Hash&gt;::get(const Key &amp;key, T* value) {&#010;+  status_t HashTable&lt;Key, T, C, Hash&gt;::get(const Key &amp;key, T* value) const {&#010;     if (value == NULL)&#010;       return CAPU_EINVAL;&#010; &#010;@@ -312,17 +330,13 @@ namespace capu {&#010;   }&#010; &#010;   template &lt;class Key, class T, class C, class Hash&gt;&#010;-  typename HashTable&lt;Key, T, C, Hash&gt;::Iterator HashTable&lt;Key, T, C, Hash&gt;::begin() {&#010;+  typename HashTable&lt;Key, T, C, Hash&gt;::Iterator HashTable&lt;Key, T, C, Hash&gt;::begin() const {&#010;     return typename HashTable&lt;Key, T, C, Hash&gt;::Iterator(mLists, mSize);&#010;   }&#010; &#010;   template &lt;class Key, class T, class C, class Hash&gt;&#010;-  HashTable&lt;Key, T, C, Hash&gt;::HashTableIterator::HashTableIterator(List&lt;Pair&lt;Key, T&gt; &gt; * list, uint_t list_size) {&#010;-    mCurrentListIndex = 0;&#010;-    this-&gt;mList = list;&#010;-    mMaxListSize = list_size;&#010;-    this-&gt;mCurrentListIterator = list[mCurrentListIndex].begin();&#010;-&#010;+  HashTable&lt;Key, T, C, Hash&gt;::HashTableIterator::HashTableIterator(List&lt;Pair&lt;Key, T&gt; &gt; * list, uint_t list_size)&#010;+   : mCurrentListIndex(0), mCurrentListIterator(list[0].begin()), mList(list), mMaxListSize(list_size) {&#010;     //to point the first non-empty one&#010;     for (uint_t i = 0; i &lt; list_size; ++i) {&#010;       if (!mList[i].isEmpty()) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/List.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/List.h?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/List.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/List.h Wed Oct 17 06:48:21 2012&#010;@@ -1,593 +1,570 @@&#010; /* $Id$&#010;- *&#010;- * Licensed to the Apache Software Foundation (ASF) under one or more&#010;- * contributor license agreements. See the NOTICE file distributed with&#010;- * this work for additional information regarding copyright ownership.&#010;- * The ASF licenses this file to you under the Apache License, Version&#010;- * 2.0 (the "License"); you may not use this file except in compliance&#010;- * with the License. You may obtain a copy of the License at&#010;- *&#010;- * http://www.apache.org/licenses/LICENSE-2.0&#010;- *&#010;- * Unless required by applicable law or agreed to in writing, software&#010;- * distributed under the License is distributed on an "AS IS" BASIS,&#010;- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;- * See the License for the specific language governing permissions and&#010;- * limitations under the License.&#010;- */&#010;+*&#010;+* Licensed to the Apache Software Foundation (ASF) under one or more&#010;+* contributor license agreements. See the NOTICE file distributed with&#010;+* this work for additional information regarding copyright ownership.&#010;+* The ASF licenses this file to you under the Apache License, Version&#010;+* 2.0 (the "License"); you may not use this file except in compliance&#010;+* with the License. You may obtain a copy of the License at&#010;+*&#010;+* http://www.apache.org/licenses/LICENSE-2.0&#010;+*&#010;+* Unless required by applicable law or agreed to in writing, software&#010;+* distributed under the License is distributed on an "AS IS" BASIS,&#010;+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+* See the License for the specific language governing permissions and&#010;+* limitations under the License.&#010;+*/&#010;+&#010;+#ifndef __List_H__&#010;+#define __List_H__&#010; &#010;-#ifndef __LIST_H__&#010;-#define __LIST_H__&#010; #include "capu/Error.h"&#010; #include "capu/Config.h"&#010; #include "capu/container/Comparator.h"&#010; &#010;-namespace capu {&#010;-&#010;-  template &lt;class T, class C = Comparator &gt;&#010;-  class List {&#010;+namespace capu&#010;+{&#010;+    template &lt;class T, class C = Comparator&gt;&#010;+    class List&#010;+    {&#010;+    private:&#010;+        class ListNode&#010;+        {&#010;+        public:&#010;+&#010;+            ListNode()&#010;+                : mNext(0)&#010;+                , mPrev(0)&#010;+            {&#010;+            }&#010;+&#010;+            ListNode(const T&amp; data)&#010;+                : mData(data)&#010;+                , mNext(0)&#010;+                , mPrev(0)&#010;+            {&#010;+            }&#010;+&#010;+            T mData;&#010;+            ListNode* mNext;&#010;+            ListNode* mPrev;&#010;+        };&#010;+&#010;+        class ListIterator&#010;+        {&#010;+        public:&#010;+            friend class List&lt;T, C&gt;;&#010;+&#010;+            /**&#010;+            * destructor&#010;+            */&#010;+            ~ListIterator();&#010;+&#010;+            /**&#010;+            * Check if iterator has next element.&#010;+            * @return false if the next of current node that is pointed, is null otherwise true&#010;+            */&#010;+            bool_t hasNext();&#010;+&#010;+            /**&#010;+            * Shifts the iterator to the next position and returns the element if next != NULL&#010;+            * @param element&#010;+            * @return CAPU_OK if the next element has been gotten&#010;+            *&#010;+            */&#010;+            status_t next(T* element = 0);&#010;+&#010;+            /**&#010;+            * Get current iterator element.&#010;+            * @param element&#010;+            * @return CAPU_OK if the current element has been gotten&#010;+            */&#010;+            status_t current(T* element);&#010;+&#010;+            /**&#010;+            * Returns the index of the current element.&#010;+            * @return The index of the current element. If there is no current element, the return value is undefined.&#010;+            */&#010;+            uint32_t currentIndex();&#010;+&#010;+        private:&#010;+            ListIterator(ListNode* boundary); // creation only in list.begin()&#010;+            ListNode* mInitialNode;&#010;+            ListNode* mCurrentNode;&#010;+            uint32_t mIndex;&#010;+        };&#010;+&#010;+        ListNode* mBoundary;&#010;+        uint_t mSize;&#010;+        C mComparator;&#010;+&#010;+        void insertElement(ListNode* addPosition, const T&amp; element);&#010;+        void deleteElement(ListNode* deletePosition);&#010;+        ListNode* findElement(uint_t index) const;&#010;+&#010;+   public:&#010;+        typedef typename List&lt;T, C&gt;::ListIterator Iterator;&#010;+&#010;+        /**&#010;+        * Default Constructor&#010;+        */&#010;+        List();&#010;+&#010;+        /**&#010;+        * Copy constructor&#010;+        */&#010;+        List(const List&lt;T, C&gt;&amp; other);&#010;+&#010;+        /**&#010;+        * Destructor&#010;+        */&#010;+        virtual ~List();&#010;+&#010;+&#010;+        List&lt;T,C&gt;&amp; operator=(List&lt;T, C&gt; const&amp; other);&#010;+&#010;+        /**&#010;+        * Add element to the end of list&#010;+        * @param element element that will be added&#010;+        * @return CAPU_ENO_MEMORY if allocation of element is failed&#010;+        *         CAPU_OK if the element is successfully added&#010;+        */&#010;+        status_t add(const T&amp; element);&#010;+&#010;+        /**&#010;+        * Add element to specified position&#010;+        *&#010;+        * @param index index of element which will be inserted&#010;+        * @param element new value that will replace the old value&#010;+        *&#010;+        * @return CAPU_EINVAL if given index is invalid.&#010;+        *         CAPU_ENO_MEMORY if allocation of element is failed&#010;+        *         CAPU_OK if the element is successfully added&#010;+        *         CAPU_ERROR otherwise&#010;+        */&#010;+        status_t add(uint_t index, const T&amp; element);&#010;+&#010;+        /**&#010;+        * Add element to specified position&#010;+        *&#010;+        * @param iterator with the position to insert&#010;+        * @param element new value that will replace the old value&#010;+        *&#010;+        * @return CAPU_ENO_MEMORY memory allocation failed.&#010;+        *         CAPU_OK otherwise&#010;+        */&#010;+        status_t add(Iterator&amp; iter, const T &amp;element);&#010;+&#010;+        /**&#010;+        * Sets the element at the specified index.&#010;+        * @param index the index of element that will be replaced&#010;+        * @param element element that will be overwritten to existing place&#010;+        * @param elementOld the buffer to keep the existing&#010;+        * @return CAPU_EINVAL if the index is not valid&#010;+        *         CAPU_OK otherwise&#010;+        */&#010;+        status_t set(uint_t index, const T &amp;element, T* elementOld = 0);&#010;+&#010;+        /**&#010;+        * remove the element in the specified index and if the element_old&#010;+        * parameter is not NULL, the removed element will be put to element_old&#010;+        * @param index index of element that will be removed&#010;+        * @param elementOld the buffer which will keep the copy of the removed element&#010;+        * @return CAPU_EINVAL invalid index&#010;+        *         CAPU_OK if the element is successfully removed&#010;+        */&#010;+        status_t removeAt(uint_t index, T* elementOld = 0);&#010;+&#010;+        /**&#010;+        * remove the element in the specified iterator position and if the element_old&#010;+        * parameter is not NULL, the removed element will be put to element_old&#010;+        * @param iterator of element that will be removed&#010;+        * @param element_old the buffer which will keep the copy of the removed element&#010;+        * @return CAPU_EINVAL invalid iterator&#010;+        *         CAPU_OK if the element is successfully removed&#010;+        *&#010;+        */&#010;+        status_t removeAt(Iterator&amp; listIterator, T* elementOld = 0);&#010;+&#010;+        /**&#010;+        * Removes an element.&#010;+        * @param element The element that will get removed.&#010;+        * @return CAPU_EINVAL if element was not found&#010;+        *         CAPU_OK if element was removed.&#010;+        */&#010;+        status_t remove(const T&amp; element);&#010;+&#010;+        /**&#010;+        * removes all elements from linked list&#010;+        *&#010;+        * @return CAPU_OK if all of the elements are deleted&#010;+        */&#010;+        status_t clear();&#010;+&#010;+        /**&#010;+        * get a single element on specified index&#010;+        * @param index index of element that will be get&#010;+        * @param result the buffer that the retrieved element will be stored&#010;+        * @return CAPU_EINVAL invalid index&#010;+        *         CAPU_OK otherwise&#010;+        */&#010;+        status_t get(uint_t index, T* result) const;&#010;+&#010;+        /**&#010;+        * return size of list&#010;+        * @return return the size of list&#010;+        */&#010;+        int_t size() const;&#010;+&#010;+        /**&#010;+        * check the list is empty or not&#010;+        * @return true if empty&#010;+        *         false otherwise&#010;+        */&#010;+        bool_t isEmpty() const;&#010;+&#010;+        /**&#010;+        * returns an iterator pointing to the beginning of list&#010;+        * @return iterator&#010;+        */&#010;+        Iterator begin() const;&#010;+&#010;+        /**&#010;+        * finds the index of given element in the link list&#010;+        * if you are using an object you need to overload == operator&#010;+        *&#010;+        * @param element the value that will be searched&#010;+        * @return -1 if the value either does not exist or given value is NULL&#010;+        *          otherwise index of value on linked list&#010;+        */&#010;+        int_t find(const T &amp;element) const;&#010;+&#010;+        /**&#010;+        * check that if the list contains the given parameter or not&#010;+        * if you are using an object you need to overload == operator&#010;+        * @param element element that will be checked&#010;+        * @return true list contains it&#010;+        *         false otherwise&#010;+        */&#010;+        bool_t contains(const T &amp;element) const;&#010;+    };&#010; &#010;-    class ListNode {&#010;-    public:&#010;+    template &lt;class T, class C&gt;&#010;+    List&lt;T, C&gt;::List()&#010;+        : mBoundary(new ListNode())&#010;+        , mSize(0)&#010;+    {&#010;+        mBoundary-&gt;mNext = mBoundary;&#010;+        mBoundary-&gt;mPrev = mBoundary;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    List&lt;T, C&gt;::List(const List&lt;T, C&gt;&amp; other)&#010;+        : mBoundary(new ListNode())&#010;+        , mSize(0)&#010;+    {&#010;+        mBoundary-&gt;mNext = mBoundary;&#010;+        mBoundary-&gt;mPrev = mBoundary;&#010;+&#010;+        // add all items from the other list&#010;+        Iterator it = other.begin();&#010;+        T current;&#010;+        while(it.hasNext())&#010;+        {&#010;+            it.next(&amp;current);&#010;+            add(current);&#010;+        }&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    List&lt;T, C&gt;::~List()&#010;+    {&#010;+        clear();&#010;+        delete mBoundary;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::clear()&#010;+    {&#010;+        ListNode* current = mBoundary-&gt;mNext;&#010;+        ListNode* toDelete = 0;&#010;+        while (current != mBoundary)&#010;+        {&#010;+            toDelete = current;&#010;+            current = current-&gt;mNext;&#010;+            delete toDelete;&#010;+        }&#010;+        mSize = 0;&#010;+        mBoundary-&gt;mNext = mBoundary;&#010;+        mBoundary-&gt;mPrev = mBoundary;&#010;+        return CAPU_OK;&#010;+    }&#010; &#010;-      ListNode() {&#010;-        mNext = NULL;&#010;-        mPrev = NULL;&#010;-      }&#010;-&#010;-      ListNode(T data) {&#010;-        mNext = NULL;&#010;-        mPrev = NULL;&#010;-        this-&gt;mData = data;&#010;-      }&#010;-&#010;-      T mData;&#010;-      ListNode * mNext;&#010;-      ListNode * mPrev;&#010;+    template &lt;class T, class C&gt;&#010;+    List&lt;T,C&gt;&amp; List&lt;T, C&gt;::operator=(List&lt;T, C&gt; const&amp; other)&#010;+    {&#010;+        clear();&#010;+        mBoundary-&gt;mNext = mBoundary;&#010;+        mBoundary-&gt;mPrev = mBoundary;&#010;+&#010;+        // add all items from the other list&#010;+        Iterator it = other.begin();&#010;+        T current;&#010;+        while(it.hasNext())&#010;+        {&#010;+            it.next(&amp;current);&#010;+            add(current);&#010;+        }&#010;+        return *this;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    int_t List&lt;T, C&gt;::find(const T &amp;element) const&#010;+    {&#010;+        int_t counter = 0;&#010;+        ListNode* current = mBoundary-&gt;mNext;&#010;+        while (current != mBoundary)&#010;+        {&#010;+            if (mComparator(current-&gt;mData, element))&#010;+            {&#010;+                // element was found, return index&#010;+                return counter;&#010;+            }&#010;+            current = current-&gt;mNext;&#010;+            ++counter;&#010;+        }&#010;+&#010;+        // not found&#010;+        return -1;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    inline bool_t List&lt;T, C&gt;::contains(const T &amp;element) const&#010;+    {&#010;+        return find(element) != -1;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    inline status_t List&lt;T, C&gt;::add(Iterator&amp; iter, const T &amp;element)&#010;+    {&#010;+        insertElement(iter.mCurrentNode-&gt;mPrev, element); // insert before found position&#010;+        return CAPU_OK;&#010;+    }&#010; &#010;-    };&#010;+    template &lt;class T, class C&gt;&#010;+    inline status_t List&lt;T, C&gt;::add(uint_t index, const T &amp;element)&#010;+    {&#010;+        if (index &gt; mSize) // if index == mSize, element is added at the end&#010;+        {&#010;+            // invalid index&#010;+            return CAPU_EINVAL;&#010;+        }&#010; &#010;-    class ListIterator {&#010;-    public:&#010;-      friend class List&lt;T, C&gt;;&#010;-      /**&#010;-       * Default Constructor&#010;-       */&#010;-      ListIterator();&#010;-&#010;-      /**&#010;-       * constructor&#010;-       * @param initial_node where the iterator will be pointing&#010;-       */&#010;-      ListIterator(ListNode *initialNode);&#010;-&#010;-      /**&#010;-       * destructor&#010;-       */&#010;-      ~ListIterator();&#010;-&#010;-      /**&#010;-       * Check if iterator has next element.&#010;-       * @return false if the next of current node that is pointed, is null otherwise true&#010;-       */&#010;-      bool_t hasNext();&#010;-&#010;-      /**&#010;-       * Shifts the iterator to the next position and returns the element if next != NULL&#010;-       * @param element&#010;-       * @return ETCH_ERANGE if the next of current node that is pointed, is null&#010;-       *         CAPU_OK if the next element has been gotten&#010;-       *&#010;-       */&#010;-      status_t next(T* element = NULL);&#010;-&#010;-      /**&#010;-       * Get current iterator element.&#010;-       * @param element&#010;-       * @return ETCH_ERANGE if the current node that is pointed, is null&#010;-       *         CAPU_EINVAL if the value is NULL&#010;-       *         CAPU_OK if the current element has been gotten&#010;-       *&#010;-       */&#010;-      status_t current(T* element);&#010;+        insertElement(findElement(index)-&gt;mPrev, element); // insert before found position&#010;+        return CAPU_OK;&#010;+    }&#010; &#010;-    private:&#010;-      ListNode *mNextPosition;&#010;-    };&#010;+    template &lt;class T, class C&gt;&#010;+    inline status_t List&lt;T, C&gt;::add(const T &amp;element)&#010;+    {&#010;+        insertElement(mBoundary-&gt;mPrev, element); // insert at list end (boundary-&gt;mPrev)&#010;+        return CAPU_OK;&#010;+    }&#010; &#010;-    ListNode *mHead;&#010;-    ListNode *mTail;&#010;-    int_t mSize;&#010;-&#010;-  public:&#010;-&#010;-    typedef typename List&lt;T, C&gt;::ListIterator Iterator;&#010;-&#010;-    /**&#010;-     * Default Constructor&#010;-     */&#010;-    List();&#010;-&#010;-    /**&#010;-     * Destructor&#010;-     */&#010;-    virtual ~List();&#010;-&#010;-    /**&#010;-     * Add element to the end of list&#010;-     * @param element element that will be added&#010;-     * @return CAPU_ENO_MEMORY if allocation of element is failed&#010;-     *         CAPU_OK if the element is successfully added&#010;-     */&#010;-    status_t add(const T &amp;element);&#010;-&#010;-    /**&#010;-     * Add element to specified position&#010;-     *&#010;-     * @param index index of element which will be inserted&#010;-     * @param element new value that will replace the old value&#010;-     *&#010;-     * @return CAPU_EINVAL if given index is invalid.&#010;-     *         CAPU_ENO_MEMORY if allocation of element is failed&#010;-     *         CAPU_OK if the element is successfully added&#010;-     *         CAPU_ERROR otherwise&#010;-     */&#010;-    status_t add(int_t index, const T &amp;element);&#010;-&#010;-    /**&#010;-     * Add element to specified position&#010;-     *&#010;-     * @param iterator with the position to insert&#010;-     * @param element new value that will replace the old value&#010;-     *&#010;-     * @return CAPU_ENO_MEMORY memory allocation failed.&#010;-     *         CAPU_OK otherwise&#010;-     */&#010;-    status_t add(Iterator&amp; iter, const T &amp;element);&#010;-&#010;-    /**&#010;-     * remove the element in the specified index and if the element_old&#010;-     * parameter is not NULL, the removed element will be put to element_old&#010;-     * @param index index of element that will be removed&#010;-     * @param elementOld the buffer which will keep the copy of the removed element&#010;-     * @return CAPU_EINVAL invalid index&#010;-     *         CAPU_OK if the element is successfully removed&#010;-     */&#010;-    status_t removeAt(int_t index, T* elementOld = NULL);&#010;-&#010;-    /**&#010;-     * remove the element in the specified iterator position and if the element_old&#010;-     * parameter is not NULL, the removed element will be put to element_old&#010;-     * @param iterator of element that will be removed&#010;-     * @param element_old the buffer which will keep the copy of the removed element&#010;-     * @return CAPU_EINVAL invalid iterator&#010;-     *         CAPU_OK if the element is successfully removed&#010;-     * &#010;-     */&#010;-    status_t removeAt(Iterator&amp; listIterator, T* elementOld = NULL);&#010;-&#010;-    /**&#010;-     * get a single element on specified index&#010;-     * @param index index of element that will be get&#010;-     * @param result the buffer that the retrieved element will be stored&#010;-     * @return CAPU_EINVAL invalid index&#010;-     *         CAPU_OK otherwise&#010;-     */&#010;-    status_t get(int_t index, T* result);&#010;-&#010;-    /**&#010;-     * return size of list&#010;-     * @return return the size of list&#010;-     */&#010;-    int_t size();&#010;-&#010;-    /**&#010;-     * check the list is empty or not&#010;-     * @return true if empty&#010;-     *         false otherwise&#010;-     */&#010;-    bool_t isEmpty();&#010;-&#010;-    /**&#010;-     * returns an iterator pointing to the beginning of list&#010;-     * @return iterator&#010;-     */&#010;-    Iterator begin() const;&#010;-&#010;-    /**&#010;-     * finds the index of given element in the link list&#010;-     * if you are using an object you need to overload == operator&#010;-     *&#010;-     * @param element the value that will be searched&#010;-     * @return -1 if the value either does not exist or given value is NULL&#010;-     *          otherwise index of value on linked list&#010;-     */&#010;-    int_t find(const T &amp;element);&#010;-&#010;-    /**&#010;-     *&#010;-     * @param index the index of element that will be replaced&#010;-     * @param element element that will be overwritten to existing place&#010;-     * @param elementOld the buffer to keep the existing&#010;-     * @return CAPU_EINVAL if the index is not valid&#010;-     *         CAPU_OK otherwise&#010;-     */&#010;-    status_t set(int_t index, const T &amp;element, T* elementOld = NULL);&#010;-&#010;-    /**&#010;-     * check that if the list contains the given parameter or not&#010;-     * if you are using an object you need to overload == operator&#010;-     * @param element element that will be checked&#010;-     * @return true list contains it&#010;-     *         false otherwise&#010;-     */&#010;-    bool_t contains(const T &amp;element);&#010;-&#010;-    /**&#010;-     * removes all elements from linked list&#010;-     *&#010;-     * @return CAPU_OK if all of the elements are deleted&#010;-     *&#010;-     */&#010;-    status_t clear();&#010;-  };&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  List&lt;T, C&gt;::List()&#010;-  : mHead(NULL),&#010;-  mTail(NULL),&#010;-  mSize(0) {&#010;-    //init linked list&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  List&lt;T, C&gt;::~List() {&#010;-    clear();&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::clear() {&#010;-    //on the deallocation delete all elements in the list&#010;-    ListNode *cursor = mHead;&#010;-    ListNode *tmp = NULL;&#010;-&#010;-    while (cursor != NULL) {&#010;-      tmp = cursor;&#010;-      cursor = cursor-&gt;mNext;&#010;-      delete tmp;&#010;-    }&#010;-    mSize = 0;&#010;-    mHead = NULL;&#010;-    mTail = NULL;&#010;-    return CAPU_OK;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  int_t List&lt;T, C&gt;::find(const T &amp;element) {&#010;-    int_t counter = 0;&#010;-    ListNode * cursor = mHead;&#010;-    C comparator;&#010;-    while (cursor != NULL) {&#010;-      if (comparator(cursor-&gt;mData, element)) {&#010;-        return counter;&#010;-      }&#010;-      cursor = cursor-&gt;mNext;&#010;-      ++counter;&#010;-    }&#010;-    return -1;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  bool_t List&lt;T, C&gt;::contains(const T &amp;element) {&#010;-    return (find(element) != -1);&#010;-  }&#010;-&#010;-  //add elements to the end of list&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::add(const T &amp;element) {&#010;-    ListNode *listElem = new ListNode(element);&#010;-    //NOT ALLOCATED&#010;-    if (listElem == NULL) {&#010;-      return CAPU_ENO_MEMORY;&#010;-    }&#010;-    //list is empty&#010;-    if (mHead == NULL) {&#010;-      mHead = listElem;&#010;-      mTail = mHead;&#010;-    } else {&#010;-      //list contains some elements so add it to the end of list&#010;-      mTail-&gt;mNext = listElem;&#010;-      listElem-&gt;mPrev = mTail;&#010;-      mTail = listElem;&#010;-      mTail-&gt;mNext = NULL;&#010;-    }&#010;-    ++mSize;&#010;-    return CAPU_OK;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::add(int_t index, const T &amp;element) {&#010;-    if ((index &gt; mSize) || (index &lt; 0)) {&#010;-      return CAPU_EINVAL;&#010;-    }&#010;-&#010;-    ListNode *listElem = new ListNode(element);&#010;-    //NOT ALLOCATED&#010;-    if (listElem == NULL) {&#010;-      return CAPU_ENO_MEMORY;&#010;-    }&#010;-&#010;-    int_t counter = 0;&#010;-    ListNode * cursor = mHead;&#010;-    if (cursor == NULL) {&#010;-      //empty list&#010;-      mHead = listElem;&#010;-      mTail = listElem;&#010;-      mHead-&gt;mPrev = NULL;&#010;-      mTail-&gt;mNext = NULL;&#010;-      ++mSize;&#010;-      return CAPU_OK;&#010;-    } else if (index == mSize) {&#010;-      //list contains some elements so add it to the end of list&#010;-      mTail-&gt;mNext = listElem;&#010;-      listElem-&gt;mPrev = mTail;&#010;-      mTail = listElem;&#010;-      mTail-&gt;mNext = NULL;&#010;-      ++mSize;&#010;-      return CAPU_OK;&#010;-    } else if (index == 0) {&#010;-      //add it to beginning of the list&#010;-      listElem-&gt;mNext = mHead;&#010;-      mHead-&gt;mPrev = listElem;&#010;-      listElem-&gt;mPrev = NULL;&#010;-      mHead = listElem;&#010;-      ++mSize;&#010;-      return CAPU_OK;&#010;-    }&#010;-    while (cursor != NULL) {&#010;-      if (index == counter) {&#010;-        listElem-&gt;mNext = cursor;&#010;-        listElem-&gt;mPrev = cursor-&gt;mPrev;&#010;-        if (cursor-&gt;mPrev != NULL)&#010;-          cursor-&gt;mPrev-&gt;mNext = listElem;&#010;-        cursor-&gt;mPrev = listElem;&#010;+    template &lt;class T, class C&gt;&#010;+    inline void List&lt;T, C&gt;::insertElement(typename List&lt;T, C&gt;::ListNode* addPosition, const T&amp; element)&#010;+    {&#010;+        ListNode* newNode = new ListNode(element); // copy in&#010;+        newNode-&gt;mNext = addPosition-&gt;mNext;&#010;+        newNode-&gt;mPrev = addPosition;&#010;+        addPosition-&gt;mNext-&gt;mPrev = newNode;&#010;+        addPosition-&gt;mNext = newNode;&#010;         ++mSize;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    inline void List&lt;T, C&gt;::deleteElement(typename List&lt;T, C&gt;::ListNode* deletePosition)&#010;+    {&#010;+        deletePosition-&gt;mPrev-&gt;mNext = deletePosition-&gt;mNext;&#010;+        deletePosition-&gt;mNext-&gt;mPrev = deletePosition-&gt;mPrev;&#010;+        delete deletePosition;&#010;+        --mSize;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    typename List&lt;T, C&gt;::ListNode* List&lt;T, C&gt;::findElement(uint_t index) const&#010;+    {&#010;+        // search element by running through list from the first element&#010;+        uint_t counter = 0;&#010;+        ListNode* current = mBoundary-&gt;mNext;&#010;+        while(counter &lt; index)&#010;+        {&#010;+            ++counter;&#010;+            current = current-&gt;mNext;&#010;+        }&#010;+&#010;+        // current is the element that was requested&#010;+        return current;&#010;+    }&#010;+&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::remove(const T&amp; element)&#010;+    {&#010;+        ListNode* current = mBoundary-&gt;mNext;&#010;+        while (current != mBoundary)&#010;+        {&#010;+            if (mComparator(current-&gt;mData, element))&#010;+            {&#010;+                // deletion element found&#010;+                deleteElement(current);&#010;+                return CAPU_OK;&#010;+            }&#010;+            current = current-&gt;mNext;&#010;+        }&#010;+        return CAPU_EINVAL;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::removeAt(uint_t index, T* elementOld)&#010;+    {&#010;+        if (index &gt;= mSize)&#010;+        {&#010;+            // invalid index&#010;+            return CAPU_EINVAL;&#010;+        }&#010;+&#010;+        ListNode* toDelete = findElement(index);&#010;+        if (elementOld)&#010;+        {&#010;+            *elementOld = toDelete-&gt;mData; // copy out&#010;+        }&#010;+        deleteElement(toDelete);&#010;         return CAPU_OK;&#010;-      }&#010;-      ++counter;&#010;-      cursor = cursor-&gt;mNext;&#010;-    }&#010;-    return CAPU_ERROR;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::add(Iterator&amp; iter, const T &amp;element) {&#010;-    ListNode *listElem = new ListNode(element);&#010;-&#010;-    //NOT ALLOCATED&#010;-    if (listElem == NULL) {&#010;-      return CAPU_ENO_MEMORY;&#010;-    }&#010;-&#010;-    if (mHead == NULL &amp;&amp; mTail == NULL) {&#010;-      mHead = listElem;&#010;-      mTail = mHead;&#010;-    } else if (iter.mNextPosition == NULL) {&#010;-      listElem-&gt;mNext = NULL;&#010;-      listElem-&gt;mPrev = mTail;&#010;-      mTail-&gt;mNext = listElem;&#010;-      mTail = listElem;&#010;-    } else if (iter.mNextPosition-&gt;mNext == NULL) {&#010;-      listElem-&gt;mNext = NULL;&#010;-      listElem-&gt;mPrev = iter.mNextPosition;&#010;-      iter.mNextPosition-&gt;mNext = listElem;&#010;-      mTail = listElem;&#010;-    } else if (iter.mNextPosition-&gt;mPrev == NULL) {&#010;-      listElem-&gt;mPrev = NULL;&#010;-      listElem-&gt;mNext = iter.mNextPosition;&#010;-      mHead = listElem;&#010;-    } else {&#010;-      listElem-&gt;mPrev = iter.mNextPosition-&gt;mPrev;&#010;-      listElem-&gt;mNext = iter.mNextPosition;&#010;-      iter.mNextPosition-&gt;mPrev-&gt;mNext = listElem;&#010;-    }&#010;-    iter.mNextPosition = listElem;&#010;-&#010;-    ++mSize;&#010;-    return CAPU_OK;&#010;-&#010;-  }&#010;-&#010;-  //remove the specific element indicated by the index in the list&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::removeAt(int_t index, T* elementOld) {&#010;-    if ((index &lt; 0) || (index &gt;= mSize)) {&#010;-      return CAPU_EINVAL;&#010;-    }&#010;-    ListNode * tmp = NULL;&#010;-    if (mHead == mTail) {&#010;-      tmp = mHead;&#010;-      mHead = NULL;&#010;-      mTail = NULL;&#010;-    } else if (index == 0) {&#010;-&#010;-      tmp = mHead;&#010;-      mHead = mHead-&gt;mNext;&#010;-      mHead-&gt;mPrev = NULL;&#010;-    } else if (index == mSize - 1) {&#010;-      tmp = mTail;&#010;-      mTail = mTail-&gt;mPrev;&#010;-      mTail-&gt;mNext = NULL;&#010;-    } else {&#010;-      tmp = mHead;&#010;-      for (int_t i = 0; i &lt; index; ++i) {&#010;-        tmp = tmp-&gt;mNext;&#010;-      }&#010;-      tmp-&gt;mNext-&gt;mPrev = tmp-&gt;mPrev;&#010;-      tmp-&gt;mPrev-&gt;mNext = tmp-&gt;mNext;&#010;-    }&#010;-    if (elementOld != NULL)&#010;-      *elementOld = tmp-&gt;mData;&#010;-    delete tmp;&#010;-    mSize--;&#010;-    return CAPU_OK;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::removeAt(Iterator&amp; listIterator, T* elementOld) {&#010;-&#010;-    ListNode* tmp = NULL;&#010;-&#010;-    if (mHead == mTail) {&#010;-      tmp = mHead;&#010;-      if (!tmp) {&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::removeAt(Iterator&amp; listIterator, T* elementOld)&#010;+    {&#010;+        if (listIterator.hasNext())&#010;+        {&#010;+            if (elementOld)&#010;+            {&#010;+                *elementOld = listIterator.mCurrentNode-&gt;mData; // copy out&#010;+            }&#010;+            ListNode* node = listIterator.mCurrentNode;&#010;+            listIterator.mCurrentNode = listIterator.mCurrentNode-&gt;mNext;&#010;+            deleteElement(node);&#010;+            return CAPU_OK;&#010;+        }&#010;         return CAPU_EINVAL;&#010;-      }&#010;-      mHead = NULL;&#010;-      mTail = NULL;&#010;-      listIterator.mNextPosition = NULL;&#010;-    } else if (listIterator.mNextPosition == mHead) {&#010;-&#010;-      tmp = mHead;&#010;-      mHead = mHead-&gt;mNext;&#010;-      mHead-&gt;mPrev = NULL;&#010;-      listIterator.mNextPosition = mHead;&#010;-    } else if (listIterator.mNextPosition == mTail) {&#010;-      tmp = mTail;&#010;-      mTail = mTail-&gt;mPrev;&#010;-      mTail-&gt;mNext = NULL;&#010;-      listIterator.mNextPosition = mTail;&#010;-    } else {&#010;-      tmp = listIterator.mNextPosition;&#010;-      listIterator.mNextPosition-&gt;mPrev-&gt;mNext = listIterator.mNextPosition-&gt;mNext;&#010;-      listIterator.mNextPosition-&gt;mNext-&gt;mPrev = listIterator.mNextPosition-&gt;mPrev;&#010;-      listIterator.mNextPosition = listIterator.mNextPosition-&gt;mPrev;&#010;-    }&#010;-&#010;-    if (elementOld != 0) {&#010;-      *elementOld = tmp-&gt;mData;&#010;-    }&#010;-    delete tmp;&#010;-    mSize--;&#010;-&#010;-    return CAPU_OK;&#010;-&#010;-  }&#010;-&#010;-  //get the specified element from list&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::get(int_t index, T* result) {&#010;-    if (((index &lt; 0) || (index &gt;= mSize)) || (result == NULL)) {&#010;-      return CAPU_EINVAL;&#010;-    }&#010;-&#010;-    if (index == 0) {&#010;-      *result = mHead-&gt;mData;&#010;-      return CAPU_OK;&#010;-    } else if (index == mSize - 1) {&#010;-      *result = mTail-&gt;mData;&#010;-      return CAPU_OK;&#010;-    }&#010;-&#010;-    ListNode *cursor = mHead;&#010;-    for (int_t i = 0; i &lt; index; ++i) {&#010;-      cursor = cursor-&gt;mNext;&#010;-    }&#010;-    *result = cursor-&gt;mData;&#010;-    return CAPU_OK;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::set(int_t index, const T &amp;element, T* elementOld) {&#010;-    if ((index &lt; 0) || (index &gt;= mSize))&#010;-      return CAPU_EINVAL;&#010;-&#010;-    ListNode *cursor = mHead;&#010;-    for (int_t i = 0; i &lt; index; ++i) {&#010;-      cursor = cursor-&gt;mNext;&#010;-    }&#010;-    if (elementOld != NULL)&#010;-      *elementOld = cursor-&gt;mData;&#010;-    cursor-&gt;mData = element;&#010;-    return CAPU_OK;&#010;-  }&#010;-&#010;-  //Return element count of list&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  int_t List&lt;T, C&gt;::size() {&#010;-    return mSize;&#010;-  }&#010;-&#010;-  //checks if the list is empty or not&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  bool_t List&lt;T, C&gt;::isEmpty() {&#010;-    if (mSize == 0)&#010;-      return true;&#010;-    else&#010;-      return false;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  typename List&lt;T, C&gt;::Iterator List&lt;T, C&gt;::begin() const {&#010;-    return ListIterator(mHead);&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  List&lt;T, C&gt;::ListIterator::ListIterator()&#010;-  : mNextPosition(NULL) {&#010;-&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  List&lt;T, C&gt;::ListIterator::~ListIterator() {&#010;-&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  List&lt;T, C&gt;::ListIterator::ListIterator(ListNode *initialNode) {&#010;-    mNextPosition = initialNode;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  bool_t List&lt;T, C&gt;::ListIterator::hasNext() {&#010;-    if (mNextPosition == NULL) {&#010;-      return false;&#010;-    }&#010;-    return true;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::ListIterator::next(T* element) {&#010;-    T* result = 0;&#010;-    if (mNextPosition == NULL) {&#010;-      return CAPU_ERANGE;&#010;-    } else {&#010;-      result = &amp;mNextPosition-&gt;mData;&#010;-      mNextPosition = mNextPosition-&gt;mNext;&#010;-    }&#010;-    if (element != NULL) {&#010;-      *element = *result;&#010;-    }&#010;-    return CAPU_OK;&#010;-  }&#010;-&#010;-  template &lt;class T, class C&gt;&#010;-  status_t List&lt;T, C&gt;::ListIterator::current(T* value) {&#010;-    if (mNextPosition == 0) {&#010;-      return CAPU_ERANGE;&#010;-    } else if (value == 0) {&#010;-      return CAPU_EINVAL;&#010;-    } else {&#010;-      *value = mNextPosition-&gt;mData;&#010;-      return CAPU_OK;&#010;     }&#010;-  }&#010;-}&#010; &#010;-#endif /* __LIST_H__ */&#010;+    template &lt;class T, class C&gt;&#010;+    inline status_t List&lt;T, C&gt;::set(uint_t index, const T &amp;element, T* elementOld)&#010;+    {&#010;+        if (index &gt;= mSize)&#010;+        {&#010;+            // invalid index&#010;+            return CAPU_EINVAL;&#010;+        }&#010;+&#010;+        ListNode* node = findElement(index);&#010;+        if (elementOld)&#010;+        {&#010;+            *elementOld = node-&gt;mData; // copy out&#010;+        }&#010;+        node-&gt;mData = element; // copy in&#010;+        return CAPU_OK;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::get(uint_t index, T* result) const&#010;+    {&#010;+        if (index &gt;= mSize)&#010;+        {&#010;+            // invalid index&#010;+            return CAPU_EINVAL;&#010;+        }&#010;+&#010;+        *result = findElement(index)-&gt;mData; // copy out&#010;+        return CAPU_OK;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    inline int_t List&lt;T, C&gt;::size() const&#010;+    {&#010;+        return mSize;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    inline bool_t List&lt;T, C&gt;::isEmpty() const&#010;+    {&#010;+        return mSize == 0;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    typename List&lt;T, C&gt;::Iterator List&lt;T, C&gt;::begin() const&#010;+    {&#010;+        return ListIterator(mBoundary);&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    List&lt;T, C&gt;::ListIterator::ListIterator(ListNode* boundary)&#010;+        : mInitialNode(boundary)&#010;+        , mCurrentNode(boundary-&gt;mNext)&#010;+        , mIndex(0)&#010;+    {&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    List&lt;T, C&gt;::ListIterator::~ListIterator()&#010;+    {&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    bool_t List&lt;T, C&gt;::ListIterator::hasNext()&#010;+    {&#010;+        return mInitialNode != mCurrentNode;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::ListIterator::next(T* element)&#010;+    {&#010;+        if (element)&#010;+        {&#010;+            status_t ret = current(element);&#010;+            if (ret != CAPU_OK)&#010;+            {&#010;+                return ret; // don't continue&#010;+            }&#010;+        }&#010;+        mCurrentNode = mCurrentNode-&gt;mNext;&#010;+        ++mIndex;&#010;+        return CAPU_OK;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    uint32_t List&lt;T, C&gt;::ListIterator::currentIndex()&#010;+    {&#010;+        return mIndex;&#010;+    }&#010;+&#010;+    template &lt;class T, class C&gt;&#010;+    status_t List&lt;T, C&gt;::ListIterator::current(T* element)&#010;+    {&#010;+        if (!hasNext())&#010;+        {&#010;+            return CAPU_ERANGE;&#010;+        }&#010;+        if (!element)&#010;+        {&#010;+            return CAPU_EINVAL;&#010;+        }&#010;+        *element = mCurrentNode-&gt;mData; // copy out&#010;+        return CAPU_OK;&#010;+    }&#010;+}&#010; &#010;+#endif /* __List_H__ */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ListTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ListTest.cpp?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ListTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ListTest.cpp Wed Oct 17 06:48:21 2012&#010;@@ -30,13 +30,11 @@ TEST(List, Constructor_Default) {&#010; &#010; TEST(List, addTest) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 0;&#010;   capu::status_t result;&#010; &#010;-  data1 = 32;&#010;-  data2 = 43;&#010;   //append element to the linked list&#010;   result = list-&gt;add(data1);&#010;   EXPECT_TRUE(result == capu::CAPU_OK);&#010;@@ -57,13 +55,12 @@ TEST(List, addTest) {&#010; &#010; TEST(List, addIndexTest) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 0;&#010;   capu::status_t result;&#010; &#010;-  data1 = 32;&#010;-  data2 = 43;&#010;+&#010; &#010;   result = list-&gt;add(10, data1);&#010;   EXPECT_TRUE(result == capu::CAPU_EINVAL);&#010;@@ -93,9 +90,9 @@ TEST(List, addIndexTest) {&#010; &#010; TEST(List, removeAt) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t   data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 56;&#010;   capu::status_t result;&#010; &#010;   data1 = 32;&#010;@@ -134,18 +131,59 @@ TEST(List, removeAt) {&#010;   delete list;&#010; }&#010; &#010;-TEST(List, get) {&#010;-  capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;+TEST(List, getElementInConstList) {&#010;+  capu::List&lt;capu::int32_t&gt;* normalList = new capu::List&lt;capu::int32_t &gt; ();&#010;+  const capu::List&lt;capu::int32_t&gt;* constantList = normalList;&#010;   capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;-  capu::int32_t data4;&#010; &#010;   capu::status_t result;&#010; &#010;   data1 = 32;&#010;-  data2 = 43;&#010;-  data3 = 56;&#010;+&#010;+  result = normalList-&gt;add(data1);&#010;+  EXPECT_TRUE(result == capu::CAPU_OK);&#010;+&#010;+  result = constantList-&gt;get(0, &amp;data1);&#010;+  EXPECT_TRUE(result == capu::CAPU_OK);&#010;+&#010;+  delete normalList;&#010;+}&#010;+&#010;+&#010;+&#010;+TEST(List, loopThroughConstList) {&#010;+  capu::List&lt;capu::int32_t&gt;* normalList = new capu::List&lt;capu::int32_t &gt; ();&#010;+  const capu::List&lt;capu::int32_t&gt;* constantList = normalList;&#010;+  capu::int32_t data1;&#010;+&#010;+  capu::status_t result;&#010;+&#010;+  data1 = 32;&#010;+&#010;+  result = normalList-&gt;add(data1);&#010;+  EXPECT_TRUE(result == capu::CAPU_OK);&#010;+&#010;+&#010;+  capu::List&lt;capu::int32_t&gt;::Iterator iterator = constantList-&gt;begin();&#010;+  while (iterator.hasNext())&#010;+  {&#010;+    capu::int32_t* temp=0;;&#010;+    iterator.next(temp);&#010;+  }&#010;+&#010;+  delete normalList;&#010;+}&#010;+&#010;+TEST(List, get) {&#010;+  capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 56;&#010;+  capu::int32_t data4 = 0;&#010;+&#010;+  capu::status_t result;&#010;+&#010;+&#010; &#010;   //add some element to the linked list&#010;   result = list-&gt;add(data1);&#010;@@ -178,11 +216,9 @@ TEST(List, get) {&#010; &#010; TEST(List, size) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-&#010;   capu::int_t result;&#010;+  capu::int32_t data1 = 32;;&#010; &#010;-  data1 = 32;&#010;   //size of empty list&#010;   result = list-&gt;size();&#010;   EXPECT_TRUE(result == 0);&#010;@@ -213,12 +249,11 @@ TEST(List, size) {&#010; &#010; TEST(List, empty) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010;   capu::bool_t result;&#010; &#010;-  data1 = 32;&#010;-&#010;   //check the empty list&#010;   result = list-&gt;isEmpty();&#010;   EXPECT_TRUE(result == true);&#010;@@ -233,14 +268,12 @@ TEST(List, empty) {&#010; &#010; TEST(List, find) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010;   capu::int_t result;&#010; &#010;-  data1 = 32;&#010;-  data2 = 43;&#010;-  data3 = 44;&#010;+&#010; &#010;   //check empty list&#010;   result = list-&gt;find(data1);&#010;@@ -266,9 +299,9 @@ TEST(List, find) {&#010; &#010; TEST(List, contains) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010; &#010;   capu::int32_t check_value = 0;&#010;   capu::bool_t result;&#010;@@ -297,17 +330,52 @@ TEST(List, contains) {&#010;   delete list;&#010; }&#010; &#010;+TEST(List, copyConstructor1) {&#010;+  capu::List&lt;capu::int32_t&gt; list;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010;+&#010;+  //add some dummy values to the linked list&#010;+  list.add(data1);&#010;+  list.add(data2);&#010;+  list.add(data3);&#010;+&#010;+  capu::List&lt;capu::int32_t&gt; copy(list);&#010;+&#010;+  EXPECT_EQ(list.size(), copy.size());&#010;+  list.clear();&#010;+&#010;+  EXPECT_EQ(0, copy.find(data1));&#010;+  EXPECT_EQ(1, copy.find(data2));&#010;+  EXPECT_EQ(2, copy.find(data3));&#010;+}&#010;+&#010;+TEST(List, copyConstructor2) {&#010;+  // copy empty list and add values afterwards to original list&#010;+  capu::List&lt;capu::int32_t&gt; list;&#010;+  capu::List&lt;capu::int32_t&gt; copy(list);&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010;+&#010;+  copy.add(data1);&#010;+  copy.add(data2);&#010;+  copy.add(data3);&#010;+&#010;+  EXPECT_EQ(0, copy.find(data1));&#010;+  EXPECT_EQ(1, copy.find(data2));&#010;+  EXPECT_EQ(2, copy.find(data3));&#010;+  EXPECT_TRUE(list.isEmpty());&#010;+}&#010;+&#010; TEST(List, clear) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010;   capu::status_t result;&#010; &#010;-  data1 = 32;&#010;-  data2 = 43;&#010;-  data3 = 44;&#010;-&#010;   //add some dummy values to the linked list&#010;   list-&gt;add(data1);&#010;   list-&gt;add(data1);&#010;@@ -328,11 +396,8 @@ TEST(List, clear) {&#010; &#010; TEST(List, set) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-&#010;-  data1 = 32;&#010;-  data2 = 43;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010; &#010;   EXPECT_TRUE(list-&gt;add(data1) == capu::CAPU_OK);&#010;   EXPECT_TRUE(list-&gt;add(data2) == capu::CAPU_OK);&#010;@@ -346,14 +411,11 @@ TEST(List, set) {&#010; &#010; TEST(ListIterator, hasNext) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;   capu::List&lt;capu::int32_t&gt;::Iterator it = list-&gt;begin();&#010;   EXPECT_TRUE(it.hasNext() == false);&#010; &#010;-  data1 = 32;&#010;-  data2 = 43;&#010;-&#010;   list-&gt;add(data1);&#010;   list-&gt;add(data2);&#010; &#010;@@ -365,14 +427,13 @@ TEST(ListIterator, hasNext) {&#010; &#010; TEST(ListIterator, next) {&#010;   capu::List&lt;capu::int32_t&gt;* list = new capu::List&lt;capu::int32_t &gt; ();&#010;-  capu::int32_t data1;&#010;-  capu::int32_t data2;&#010;-  capu::int32_t data3;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 0;&#010;   capu::List&lt;capu::int32_t&gt;::Iterator it = list-&gt;begin();&#010;   capu::int32_t cnt = 0;&#010;   EXPECT_TRUE(it.hasNext() == false);&#010;-  data1 = 32;&#010;-  data2 = 43;&#010;+&#010;   list-&gt;add(data1);&#010;   list-&gt;add(data2);&#010;   it = list-&gt;begin();&#010;@@ -456,8 +517,8 @@ TEST(ListIterator, removeAt){&#010; }&#010; &#010; TEST(ListIterator, add){&#010;-    capu::List&lt;capu::int32_t&gt; list;&#010;-  capu::List&lt;capu::int32_t&gt;::Iterator iter;&#010;+  capu::List&lt;capu::int32_t&gt; list;&#010;+  capu::List&lt;capu::int32_t&gt;::Iterator iter = list.begin();&#010;   capu::int32_t data1 = 0;&#010; &#010;   list.add(iter, 1);&#010;@@ -514,10 +575,29 @@ TEST(ListIterator, add){&#010; &#010; }&#010; &#010;+TEST(ListIterator, currentIndex){&#010;+  capu::List&lt;capu::int32_t&gt; list;&#010;+  capu::int32_t data1 = 32;&#010;+  capu::int32_t data2 = 43;&#010;+  capu::int32_t data3 = 44;&#010;+&#010;+  //add some dummy values to the linked list&#010;+  list.add(data1);&#010;+  list.add(data2);&#010;+  list.add(data3);&#010;+&#010;+  capu::List&lt;capu::int32_t&gt;::Iterator iter = list.begin();&#010;+&#010;+  EXPECT_EQ(0u, iter.currentIndex());&#010;+  iter.next();&#010;+  EXPECT_EQ(1u, iter.currentIndex());&#010;+  iter.next();&#010;+  EXPECT_EQ(2u, iter.currentIndex());&#010;+}&#010; &#010; TEST(ListIterator, loopAdd){&#010;   capu::List&lt;capu::int32_t&gt; list;&#010;-  capu::List&lt;capu::int32_t&gt;::Iterator iter;&#010;+  capu::List&lt;capu::int32_t&gt;::Iterator iter = list.begin();&#010;   capu::int32_t data1 = 0;&#010; &#010;   list.add(iter, 1);&#010;@@ -525,7 +605,7 @@ TEST(ListIterator, loopAdd){&#010;   iter = list.begin();&#010;   while(iter.hasNext())&#010;   {&#010;-      iter.next(&amp;data1);&#010;+    iter.next(&amp;data1);&#010;   }&#010; &#010;   list.add(iter, 2);&#010;@@ -540,10 +620,10 @@ TEST(ListIterator, loopAdd){&#010;   capu::int32_t i = 1;&#010;   while(i &lt;= 3)&#010;   {&#010;-      EXPECT_TRUE(iter.current(&amp;data1) == capu::CAPU_OK);&#010;-      EXPECT_EQ(i, data1);&#010;-      iter.next();&#010;-      i++;&#010;+    EXPECT_TRUE(iter.current(&amp;data1) == capu::CAPU_OK);&#010;+    EXPECT_EQ(i, data1);&#010;+    iter.next();&#010;+    i++;&#010;   }&#010; &#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp?rev=1399110&amp;r1=1399109&amp;r2=1399110&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp Wed Oct 17 06:48:21 2012&#010;@@ -225,13 +225,13 @@ TEST(EtchList, find) {&#010; &#010;   //find the elements&#010;   result = list-&gt;find(data1);&#010;-  EXPECT_TRUE(result == 0);&#010;+  EXPECT_EQ(0, result);&#010; &#010;   result = list-&gt;find(data2);&#010;-  EXPECT_TRUE(result == 1);&#010;+  EXPECT_EQ(1, result);&#010; &#010;   result = list-&gt;find(data3);&#010;-  EXPECT_TRUE(result == 2);&#010;+  EXPECT_EQ(2, result);&#010; &#010;   delete list;&#010; }&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833257 - /websites/production/etch/content/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120928114923.CEC0123888CD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120928114923-CEC0123888CD@eris-apache-org%3e</id>
<updated>2012-09-28T11:49:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Fri Sep 28 11:49:23 2012&#010;New Revision: 833257&#010;&#010;Log:&#010;Updated Wireshark information on tools page. Added preference window screenshot&#010;&#010;Added:&#010;    websites/production/etch/content/&#010;      - copied from r833256, websites/staging/etch/trunk/content/&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833256 - in /websites/staging/etch/trunk/content: ./ etch/images/etch-wireshark-preferences-window.png</title>
<author><name>buildbot@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120928114753.4E43D2388A9B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120928114753-4E43D2388A9B@eris-apache-org%3e</id>
<updated>2012-09-28T11:47:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: buildbot&#010;Date: Fri Sep 28 11:47:52 2012&#010;New Revision: 833256&#010;&#010;Log:&#010;Staging update by buildbot for etch&#010;&#010;Added:&#010;    websites/staging/etch/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;  (with props)&#010;Modified:&#010;    websites/staging/etch/trunk/content/   (props changed)&#010;&#010;Propchange: websites/staging/etch/trunk/content/&#010;------------------------------------------------------------------------------&#010;--- cms:source-revision (original)&#010;+++ cms:source-revision Fri Sep 28 11:47:52 2012&#010;@@ -1 +1 @@&#010;-1391407&#010;+1391408&#010;&#010;Added: websites/staging/etch/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;==============================================================================&#010;Binary file - no diff available.&#010;&#010;Propchange: websites/staging/etch/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;------------------------------------------------------------------------------&#010;    svn:executable = *&#010;&#010;Propchange: websites/staging/etch/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;------------------------------------------------------------------------------&#010;    svn:mime-type = image/png&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1391408 - /incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120928114749.D2B7623889D7@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120928114749-D2B7623889D7@eris-apache-org%3e</id>
<updated>2012-09-28T11:47:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Fri Sep 28 11:47:49 2012&#010;New Revision: 1391408&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1391408&amp;view=rev&#010;Log:&#010;ETCH-202 Added Wireshark preference window image&#010;&#010;Added:&#010;    incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png  &#010;(with props)&#010;&#010;Added: incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;URL: http://svn.apache.org/viewvc/incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png?rev=1391408&amp;view=auto&#010;==============================================================================&#010;Files incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;(added) and incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;Fri Sep 28 11:47:49 2012 differ&#010;&#010;Propchange: incubator/etch/site/trunk/content/etch/images/etch-wireshark-preferences-window.png&#010;------------------------------------------------------------------------------&#010;    svn:executable = *&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r833255 - in /websites/staging/etch/trunk/content: ./ etch/tools.html</title>
<author><name>buildbot@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120928114648.331432388900@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120928114648-331432388900@eris-apache-org%3e</id>
<updated>2012-09-28T11:46:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: buildbot&#010;Date: Fri Sep 28 11:46:47 2012&#010;New Revision: 833255&#010;&#010;Log:&#010;Staging update by buildbot for etch&#010;&#010;Modified:&#010;    websites/staging/etch/trunk/content/   (props changed)&#010;    websites/staging/etch/trunk/content/etch/tools.html&#010;&#010;Propchange: websites/staging/etch/trunk/content/&#010;------------------------------------------------------------------------------&#010;--- cms:source-revision (original)&#010;+++ cms:source-revision Fri Sep 28 11:46:47 2012&#010;@@ -1 +1 @@&#010;-1387904&#010;+1391407&#010;&#010;Modified: websites/staging/etch/trunk/content/etch/tools.html&#010;==============================================================================&#010;--- websites/staging/etch/trunk/content/etch/tools.html (original)&#010;+++ websites/staging/etch/trunk/content/etch/tools.html Fri Sep 28 11:46:47 2012&#010;@@ -81,10 +81,9 @@&#010;   &lt;div id="content"&gt;&#010;     &lt;h1 id="tools"&gt;Tools&lt;/h1&gt;&#010; &lt;p&gt;The Apache Etch project developed also some tools to work with the Etch framework.&#010;Following you can find more about these.&lt;/p&gt;&#010;-&lt;h3 id="wireshark_etch_tracing"&gt;Wireshark Etch Tracing&lt;/h3&gt;&#010;-&lt;p&gt;The Wireshark plugin for Etch uses compiler-generated files to disassemble the wire&#010;protocol (&lt;em&gt;.ewh files). In the Wireshark Etch plugin preferences, you can specify&#010;a path to your generated &lt;/em&gt;.ewh files and you will get your specific analyzed and&#010;displayed directly in Wireshark!&lt;/p&gt;&#010;-&lt;p&gt;There is no official stable Wireshark release containing Etch yet. If you need/want&#010;Wireshark support for your project, you can use the Wireshark 1.5.0 Development Release that&#010;was released by January 24, 2011. Any more you can build the wireshark trunk yourself (instruction&#010;for this, see &lt;a href="http://www.wireshark.org/develop.html"&gt;http://www.wireshark.org/develop.html&lt;/a&gt;).&#010;&lt;br /&gt;&#010;-&lt;/p&gt;&#010;+&lt;h3 id="wireshark-etch-tracing"&gt;Wireshark Etch Tracing&lt;/h3&gt;&#010;+&lt;p&gt;The Wireshark plugin for Etch uses compiler-generated files to disassemble the wire&#010;protocol (.ewh files). In the Wireshark Etch plugin preferences (Edit -&amp;gt; Preferences&#010;-&amp;gt; Protocols -&amp;gt; Etch), you can specify a path to your generated .ewh files and&#010;you will get your specific analyzed and displayed directly in Wireshark. The plugin is available&#010;in Wireshark since version 1.5.0.&lt;/p&gt;&#010;+&lt;p&gt;&lt;img alt="Wireshark preference window for the Etch protocol" src="images/etch-wireshark-preferences-window.png"&#010;/&gt;&lt;/p&gt;&#010;   &lt;/div&gt;&#010;   &lt;div class="clear"&gt;&lt;/div&gt;&#010; &#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1391407 - /incubator/etch/site/trunk/content/etch/tools.mdtext</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120928114643.EA20223888CD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120928114643-EA20223888CD@eris-apache-org%3e</id>
<updated>2012-09-28T11:46:43Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Fri Sep 28 11:46:43 2012&#010;New Revision: 1391407&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1391407&amp;view=rev&#010;Log:&#010;ETCH-202 Updated Tools page&#010;&#010;Modified:&#010;    incubator/etch/site/trunk/content/etch/tools.mdtext&#010;&#010;Modified: incubator/etch/site/trunk/content/etch/tools.mdtext&#010;URL: http://svn.apache.org/viewvc/incubator/etch/site/trunk/content/etch/tools.mdtext?rev=1391407&amp;r1=1391406&amp;r2=1391407&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/site/trunk/content/etch/tools.mdtext (original)&#010;+++ incubator/etch/site/trunk/content/etch/tools.mdtext Fri Sep 28 11:46:43 2012&#010;@@ -4,6 +4,6 @@ The Apache Etch project developed also s&#010; &#010; ### Wireshark Etch Tracing&#010; &#010;-The Wireshark plugin for Etch uses compiler-generated files to disassemble the wire protocol&#010;(*.ewh files). In the Wireshark Etch plugin preferences, you can specify a path to your generated&#010;*.ewh files and you will get your specific analyzed and displayed directly in Wireshark!&#010;+The Wireshark plugin for Etch uses compiler-generated files to disassemble the wire protocol&#010;(.ewh files). In the Wireshark Etch plugin preferences (Edit -&gt; Preferences -&gt; Protocols&#010;-&gt; Etch), you can specify a path to your generated .ewh files and you will get your specific&#010;analyzed and displayed directly in Wireshark. The plugin is available in Wireshark since version&#010;1.5.0.&#010; &#010;-There is no official stable Wireshark release containing Etch yet. If you need/want Wireshark&#010;support for your project, you can use the Wireshark 1.5.0 Development Release that was released&#010;by January 24, 2011. Any more you can build the wireshark trunk yourself (instruction for&#010;this, see [http://www.wireshark.org/develop.html](http://www.wireshark.org/develop.html)).&#010;  &#010;+![Wireshark preference window for the Etch protocol](images/etch-wireshark-preferences-window.png)&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r832526 - /websites/production/etch/content/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120920083206.95427238896F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120920083206-95427238896F@eris-apache-org%3e</id>
<updated>2012-09-20T08:32:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Thu Sep 20 08:32:06 2012&#010;New Revision: 832526&#010;&#010;Log:&#010;Added News announcing the cpp binding alpha version&#010;&#010;Added:&#010;    websites/production/etch/content/&#010;      - copied from r832525, websites/staging/etch/trunk/content/&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r832525 - in /websites/staging/etch/trunk/content: ./ etch/index.html</title>
<author><name>buildbot@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120920083009.3A02923889BB@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120920083009-3A02923889BB@eris-apache-org%3e</id>
<updated>2012-09-20T08:30:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: buildbot&#010;Date: Thu Sep 20 08:30:08 2012&#010;New Revision: 832525&#010;&#010;Log:&#010;Staging update by buildbot for etch&#010;&#010;Modified:&#010;    websites/staging/etch/trunk/content/   (props changed)&#010;    websites/staging/etch/trunk/content/etch/index.html&#010;&#010;Propchange: websites/staging/etch/trunk/content/&#010;------------------------------------------------------------------------------&#010;--- cms:source-revision (original)&#010;+++ cms:source-revision Thu Sep 20 08:30:08 2012&#010;@@ -1 +1 @@&#010;-1326501&#010;+1387904&#010;&#010;Modified: websites/staging/etch/trunk/content/etch/index.html&#010;==============================================================================&#010;--- websites/staging/etch/trunk/content/etch/index.html (original)&#010;+++ websites/staging/etch/trunk/content/etch/index.html Thu Sep 20 08:30:08 2012&#010;@@ -79,7 +79,7 @@&#010; &lt;/ul&gt;&#010;   &lt;/div&gt;  &#010;   &lt;div id="content"&gt;&#010;-    &lt;h1 id="welcome_to_apache_incubator_etch"&gt;Welcome to Apache Incubator Etch&lt;/h1&gt;&#010;+    &lt;h1 id="welcome-to-apache-incubator-etch"&gt;Welcome to Apache Incubator Etch&lt;/h1&gt;&#010; &lt;p&gt;Etch is a cross-platform, language- and transport-independent framework for building&#010;&#010; and consuming network services. The Etch toolset includes a network service description &#010; language, a compiler, and binding libraries for a variety of programming languages. &#010;@@ -102,6 +102,11 @@ difficult than library development and c&#010; &lt;h2 id="news"&gt;News&lt;/h2&gt;&#010; &lt;ul&gt;&#010; &lt;li&gt;&#010;+&lt;p&gt;&lt;em&gt;Etch C++ Binding alpha version&lt;/em&gt;&lt;br/&gt;&#010;+  The Apache Etch team has been working on the C++ Binding for the last few months. Now we&#010;are happy to announce that a first working alpha version is now available in the &lt;a href="sources.html"&gt;SVN&#010;repository&lt;/a&gt;. Check it out! &#010;+  For bug reports or feature request please refer to our &lt;a href="issue-tracking.html"&gt;BugTracker&lt;/a&gt;.&lt;/p&gt;&#010;+&lt;/li&gt;&#010;+&lt;li&gt;&#010; &lt;p&gt;&lt;em&gt;Apache Incubator Etch 1.2.0&lt;/em&gt;&lt;br /&gt;&#010;   The Apache Etch development team is really pleased to announce the new stable build &lt;a&#010;href="downloads.html"&gt;Apache Etch 1.2.0-incubating&lt;/a&gt;.&lt;br /&gt;&#010;   (2012-01-03) &lt;br /&gt;&#010;@@ -114,7 +119,7 @@ difficult than library development and c&#010; &lt;/p&gt;&#010; &lt;/li&gt;&#010; &lt;/ul&gt;&#010;-&lt;h2 id="project_status"&gt;Project Status&lt;/h2&gt;&#010;+&lt;h2 id="project-status"&gt;Project Status&lt;/h2&gt;&#010; &lt;p&gt;The Apache Incubator Etch project is permanently in progress. The latest stable&#010;version can be downloaded &lt;a href="downloads.html"&gt;here&lt;/a&gt;. The language bindings&#010;are currently in different states:&lt;/p&gt;&#010; &lt;ul&gt;&#010; &lt;li&gt;Java - stable&lt;/li&gt;&#010;@@ -124,7 +129,7 @@ difficult than library development and c&#010; &lt;li&gt;Javascript - alpha&lt;/li&gt;&#010; &lt;li&gt;Python - alpha&lt;/li&gt;&#010; &lt;/ul&gt;&#010;-&lt;h2 id="incubator_status"&gt;Incubator Status&lt;/h2&gt;&#010;+&lt;h2 id="incubator-status"&gt;Incubator Status&lt;/h2&gt;&#010; &lt;p&gt;Apache Etch is an effort undergoing incubation at The Apache Software Foundation&#010;(ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects&#010;until a further review indicates that the infrastructure, communications, and decision making&#010;process have stabilized in a manner consistent with other successful ASF projects. While incubation&#010;status is not necessarily a reflection of the completeness or stability of the code, it does&#010;indicate that the project has yet to be fully endorsed by the ASF.&lt;/p&gt;&#010;   &lt;/div&gt;&#010;   &lt;div class="clear"&gt;&lt;/div&gt;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1387904 - /incubator/etch/site/trunk/content/etch/index.mdtext</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120920083005.C3912238896F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120920083005-C3912238896F@eris-apache-org%3e</id>
<updated>2012-09-20T08:30:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Thu Sep 20 08:30:04 2012&#010;New Revision: 1387904&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1387904&amp;view=rev&#010;Log:&#010;ETCH-202 Added News for cpp binding alpha version&#010;&#010;Modified:&#010;    incubator/etch/site/trunk/content/etch/index.mdtext&#010;&#010;Modified: incubator/etch/site/trunk/content/etch/index.mdtext&#010;URL: http://svn.apache.org/viewvc/incubator/etch/site/trunk/content/etch/index.mdtext?rev=1387904&amp;r1=1387903&amp;r2=1387904&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/site/trunk/content/etch/index.mdtext (original)&#010;+++ incubator/etch/site/trunk/content/etch/index.mdtext Thu Sep 20 08:30:04 2012&#010;@@ -39,6 +39,10 @@ Etch was started because we wanted to ha&#010; &#010; ## News&#010; &#010;+* *Etch C++ Binding alpha version*&lt;br/&gt;&#010;+  The Apache Etch team has been working on the C++ Binding for the last few months. Now we&#010;are happy to announce that a first working alpha version is now available in the [SVN repository](sources.html).&#010;Check it out! &#010;+  For bug reports or feature request please refer to our [BugTracker](issue-tracking.html).&#010;+&#010; * *Apache Incubator Etch 1.2.0*  &#010;   The Apache Etch development team is really pleased to announce the new stable build [Apache&#010;Etch 1.2.0-incubating](downloads.html).  &#010;   (2012-01-03)   &#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r832524 - /websites/production/etch/content/</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201209.mbox/%3c20120920082909.D0ACA23889BB@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120920082909-D0ACA23889BB@eris-apache-org%3e</id>
<updated>2012-09-20T08:29:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Thu Sep 20 08:29:09 2012&#010;New Revision: 832524&#010;&#010;Log:&#010;Added notes for building the c/cpp bindings on a Linux 64bit system&#010;&#010;Added:&#010;    websites/production/etch/content/&#010;      - copied from r832523, websites/staging/etch/trunk/content/&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1376589 - in /incubator/etch/trunk: binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ binding-cpp/runtime/src/main/support/ binding-cpp/runtime/src/main/transport/ binding-cpp/runtime/src/test/transport/ exampl...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201208.mbox/%3c20120823164831.2E54C2388A38@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120823164831-2E54C2388A38@eris-apache-org%3e</id>
<updated>2012-08-23T16:48:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Thu Aug 23 16:48:30 2012&#010;New Revision: 1376589&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1376589&amp;view=rev&#010;Log:&#010;ETCH-216 Small improvement in TcpConnection&#010;&#010;Avoiding QNX Sockets to fail while setting properties&#010;Fixed small bugs in code generation&#010;&#010;Change-Id: I2fe3a9dcae70525544f774f7ffc07facae9234fb&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp&#010;    incubator/etch/trunk/examples/helloworld/cpp/build.xml&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm?rev=1376589&amp;r1=1376588&amp;r2=1376589&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;Thu Aug 23 16:48:30 2012&#010;@@ -182,6 +182,7 @@ status_t $clname::newListener(EtchRuntim&#010;     &#010;     //create valuefactory instance&#010;     ValueFactory${i}* vf = new ValueFactory${i}(uri);&#010;+    stack-&gt;setValueFactory(vf);&#010;     EtchObject* vfobj = (EtchObject*) vf;&#010;     EtchObject* resobj = NULL;&#010;     res-&gt;put(EtchTransport&lt;ValueFactory${i}&gt;::VALUE_FACTORY(), vfobj, resobj);&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp?rev=1376589&amp;r1=1376588&amp;r2=1376589&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp Thu Aug 23 16:48:30&#010;2012&#010;@@ -33,6 +33,7 @@ EtchStack::EtchStack() : EtchObject()&#010;   , mTransportPacket(NULL)&#010;   , mTransportMessage(NULL)&#010;   , mResources(NULL)&#010;+  , mValueFactory(NULL)&#010;   , mMailboxManager(NULL)&#010;   , mDeliveryService(NULL)&#010;   , mStub(NULL)&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp?rev=1376589&amp;r1=1376588&amp;r2=1376589&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp Thu&#010;Aug 23 16:48:30 2012&#010;@@ -257,46 +257,49 @@ capu::bool_t EtchTcpConnection::isStarte&#010; &#010; void EtchTcpConnection::run() {&#010; &#010;+  status_t status;&#010;   capu::bool_t first = true;&#010; &#010;   while (mIsStarted) {&#010; &#010;-    if (openSocket(!first) != ETCH_OK) {&#010;+    status = openSocket(!first);&#010;+    if (status != ETCH_OK) {&#010;       CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Socket&#010;has not been successfully opened", mHost.c_str(), mPort);&#010;       break;&#010;     }&#010;-    status_t res = setupSocket();&#010; &#010;-    if (res != ETCH_OK) {&#010;+    status = setupSocket();&#010;+    if (status != ETCH_OK) {&#010;       close();&#010;       break;&#010;     }&#010;     CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Socket has&#010;been opened and connection has been successfully established and start reading", mHost.c_str(),&#010;mPort);&#010;     fireUp();&#010;     CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; FireUp was&#010;send to the Stack", mHost.c_str(), mPort);&#010;-    if (readSocket() != ETCH_OK) {&#010;-      close();&#010;-      CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Connection&#010;closing", mHost.c_str(), mPort);&#010;-      break;&#010;-    }&#010;+    status = readSocket();&#010;     CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Connection&#010;closing", mHost.c_str(), mPort);&#010;     fireDown();&#010;     CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; FireDown&#010;was send to the Stack", mHost.c_str(), mPort);&#010;     close();&#010;     first = false;&#010;   }&#010;-  mIsStarted = false;&#010; }&#010; &#010; status_t EtchTcpConnection::setupSocket() {&#010;-  if (mSocket-&gt;setBufferSize(mOptions.getBufferSize()) != ETCH_OK)&#010;-    return ETCH_ERROR;&#010;-  if (mSocket-&gt;setKeepAlive((mOptions.getKeepAlive() != 0)) != ETCH_OK)&#010;+  if (mOptions.getBufferSize() != 0) {&#010;+    if (mSocket-&gt;setBufferSize(mOptions.getBufferSize()) != ETCH_OK) {&#010;+      return ETCH_ERROR;&#010;+    }&#010;+  }&#010;+  if (mSocket-&gt;setKeepAlive((mOptions.getKeepAlive() != 0)) != ETCH_OK) {&#010;     return ETCH_ERROR;&#010;-  if (mSocket-&gt;setLingerOption((mOptions.getLingerTime() &gt;= 0), mOptions.getLingerTime())&#010;!= ETCH_OK)&#010;+  }&#010;+  if (mSocket-&gt;setLingerOption((mOptions.getLingerTime() &gt;= 0), mOptions.getLingerTime())&#010;!= ETCH_OK) {&#010;     return ETCH_ERROR;&#010;-  if (mSocket-&gt;setNoDelay((mOptions.getNoDelay() != 0)) != ETCH_OK)&#010;+  }&#010;+  if (mSocket-&gt;setNoDelay((mOptions.getNoDelay() != 0)) != ETCH_OK) {&#010;     return ETCH_ERROR;&#010;+  }&#010;   CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Settings for&#010;socket has been successfully configured", mHost.c_str(), mPort);&#010;   return ETCH_OK;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp?rev=1376589&amp;r1=1376588&amp;r2=1376589&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;Thu Aug 23 16:48:30 2012&#010;@@ -65,7 +65,7 @@ status_t EtchTcpTransportFactory::newTra&#010;     return ETCH_EUNIMPL;&#010;   } else {&#010;     // TODO add runtime&#010;-    c = new EtchTcpConnection(NULL, (EtchSocket*) socket, &amp;u);&#010;+    c = new EtchTcpConnection(mRuntime, (EtchSocket*) socket, &amp;u);&#010;   }&#010;   stack-&gt;setTransportData(c);&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp?rev=1376589&amp;r1=1376588&amp;r2=1376589&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp&#010;Thu Aug 23 16:48:30 2012&#010;@@ -50,18 +50,22 @@ public:&#010; &#010; class MockListener : public virtual EtchSessionListener&lt;EtchSocket&gt; {&#010; public:&#010;+  MockListener() : socket(NULL) {}&#010; &#010;-  //Communication Test Between Peers&#010;+  ~MockListener() {&#010;+    delete socket;&#010;+  }&#010; &#010;   EtchResources resources;&#010;+  EtchSocket* socket;&#010; &#010;+  //Communication Test Between Peers&#010;   status_t sessionAccepted(EtchSocket* connection) {&#010;     EtchString _socket("socket");&#010;     EtchObject *tmp;&#010;     resources.put(_socket, connection, tmp);&#010;     connection-&gt;send((unsigned char *) "mock", 4);&#010;-    capu::Thread::Sleep(1000);&#010;-    delete connection;&#010;+    socket = connection;&#010;     return ETCH_OK;&#010;   }&#010; &#010;@@ -113,15 +117,15 @@ TEST_F(EtchTcpConnectionTest, isStartedT&#010;   EtchSessionData* mPacketizer = new MockPacketizer();&#010;   //START THE LISTENER&#010;   listener-&gt;setSession(mSessionListener);&#010;-  listener-&gt;transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new&#010;EtchInt32(2000));&#010;+  EXPECT_EQ(ETCH_OK, listener-&gt;transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()),&#010;new EtchInt32(400000)));&#010;   //START THE TRANSPORT&#010;   conn-&gt;setSession(mPacketizer);&#010;-  conn-&gt;transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP()), new EtchInt32(2000));&#010;+  EXPECT_EQ(ETCH_OK, conn-&gt;transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP()),&#010;new EtchInt32(400000)));&#010;   EXPECT_TRUE(conn-&gt;isStarted());&#010;   //STOP THE TRANSPORT&#010;-  conn-&gt;transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(2000));&#010;+  EXPECT_EQ(ETCH_OK, conn-&gt;transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN()),&#010;new EtchInt32(400000)));&#010;   //STOP THE LISTENER&#010;-  listener-&gt;transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(2000));&#010;+  EXPECT_EQ(ETCH_OK, listener-&gt;transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()),&#010;new EtchInt32(400000)));&#010;   EXPECT_FALSE(conn-&gt;isStarted());&#010;   conn-&gt;setSession(NULL);&#010; &#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/cpp/build.xml&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/cpp/build.xml?rev=1376589&amp;r1=1376588&amp;r2=1376589&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/cpp/build.xml (original)&#010;+++ incubator/etch/trunk/examples/helloworld/cpp/build.xml Thu Aug 23 16:48:30 2012&#010;@@ -95,7 +95,7 @@&#010; &#010;    &lt;target name="build-cpp" depends="generate-sources" if="USE.cmake"&gt;&#010;      &lt;cmake srcdir="${basedir}" bindir="${basedir}/target" buildtype="Debug" &gt;&#010;-&#009;  &lt;generator name="Visual Studio 8 2005" platform="windows" /&gt;&#010;+     &lt;!-- &lt;generator name="Visual Studio 8 2005" platform="windows" /&gt;--&gt;&#010;       &lt;variable name="ETCH_INCLUDE_CAPU_DIR" type="PATH" value="${Etch.basedir}/binding-cpp/runtime/lib/capu/deliverable/capu/include/capu"&#010;/&gt;&#010;       &lt;variable name="ETCH_HOME" type="PATH" value="${etch.home}" /&gt;&#010;      &lt;/cmake&gt;&#010;@@ -103,14 +103,10 @@&#010;         &lt;fileset dir="${target}" &gt;&#010;            &lt;include name="helloworld-client" /&gt;&#010;            &lt;include name="helloworld-server" /&gt;&#010;-           &lt;include name="debug/helloworld-client.exe" /&gt;&#010;-           &lt;include name="debug/helloworld-server.exe" /&gt;&#010;+           &lt;include name="Debug/helloworld-client.exe" /&gt;&#010;+           &lt;include name="Debug/helloworld-server.exe" /&gt;&#010;         &lt;/fileset&gt;&#010;      &lt;/copy&gt;&#010;-     &lt;delete file="${target}/helloworld-client" quiet="true" /&gt;&#010;-     &lt;delete file="${target}/helloworld-server" quiet="true" /&gt;&#010;-     &lt;delete file="${target}/debug/helloworld-client.exe" quiet="true" /&gt;&#010;-     &lt;delete file="${target}/debug/helloworld-server.exe" quiet="true" /&gt;&#010;      &lt;chmod perm="+x"&gt;&#010;         &lt;fileset dir="${bin}"&gt;&#010;            &lt;include name="helloworld-client" /&gt;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1376588 [2/2] - in /incubator/etch/trunk: binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/ binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ binding-cpp/runtime/include/common/ binding-...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201208.mbox/%3c20120823164820.D5A2723889D5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120823164820-D5A2723889D5@eris-apache-org%3e</id>
<updated>2012-08-23T16:48:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;Thu Aug 23 16:48:16 2012&#010;@@ -15,6 +15,8 @@&#010;  * See the License for the specific language governing permissions and&#010;  * limitations under the License.&#010;  */&#010;+#include "support/EtchTransportHelper.h"&#010;+#include "support/EtchStackServer.h"&#010; #include "transport/EtchTcpTransportFactory.h"&#010; &#010; static const char* TAG = "EtchTcpTransportFactory";&#010;@@ -39,9 +41,20 @@ EtchTcpTransportFactory::~EtchTcpTranspo&#010; }&#010; &#010; status_t EtchTcpTransportFactory::newTransport(EtchString uri, EtchResources* resources,&#010;EtchTransportMessage*&amp; result) {&#010;+  status_t status;&#010;+&#010;+  if (resources == NULL) {&#010;+    return ETCH_ERROR;&#010;+  }&#010;+&#010;+  EtchStack* stack = NULL;&#010;+  status = resources-&gt;get(EtchStack::STACK(), (EtchObject*&amp;)stack);&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+&#010;   EtchURL u(uri);&#010; &#010;-  status_t status;&#010;   EtchObject* socket = NULL;&#010;   status = resources-&gt;get(SOCKET(), socket);&#010; &#010;@@ -54,22 +67,20 @@ status_t EtchTcpTransportFactory::newTra&#010;     // TODO add runtime&#010;     c = new EtchTcpConnection(NULL, (EtchSocket*) socket, &amp;u);&#010;   }&#010;+  stack-&gt;setTransportData(c);&#010; &#010;   EtchTransportPacket* p = new EtchPacketizer(c, &amp;u);&#010;+  stack-&gt;setTransportPacket(p);&#010; &#010;   EtchTransportMessage* m = new EtchMessagizer(p, &amp;u, resources);&#010;+  stack-&gt;setTransportMessage(m);&#010; &#010;   //TODO: ADD FILTERS HERE&#010; &#010;   EtchObject* obj = NULL;&#010; &#010;   if (resources-&gt;get(EtchTransport&lt;EtchSocket&gt;::VALUE_FACTORY(), obj) != ETCH_OK)&#010;{&#010;-    c-&gt;setSession(NULL);&#010;-    p-&gt;setSession(NULL);&#010;-    m-&gt;setSession(NULL);&#010;-    delete c;&#010;-    delete p;&#010;-    delete m;&#010;+    delete stack;&#010;     return ETCH_ENOT_EXIST;&#010;   }&#010;   EtchValueFactory *vf = (EtchValueFactory*) obj;&#010;@@ -90,18 +101,19 @@ status_t EtchTcpTransportFactory::newLis&#010;     l = new EtchTcpListener(&amp;u);&#010;   }&#010; &#010;-  result = new MySessionListener(mRuntime, l, uri, resources, mIsSecure);&#010;+  result = new MySessionListener(mRuntime, this, l, uri, resources, mIsSecure);&#010;   if (result == NULL) {&#010;     return ETCH_ERROR;&#010;   }&#010;   return ETCH_OK;&#010; }&#010; &#010;-EtchTcpTransportFactory::MySessionListener::MySessionListener(EtchRuntime* runtime, EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt;&#010;&gt; *transport, EtchString uri, EtchResources* resources, capu::bool_t secure)&#010;-: mRuntime(runtime), mTransport(transport), mUri(uri), mResources(resources), mIsSecure(secure)&#010;{&#010;+EtchTcpTransportFactory::MySessionListener::MySessionListener(EtchRuntime* runtime, EtchTcpTransportFactory*&#010;factory, EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt; *transport, EtchString&#010;uri, EtchResources* resources, capu::bool_t secure)&#010;+: mRuntime(runtime), mFactory(factory), mTransport(transport), mUri(uri), mResources(resources),&#010;mIsSecure(secure) {&#010;   if (mTransport != NULL) {&#010;     mTransport-&gt;setSession(this);&#010;   }&#010;+  mConnectionStacks = new capu::List&lt;EtchStack*&gt;();&#010; }&#010; &#010; EtchServerFactory* EtchTcpTransportFactory::MySessionListener::getSession() {&#010;@@ -112,6 +124,22 @@ EtchTcpTransportFactory::MySessionListen&#010;   if(mTransport != NULL) {&#010;     delete mTransport;&#010;   }&#010;+  if(mFactory != NULL) {&#010;+    delete mFactory;&#010;+  }&#010;+  if (mResources != NULL) {&#010;+    EtchTransportHelper::DestroyResources(mResources);&#010;+  }&#010;+&#010;+  capu::List&lt;EtchStack*&gt;::Iterator it = mConnectionStacks-&gt;begin();&#010;+  while (it.hasNext()) {&#010;+    EtchStack* st = NULL;&#010;+    it.next(&amp;st);&#010;+    if (st != NULL) {&#010;+      delete st;&#010;+    }&#010;+  }&#010;+  delete mConnectionStacks;&#010; }&#010; &#010; void EtchTcpTransportFactory::MySessionListener::setSession(EtchServerFactory* session) {&#010;@@ -139,7 +167,30 @@ status_t EtchTcpTransportFactory::MySess&#010; }&#010; &#010; status_t EtchTcpTransportFactory::MySessionListener::sessionNotify(capu::SmartPointer&lt;EtchObject&gt;&#010;event) {&#010;+  if (event-&gt;equals(&amp;EtchTcpListener::CONNECTION_CHECK())) {&#010;+    //go through the list of connection and check if the connection is still dead and we&#010;have to clean the stack up &#010;+    capu::List&lt;EtchStack*&gt;::Iterator it = mConnectionStacks-&gt;begin();&#010;+    while (it.hasNext()) {&#010;+      EtchStack* stack = NULL;&#010;+      status_t res = it.current(&amp;stack);&#010;+      if (res == ETCH_OK) {&#010;+        EtchTcpConnection* con = (EtchTcpConnection*) stack-&gt;getTransportData();&#010;+        if (con != NULL) {&#010;+          if (!con-&gt;isStarted()) {&#010;+            //delete all instances for this stack&#010;+            delete stack;&#010;+            //remote stack from list&#010;+            mConnectionStacks-&gt;removeAt(it);&#010;+          }&#010;+        }&#010;+      }&#010;+      it.next();&#010;+    }&#010;+    return ETCH_OK;&#010;+  }&#010;+&#010;   return mSession-&gt;sessionNotify(event);&#010;+  &#010; }&#010; &#010; status_t EtchTcpTransportFactory::MySessionListener::sessionAccepted(EtchSocket* connection)&#010;{&#010;@@ -147,60 +198,56 @@ status_t EtchTcpTransportFactory::MySess&#010;     return ETCH_ERROR;&#010;   }&#010; &#010;+  status_t status;&#010;+&#010;+  EtchStackServer *stack = new EtchStackServer();&#010;+&#010;   EtchResources *res = new EtchResources(mResources);&#010;+  stack-&gt;setResources(res);&#010; &#010;   // put socket to the resources&#010;   EtchObject *obj = NULL;&#010;-  if (res-&gt;put(SOCKET(), connection, obj) != ETCH_OK) {&#010;-    delete res;&#010;+  status = res-&gt;put(SOCKET(), connection, obj);&#010;+  if (status != ETCH_OK) {&#010;+    delete stack;&#010;     return ETCH_ERROR;&#010;   }&#010; &#010;   // create value vatory and put it to the resources&#010;   EtchValueFactory* vf = NULL;&#010;-  if(mSession-&gt;newValueFactory(mUri, vf) != ETCH_OK) {&#010;-    delete res;&#010;+  status = mSession-&gt;newValueFactory(mUri, vf);&#010;+  if(status != ETCH_OK) {&#010;+    delete stack;&#010;     return ETCH_ERROR;&#010;   }&#010;-  if(res-&gt;put(EtchTransport&lt;EtchSocket&gt;::VALUE_FACTORY(), vf, obj) != ETCH_OK)&#010;-  {&#010;-    delete vf;&#010;-    delete res;&#010;+  stack-&gt;setValueFactory(vf);&#010;+&#010;+  status = res-&gt;put(EtchTransport&lt;EtchSocket&gt;::VALUE_FACTORY(), vf, obj);&#010;+  if(status != ETCH_OK) {&#010;+    delete stack;&#010;     return ETCH_ERROR;&#010;   }&#010; &#010;-  EtchURL u = EtchURL(mUri);&#010;-&#010;-  EtchObject* socket = NULL;&#010;-  if (res-&gt;get(SOCKET(), socket) != ETCH_OK) {&#010;-    return ETCH_ENOT_EXIST;&#010;+  EtchObject* old = NULL;&#010;+  status = res-&gt;put(EtchStack::STACK(), stack, old);&#010;+  if (status != ETCH_OK) {&#010;+    delete stack;&#010;+    return ETCH_ERROR;&#010;   }&#010;-  // TODO check if we should register a new stack to the runtime&#010;-  &#010;-  EtchTransportData *c = NULL;&#010;-  if (mIsSecure) {&#010;-    //TODO : secure communication via ssl sockets&#010;-    return ETCH_EUNIMPL;&#010;-  } else {&#010;-    c = new EtchTcpConnection(mRuntime, (EtchSocket*) socket, &amp;u);&#010;+  if (old != NULL) {&#010;+    delete old;&#010;   }&#010; &#010;-  EtchTransportPacket* p = new EtchPacketizer(c, &amp;u);&#010;+  //add stack container to list&#010;+  mConnectionStacks-&gt;add(stack);&#010; &#010;-  EtchTransportMessage* m = new EtchMessagizer(p, &amp;u, res);&#010;-&#010;-  //TODO: ADD FILTERS HERE&#010;-&#010;-  if (res-&gt;get(EtchTransport&lt;EtchSocket&gt;::VALUE_FACTORY(), obj) != ETCH_OK) {&#010;-    c-&gt;setSession(NULL);&#010;-    p-&gt;setSession(NULL);&#010;-    m-&gt;setSession(NULL);&#010;-    delete c;&#010;-    delete p;&#010;-    delete m;&#010;-    return ETCH_ENOT_EXIST;&#010;+  EtchTransportMessage *m = NULL;&#010;+  status = mFactory-&gt;newTransport(mUri, res, m);&#010;+  if (status != ETCH_OK) {&#010;+    delete stack;&#010;+    return status;&#010;   }&#010;-  vf-&gt;lockDynamicTypes();&#010;   CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), TAG, "New stack for the accepted connection has&#010;been created");&#010;+&#010;   return mSession-&gt;newServer(mRuntime, m, mUri, res);&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTransportFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTransportFactory.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTransportFactory.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTransportFactory.cpp Thu&#010;Aug 23 16:48:16 2012&#010;@@ -61,7 +61,7 @@ status_t EtchTransportFactory::getListen&#010;   }&#010; &#010;   status_t ret = f-&gt;newListener(uri, resources, result);&#010;-  delete f;&#010;+&#010;   return ret;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchClass2TypeMapTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchClass2TypeMapTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchClass2TypeMapTest.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchClass2TypeMapTest.cpp&#010;Thu Aug 23 16:48:16 2012&#010;@@ -68,17 +68,12 @@ TEST(EtchClass2TypeMapTest, putTest) {&#010;   //Try to add existing field&#010;   EXPECT_EQ(ETCH_OK, test-&gt;put(EtchString::TYPE(), type));&#010; &#010;-  //Try to add a new field&#010;-  EtchType* type2 = new EtchType(EtchString("string2"));&#010;-  EXPECT_EQ(ETCH_ERANGE, test-&gt;put(EtchString::TYPE(), type2));&#010;-&#010;   //lock the collection&#010;   test-&gt;lock();&#010;   //try to add new field&#010;   EXPECT_EQ(ETCH_EINVAL, test-&gt;put(EtchString::TYPE(), type));&#010;   delete test;&#010;   delete type;&#010;-  delete type2;&#010; }&#010; &#010; TEST(EtchClass2TypeMapTest, lockTest) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp&#010;Thu Aug 23 16:48:16 2012&#010;@@ -20,7 +20,29 @@&#010; #include "serialization/EtchValidatorString.h"&#010; #include "serialization/EtchValidatorInt.h"&#010; &#010;-TEST(EtchComboValidatorTest, createTest) {&#010;+class EtchComboValidatorTest&#010;+  : public ::testing::Test {&#010;+protected:&#010;+  virtual void SetUp() {&#010;+    mRuntime = new EtchRuntime();&#010;+    mRuntime-&gt;setLogger(new EtchLogger());&#010;+    mRuntime-&gt;start();&#010;+  }&#010;+&#010;+  virtual void TearDown() {&#010;+    mRuntime-&gt;shutdown();&#010;+    EtchLogger* logger = mRuntime-&gt;getLogger();&#010;+    if(logger != NULL) {&#010;+      delete logger;&#010;+    }&#010;+    delete mRuntime;&#010;+    mRuntime = NULL;&#010;+  }&#010;+&#010;+  EtchRuntime* mRuntime;&#010;+};&#010;+&#010;+TEST_F(EtchComboValidatorTest, createTest) {&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr2;&#010; &#010;@@ -32,7 +54,7 @@ TEST(EtchComboValidatorTest, createTest)&#010;   delete combo;&#010; }&#010; &#010;-TEST(EtchComboValidatorTest, validateTest) {&#010;+TEST_F(EtchComboValidatorTest, validateTest) {&#010;   capu::SmartPointer&lt;EtchObject&gt; byte = NULL;&#010; &#010;   capu::SmartPointer&lt;EtchObject&gt; integer = new EtchInt32(capu::NumericLimitMin&lt;capu::int32_t&gt;());&#010;@@ -92,7 +114,7 @@ TEST(EtchComboValidatorTest, validateTes&#010;   delete ptr;&#010; }&#010; &#010;-TEST(EtchComboValidatorTest, validateValueTest) {&#010;+TEST_F(EtchComboValidatorTest, validateValueTest) {&#010; &#010;   capu::SmartPointer&lt;EtchObject&gt; byte = NULL;&#010;   capu::SmartPointer&lt;EtchObject&gt; result = NULL;&#010;@@ -127,7 +149,7 @@ TEST(EtchComboValidatorTest, validateVal&#010;   delete ptr;&#010; }&#010; &#010;-TEST(EtchComboValidatorTest, elementValidatorTest) {&#010;+TEST_F(EtchComboValidatorTest, elementValidatorTest) {&#010;   //create combo validator&#010;   EtchComboValidator *ptr = NULL;&#010;   capu::SmartPointer&lt;EtchValidator&gt; ptr1;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeMapTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeMapTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeMapTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeMapTest.cpp Thu&#010;Aug 23 16:48:16 2012&#010;@@ -41,7 +41,6 @@ TEST(EtchTypeMapTest, addTest) {&#010;   test-&gt;lock();&#010;   //try to add new type&#010;   EXPECT_EQ(ETCH_EINVAL, test-&gt;add(type));&#010;-  delete type;&#010;   delete test;&#010; }&#010; &#010;@@ -81,8 +80,6 @@ TEST(EtchTypeMapTest, getTest) {&#010;   EXPECT_EQ(ETCH_OK, test-&gt;get("testtype2", tmp1));&#010; &#010;   delete test;&#010;-  delete type;&#010;-  delete tmp1;&#010; }&#010; &#010; TEST(EtchTypeMapTest, sizeTest) {&#010;@@ -101,7 +98,6 @@ TEST(EtchTypeMapTest, sizeTest) {&#010;   //check size&#010;   EXPECT_EQ(1, test-&gt;size());&#010;   delete test;&#010;-  delete type;&#010; }&#010; &#010; TEST(EtchTypeMapTest, lockTest) {&#010;@@ -122,7 +118,6 @@ TEST(EtchTypeMapTest, lockTest) {&#010;   //check size again&#010;   EXPECT_EQ(1, test-&gt;size());&#010;   delete test;&#010;-  delete type;&#010; }&#010; &#010; TEST(EtchTypeMapTest, getAllTest) {&#010;@@ -149,5 +144,4 @@ TEST(EtchTypeMapTest, getAllTest) {&#010;   }&#010; &#010;   delete test;&#010;-  delete type;&#010; }&#010;\ No newline at end of file&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp Thu Aug&#010;23 16:48:16 2012&#010;@@ -129,13 +129,15 @@ TEST_F(EtchRemoteBaseTest, constructorTe&#010;   EtchDeliveryService * service = NULL;&#010;   service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory);&#010;+  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;   service-&gt;setSession(&amp;session);&#010; &#010;   delete remote;&#010;+  delete transport;&#010;+  delete manager;&#010;   delete service;&#010;   delete factory;&#010; }&#010;@@ -154,7 +156,7 @@ TEST_F(EtchRemoteBaseTest, newMessageTes&#010;   EtchDeliveryService * service = NULL;&#010;   service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory);&#010;+  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -173,7 +175,9 @@ TEST_F(EtchRemoteBaseTest, newMessageTes&#010;   //check the assigned factory&#010;   EXPECT_TRUE(factory-&gt;factory == msg-&gt;getValueFactory());&#010; &#010;+  delete transport;&#010;   delete remote;&#010;+  delete manager;&#010;   delete service;&#010;   delete factory;&#010; }&#010;@@ -192,7 +196,7 @@ TEST_F(EtchRemoteBaseTest, sendTest) {&#010;   EtchDeliveryService * service = NULL;&#010;   service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory);&#010;+  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -215,7 +219,10 @@ TEST_F(EtchRemoteBaseTest, sendTest) {&#010;   EXPECT_TRUE(remote-&gt;send(msg) == ETCH_OK);&#010; &#010;   factory-&gt;types.clear();&#010;+&#010;+  delete transport;&#010;   delete remote;&#010;+  delete manager;&#010;   delete service;&#010;   delete factory;&#010; }&#010;@@ -234,7 +241,7 @@ TEST_F(EtchRemoteBaseTest, beginCallTest&#010;   EtchDeliveryService * service = NULL;&#010;   service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory);&#010;+  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -262,7 +269,10 @@ TEST_F(EtchRemoteBaseTest, beginCallTest&#010;   EXPECT_TRUE(mail != NULL);&#010; &#010;   factory-&gt;types.clear();&#010;+&#010;+  delete transport;&#010;   delete remote;&#010;+  delete manager;&#010;   delete service;&#010;   delete factory;&#010; }&#010;@@ -281,7 +291,7 @@ TEST_F(EtchRemoteBaseTest, endCallTest) &#010;   EtchDeliveryService * service = NULL;&#010;   service = new EtchDefaultDeliveryService(manager, &amp;u);&#010;   EtchRemoteBase * remote = NULL;&#010;-  remote = new EtchRemoteBase(service, factory-&gt;factory);&#010;+  remote = new EtchRemoteBase(service, factory-&gt;factory, NULL);&#010; &#010;   EXPECT_TRUE(remote != NULL);&#010;   manager-&gt;setSession(service);&#010;@@ -331,8 +341,11 @@ TEST_F(EtchRemoteBaseTest, endCallTest) &#010;   EXPECT_TRUE(result == data);&#010; &#010;   factory-&gt;types.clear();&#010;+  &#010;+  delete transport;&#010;   delete mail;&#010;   delete remote;&#010;+  delete manager;&#010;   delete service;&#010;   delete factory;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp&#010;Thu Aug 23 16:48:16 2012&#010;@@ -142,6 +142,8 @@ TEST_F(EtchDefaultDeliveryServiceTest, c&#010;   // create mock layer for session&#010;   MockSession1* session = new MockSession1(deliveryService);&#010; &#010;+  delete transport;&#010;+  delete mailboxManager;&#010;   delete session;&#010; }&#010; &#010;@@ -190,6 +192,8 @@ TEST_F(EtchDefaultDeliveryServiceTest, b&#010;   //put the stack down&#010;   mailboxManager-&gt;sessionNotify(new EtchString(EtchSession::DOWN()));&#010; &#010;+  delete transport;&#010;+  delete mailboxManager;&#010;   delete session;&#010;   delete factory;&#010; }&#010;@@ -264,6 +268,8 @@ TEST_F(EtchDefaultDeliveryServiceTest, e&#010;   //check the result&#010;   EXPECT_TRUE(result-&gt;equals(data.get()));&#010; &#010;+  delete transport;&#010;+  delete mailboxManager;&#010;   delete session;&#010;   delete factory;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp Thu&#010;Aug 23 16:48:16 2012&#010;@@ -1,35 +1,35 @@&#010;-/* $Id$&#010;- * Licensed to the Apache Software Foundation (ASF) under one or more&#010;- * contributor license agreements. See the NOTICE file distributed with&#010;- * this work for additional information regarding copyright ownership.&#010;- * The ASF licenses this file to you under the Apache License, Version&#010;- * 2.0 (the "License"); you may not use this file except in compliance&#010;- * with the License. You may obtain a copy of the License at&#010;- *&#010;- * http://www.apache.org/licenses/LICENSE-2.0&#010;- *&#010;- * Unless required by applicable law or agreed to in writing, software&#010;- * distributed under the License is distributed on an "AS IS" BASIS,&#010;- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;- * See the License for the specific language governing permissions and&#010;- * limitations under the License.&#010;- */&#010;-#include &lt;gtest/gtest.h&gt;&#010;-#include &lt;gmock/gmock.h&gt;&#010;-#include "serialization/EtchDefaultValueFactory.h"&#010;-#include "serialization/EtchBinaryTaggedData.h"&#010;-#include "serialization/EtchBinaryTaggedDataInput.h"&#010;-#include "serialization/EtchValidatorShort.h"&#010;-#include "transport/EtchMessagizer.h"&#010;-#include "transport/EtchTcpConnection.h"&#010;-#include "transport/EtchPacketizer.h"&#010;-#include "transport/EtchSessionListener.h"&#010;-#include "transport/EtchTcpListener.h"&#010;-&#010;-&#010;-class MockListener11 : public virtual EtchSessionListener&lt;EtchSocket&gt; {&#010;-public:&#010;-&#010;+/* $Id$&#010;+ * Licensed to the Apache Software Foundation (ASF) under one or more&#010;+ * contributor license agreements. See the NOTICE file distributed with&#010;+ * this work for additional information regarding copyright ownership.&#010;+ * The ASF licenses this file to you under the Apache License, Version&#010;+ * 2.0 (the "License"); you may not use this file except in compliance&#010;+ * with the License. You may obtain a copy of the License at&#010;+ *&#010;+ * http://www.apache.org/licenses/LICENSE-2.0&#010;+ *&#010;+ * Unless required by applicable law or agreed to in writing, software&#010;+ * distributed under the License is distributed on an "AS IS" BASIS,&#010;+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+ * See the License for the specific language governing permissions and&#010;+ * limitations under the License.&#010;+ */&#010;+#include &lt;gtest/gtest.h&gt;&#010;+#include &lt;gmock/gmock.h&gt;&#010;+#include "serialization/EtchDefaultValueFactory.h"&#010;+#include "serialization/EtchBinaryTaggedData.h"&#010;+#include "serialization/EtchBinaryTaggedDataInput.h"&#010;+#include "serialization/EtchValidatorShort.h"&#010;+#include "transport/EtchMessagizer.h"&#010;+#include "transport/EtchTcpConnection.h"&#010;+#include "transport/EtchPacketizer.h"&#010;+#include "transport/EtchSessionListener.h"&#010;+#include "transport/EtchTcpListener.h"&#010;+&#010;+&#010;+class MockListener11 : public virtual EtchSessionListener&lt;EtchSocket&gt; {&#010;+public:&#010;+&#010;   MockListener11(EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt;* transport)&#010;&#010;     : mTransport(transport) {&#010;     if(mTransport != NULL) {&#010;@@ -42,38 +42,38 @@ public:&#010;       delete mTransport;&#010;     }&#010;   }&#010;-&#010;+&#010;   //This method is called&#010;-  status_t sessionAccepted(EtchSocket* connection) {&#010;-    delete connection;&#010;-    return ETCH_OK;&#010;-  }&#010;-&#010;-  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;-&#010;-  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;-&#010;+  status_t sessionAccepted(EtchSocket* connection) {&#010;+    delete connection;&#010;+    return ETCH_OK;&#010;+  }&#010;+&#010;+  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;+&#010;+  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;+&#010;   status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;     return ETCH_OK;&#010;   }&#010; &#010; private:&#010;  EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt;* mTransport;&#010;-};&#010;-&#010;-class MockMailboxManager : public EtchSessionMessage {&#010;-public:&#010;-&#010;-  status_t sessionMessage(capu::SmartPointer&lt;EtchWho&gt; receipent, capu::SmartPointer&lt;EtchMessage&gt;&#010;buf) {&#010;-    EXPECT_TRUE(buf-&gt;count() == 1);&#010;+};&#010;+&#010;+class MockMailboxManager : public EtchSessionMessage {&#010;+public:&#010;+&#010;+  status_t sessionMessage(capu::SmartPointer&lt;EtchWho&gt; receipent, capu::SmartPointer&lt;EtchMessage&gt;&#010;buf) {&#010;+    EXPECT_TRUE(buf-&gt;count() == 1);&#010;     buf-&gt;clear();&#010;-    return ETCH_OK;&#010;-  }&#010;-&#010;-  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;-&#010;-  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;-&#010;+    return ETCH_OK;&#010;+  }&#010;+&#010;+  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;+&#010;+  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;+&#010;   status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;     return ETCH_OK;&#010;   }&#010;@@ -116,43 +116,48 @@ TEST_F(EtchMessagizerTest, constructorTe&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;   EtchTransportPacket* pac = new EtchPacketizer(conn, &amp;u);&#010;   EtchSessionPacket* mes = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;-  //Created stack&#010;-  delete mes;&#010;+  &#010;+  //Delete created stack&#010;+  delete conn;&#010;+  delete mes;&#010;+  delete pac;&#010;   delete factory;&#010;   types.clear();&#010; }&#010; &#010;-TEST_F(EtchMessagizerTest, TransportControlTest) {&#010;-  EtchTypeMap types;&#010;-  EtchClass2TypeMap class2type;&#010;-  EtchDefaultValueFactory * factory;&#010;+TEST_F(EtchMessagizerTest, TransportControlTest) {&#010;+  EtchTypeMap types;&#010;+  EtchClass2TypeMap class2type;&#010;+  EtchDefaultValueFactory * factory;&#010;   MockMailboxManager manager;&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;-  EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;-  //created value factory&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;-  EtchResources r;&#010;-  EtchObject *out;&#010;+  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  EtchString uri("tcp://127.0.0.1:4001");&#010;+  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;+  //created value factory&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;+  EtchResources r;&#010;+  EtchObject *out;&#010;   r.put(EtchTransport&lt;EtchSessionMessage&gt;::VALUE_FACTORY(), factory, out);&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;   EtchPacketizer* pac = new EtchPacketizer(conn, &amp;u);&#010;   EtchMessagizer* mess = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;   mess-&gt;setSession(&amp;manager);&#010;-&#010;+&#010;   EtchTcpListener* transport = new EtchTcpListener(&amp;u);&#010;   EtchSessionListener&lt;EtchSocket&gt;* mSessionListener = new MockListener11(transport);&#010; &#010;   transport-&gt;transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new&#010;EtchInt32(1000));&#010;   &#010;   mess-&gt;transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP()), new EtchInt32(1000));&#010;-  //test transport commands&#010;+  //test transport commands&#010;   mess-&gt;transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));&#010; &#010;   transport-&gt;transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(1000));&#010; &#010;-  delete mSessionListener;&#010;-  delete mess;&#010;+  delete conn;&#010;+  delete mSessionListener;&#010;+  delete pac;&#010;+  delete mess;&#010;   delete factory;&#010;   types.clear();&#010; }&#010;@@ -162,34 +167,36 @@ TEST_F(EtchMessagizerTest, TransportMess&#010;   EtchClass2TypeMap class2type;&#010;   EtchDefaultValueFactory * factory;&#010;   MockMailboxManager manager;&#010;-  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;-  EtchString uri("tcp://127.0.0.1:4001");&#010;-  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;-  //default value factory&#010;-  EtchURL u("tcp://127.0.0.1:4001");&#010;-  EtchResources r;&#010;-  EtchObject *out;&#010;-  //add to the resource&#010;+  EtchDefaultValueFactory::Init(&amp;types, &amp;class2type);&#010;+  EtchString uri("tcp://127.0.0.1:4001");&#010;+  factory = new EtchDefaultValueFactory(uri, &amp;types, &amp;class2type);&#010;+  //default value factory&#010;+  EtchURL u("tcp://127.0.0.1:4001");&#010;+  EtchResources r;&#010;+  EtchObject *out;&#010;+  //add to the resource&#010;   r.put(EtchTransport&lt;EtchSessionMessage&gt;::VALUE_FACTORY(), factory, out);&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;   EtchPacketizer* pac = new EtchPacketizer(conn, &amp;u);&#010;   EtchMessagizer* mess = new EtchMessagizer(pac, &amp;u, &amp;r);&#010;   mess-&gt;setSession(&amp;manager);&#010;-  //creation of example message which will be serialized&#010;-  EtchType *mt_foo = NULL;&#010;-  EtchField mf_x("x");&#010;-  EtchString str("foo");&#010;-  factory-&gt;getType(str, mt_foo);&#010;-  capu::SmartPointer&lt;EtchValidator&gt; v;&#010;-  EtchValidatorShort::Get(0, v);&#010;-  mt_foo-&gt;putValidator(mf_x, v);&#010;-  capu::SmartPointer&lt;EtchShort&gt; data = new EtchShort(10000);&#010;-  capu::SmartPointer&lt;EtchMessage&gt; msg = new EtchMessage(mt_foo, factory);&#010;-  msg-&gt;put(mf_x, data);&#010;-&#010;+  //creation of example message which will be serialized&#010;+  EtchType *mt_foo = NULL;&#010;+  EtchField mf_x("x");&#010;+  EtchString str("foo");&#010;+  factory-&gt;getType(str, mt_foo);&#010;+  capu::SmartPointer&lt;EtchValidator&gt; v;&#010;+  EtchValidatorShort::Get(0, v);&#010;+  mt_foo-&gt;putValidator(mf_x, v);&#010;+  capu::SmartPointer&lt;EtchShort&gt; data = new EtchShort(10000);&#010;+  capu::SmartPointer&lt;EtchMessage&gt; msg = new EtchMessage(mt_foo, factory);&#010;+  msg-&gt;put(mf_x, data);&#010;+&#010;   EXPECT_TRUE(mess-&gt;transportMessage(NULL, msg) == ETCH_ERROR);&#010; &#010;-  delete mess;&#010;+  delete conn;&#010;+  delete mess;&#010;+  delete pac;&#010;   delete factory;&#010;   types.clear();&#010; }&#010;@@ -248,7 +255,9 @@ TEST_F(EtchMessagizerTest, SessionDataTe&#010; &#010;   mess-&gt;setSession(NULL);&#010;   types.clear();&#010;-  delete mMailboxManager;&#010;-  delete mess;&#010;+  delete conn;&#010;+  delete mMailboxManager;&#010;+  delete pac;&#010;+  delete mess;&#010;   delete factory;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp Thu&#010;Aug 23 16:48:16 2012&#010;@@ -1,36 +1,36 @@&#010;-/* $Id$&#010;- * Licensed to the Apache Software Foundation (ASF) under one or more&#010;- * contributor license agreements. See the NOTICE file distributed with&#010;- * this work for additional information regarding copyright ownership.&#010;- * The ASF licenses this file to you under the Apache License, Version&#010;- * 2.0 (the "License"); you may not use this file except in compliance&#010;- * with the License. You may obtain a copy of the License at&#010;- *&#010;- * http://www.apache.org/licenses/LICENSE-2.0&#010;- *&#010;- * Unless required by applicable law or agreed to in writing, software&#010;- * distributed under the License is distributed on an "AS IS" BASIS,&#010;- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;- * See the License for the specific language governing permissions and&#010;- * limitations under the License.&#010;- */&#010;-#include &lt;gtest/gtest.h&gt;&#010;-#include &lt;gmock/gmock.h&gt;&#010;-#include "transport/EtchPacketizer.h"&#010;-#include "common/EtchString.h"&#010;-#include "common/EtchError.h"&#010;-#include "util/EtchURL.h"&#010;-#include "transport/EtchTcpConnection.h"&#010;-#include "capu/util/SmartPointer.h"&#010;-#include "common/EtchSocket.h"&#010;-#include "transport/EtchSessionListener.h"&#010;-#include "transport/EtchTcpListener.h"&#010;-#include "transport/EtchSessionPacket.h"&#010;-#include "transport/EtchFlexBuffer.h"&#010;-&#010;-class MockListener3 : public virtual EtchSessionListener&lt;EtchSocket&gt; {&#010;-public:&#010;-&#010;+/* $Id$&#010;+ * Licensed to the Apache Software Foundation (ASF) under one or more&#010;+ * contributor license agreements. See the NOTICE file distributed with&#010;+ * this work for additional information regarding copyright ownership.&#010;+ * The ASF licenses this file to you under the Apache License, Version&#010;+ * 2.0 (the "License"); you may not use this file except in compliance&#010;+ * with the License. You may obtain a copy of the License at&#010;+ *&#010;+ * http://www.apache.org/licenses/LICENSE-2.0&#010;+ *&#010;+ * Unless required by applicable law or agreed to in writing, software&#010;+ * distributed under the License is distributed on an "AS IS" BASIS,&#010;+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+ * See the License for the specific language governing permissions and&#010;+ * limitations under the License.&#010;+ */&#010;+#include &lt;gtest/gtest.h&gt;&#010;+#include &lt;gmock/gmock.h&gt;&#010;+#include "transport/EtchPacketizer.h"&#010;+#include "common/EtchString.h"&#010;+#include "common/EtchError.h"&#010;+#include "util/EtchURL.h"&#010;+#include "transport/EtchTcpConnection.h"&#010;+#include "capu/util/SmartPointer.h"&#010;+#include "common/EtchSocket.h"&#010;+#include "transport/EtchSessionListener.h"&#010;+#include "transport/EtchTcpListener.h"&#010;+#include "transport/EtchSessionPacket.h"&#010;+#include "transport/EtchFlexBuffer.h"&#010;+&#010;+class MockListener3 : public virtual EtchSessionListener&lt;EtchSocket&gt; {&#010;+public:&#010;+&#010;   MockListener3(EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt;* transport) :&#010;     mTransport(transport) {&#010;     if(mTransport != NULL) {&#010;@@ -43,34 +43,34 @@ public:&#010;         delete mTransport;&#010;     }&#010;   }&#010;-&#010;+&#010;   //This method is called&#010;-  status_t sessionAccepted(EtchSocket* connection) {&#010;-    delete connection;&#010;-    return ETCH_OK;&#010;-  }&#010;-&#010;-  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;-&#010;-  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;-&#010;+  status_t sessionAccepted(EtchSocket* connection) {&#010;+    delete connection;&#010;+    return ETCH_OK;&#010;+  }&#010;+&#010;+  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;+&#010;+  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;+&#010;   status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;     return ETCH_OK;&#010;   }&#010; &#010; private:&#010;  EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt;* mTransport;&#010;-};&#010;-&#010;-class MockMessagizer : public EtchSessionPacket {&#010;-public:&#010;-&#010;-  MOCK_METHOD2(sessionPacket, status_t(capu::SmartPointer&lt;EtchWho&gt; receipent, capu::SmartPointer&lt;EtchFlexBuffer&gt;&#010;buf));&#010;-&#010;-  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;-&#010;-  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;-&#010;+};&#010;+&#010;+class MockMessagizer : public EtchSessionPacket {&#010;+public:&#010;+&#010;+  MOCK_METHOD2(sessionPacket, status_t(capu::SmartPointer&lt;EtchWho&gt; receipent, capu::SmartPointer&lt;EtchFlexBuffer&gt;&#010;buf));&#010;+&#010;+  MOCK_METHOD2(sessionQuery, status_t(capu::SmartPointer&lt;EtchObject&gt; query, capu::SmartPointer&lt;EtchObject&gt;&#010;&amp;result));&#010;+&#010;+  MOCK_METHOD2(sessionControl, status_t(capu::SmartPointer&lt;EtchObject&gt; control, capu::SmartPointer&lt;EtchObject&gt;&#010;value));&#010;+&#010;   status_t sessionNotify(capu::SmartPointer&lt;EtchObject&gt; event) {&#010;     return ETCH_OK;&#010;   }&#010;@@ -102,7 +102,10 @@ TEST_F(EtchPacketizerTest, constructorTe&#010;   EtchURL u("tcp://127.0.0.1:4001");&#010;   EtchTransportData* conn = new EtchTcpConnection(mRuntime, NULL, &amp;u);&#010;   EtchSessionData* packetizer = new EtchPacketizer(conn, &amp;u);&#010;-  delete packetizer;&#010;+&#010;+  delete conn;&#010;+  delete packetizer;&#010;+  &#010; }&#010; &#010; TEST_F(EtchPacketizerTest, TransportControlTest) {&#010;@@ -112,18 +115,18 @@ TEST_F(EtchPacketizerTest, TransportCont&#010;   MockMessagizer mes;&#010;   packetizer-&gt;setSession(&amp;mes);&#010; &#010;-&#010;   EtchTcpListener* transport = new EtchTcpListener(&amp;u);&#010;   EtchSessionListener&lt;EtchSocket&gt;* listener = new MockListener3(transport);&#010; &#010;-  //Start the mock listener&#010;+  //Start the mock listener&#010;   transport-&gt;transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new&#010;EtchInt32(1000));&#010;-&#010;+&#010;   packetizer-&gt;transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP()), new&#010;EtchInt32(1000));&#010;   packetizer-&gt;transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(1000));&#010;-&#010;+&#010;   transport-&gt;transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(1000));&#010;-&#010;+&#010;+  delete conn;&#010;   delete packetizer;&#010;   delete listener;&#010; }&#010;@@ -142,6 +145,8 @@ TEST_F(EtchPacketizerTest, TransportPack&#010;   buffer-&gt;setIndex(0);&#010; &#010;   EXPECT_TRUE(packetizer-&gt;transportPacket(NULL, buffer) == ETCH_ERROR);&#010;+&#010;+  delete conn;&#010;   delete packetizer;&#010; }&#010; &#010;@@ -151,21 +156,22 @@ TEST_F(EtchPacketizerTest, SessionDataTe&#010;   EtchPacketizer* packetizer = new EtchPacketizer(conn, &amp;u);&#010;   capu::SmartPointer&lt;EtchFlexBuffer&gt; buffer = new EtchFlexBuffer();&#010;   //A packet is created&#010;-  capu::int32_t pktsize = 4;&#010;+  capu::int32_t pktsize = 4;&#010;   buffer-&gt;putInt(packetizer-&gt;SIG());&#010;   buffer-&gt;putInt(pktsize);&#010;-  buffer-&gt;put((capu::int8_t *)"test", pktsize);&#010;-  buffer-&gt;setIndex(0);&#010;-  EXPECT_TRUE(buffer-&gt;getLength() == 12);&#010;-&#010;-  EtchSessionPacket* mSessionPacker = new MockMessagizer();&#010;-  packetizer-&gt;setSession(mSessionPacker);&#010;-&#010;-  MockMessagizer * mock = (MockMessagizer*) mSessionPacker;&#010;-  EXPECT_CALL(*mock, sessionPacket(capu::SmartPointer&lt;EtchWho &gt; (NULL), buffer));&#010;-  EXPECT_TRUE(packetizer-&gt;sessionData(NULL, buffer) == ETCH_OK);&#010;-&#010;-  packetizer-&gt;setSession(NULL);&#010;-  delete mSessionPacker;&#010;-  delete packetizer;&#010;+  buffer-&gt;put((capu::int8_t *)"test", pktsize);&#010;+  buffer-&gt;setIndex(0);&#010;+  EXPECT_TRUE(buffer-&gt;getLength() == 12);&#010;+&#010;+  EtchSessionPacket* mSessionPacker = new MockMessagizer();&#010;+  packetizer-&gt;setSession(mSessionPacker);&#010;+&#010;+  MockMessagizer * mock = (MockMessagizer*) mSessionPacker;&#010;+  EXPECT_CALL(*mock, sessionPacket(capu::SmartPointer&lt;EtchWho &gt; (NULL), buffer));&#010;+  EXPECT_TRUE(packetizer-&gt;sessionData(NULL, buffer) == ETCH_OK);&#010;+&#010;+  packetizer-&gt;setSession(NULL);&#010;+  delete mSessionPacker;&#010;+  delete packetizer;&#010;+  delete conn;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp&#010;Thu Aug 23 16:48:16 2012&#010;@@ -126,6 +126,7 @@ TEST_F(EtchPlainMailboxManagerTest, cons&#010;   EXPECT_TRUE(manager != NULL);&#010;   manager-&gt;setSession(&amp;session);&#010; &#010;+  delete transport;&#010;   delete manager;&#010;   delete factory;&#010; }&#010;@@ -165,6 +166,8 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010;   EXPECT_TRUE(ETCH_OK != manager-&gt;getMailbox(id, mail));&#010; &#010;   message-&gt;clear();&#010;+&#010;+  delete transport;&#010;   delete manager;&#010;   delete factory;&#010; }&#010;@@ -207,6 +210,8 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010;   EXPECT_TRUE(ETCH_OK != manager-&gt;getMailbox(id, mail));&#010; &#010;   message-&gt;clear();&#010;+&#010;+  delete transport;&#010;   delete manager;&#010;   delete factory;&#010; }&#010;@@ -248,6 +253,8 @@ TEST_F(EtchPlainMailboxManagerTest, tran&#010;   EXPECT_TRUE(ETCH_OK == manager-&gt;getMailbox(id, mail));&#010; &#010;   message-&gt;clear();&#010;+&#010;+  delete transport;&#010;   delete manager;&#010;   delete factory;&#010; }&#010;@@ -293,6 +300,8 @@ TEST_F(EtchPlainMailboxManagerTest, repl&#010;   EXPECT_TRUE(ETCH_OK != manager-&gt;getMailbox(id, mail));&#010; &#010;   message-&gt;clear();&#010;+&#010;+  delete transport;&#010;   delete manager;&#010;   delete factory;&#010; }&#010;@@ -354,6 +363,7 @@ TEST_F(EtchPlainMailboxManagerTest, sess&#010; &#010;   //deallocations&#010;   delete x;&#010;+  delete transport;&#010;   delete manager;&#010;   delete factory;&#010; }&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/cpp/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/cpp/CMakeLists.txt?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/cpp/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/examples/helloworld/cpp/CMakeLists.txt Thu Aug 23 16:48:16 2012&#010;@@ -21,6 +21,9 @@&#010; cmake_minimum_required (VERSION 2.8)&#010; project (etch-cpp-helloworld)&#010; &#010;+IF (EXISTS "${CMAKE_SOURCE_DIR}/CMakeLists_local.txt")&#010;+  INCLUDE ("${CMAKE_SOURCE_DIR}/CMakeLists_local.txt" OPTIONAL)&#010;+ENDIF()&#010; &#010; IF(UNIX)&#010;   add_definitions("-DOS_LINUX")&#010;@@ -116,6 +119,12 @@ target_link_libraries(etch-cpp-helloworl&#010; set_target_properties(etch-cpp-helloworld-server PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS&#010;"-m32")&#010; ELSEIF(WIN32)&#010; target_link_libraries(etch-cpp-helloworld-server ${ETCH_LIBRARY} ${CAPU_LIBRARY})&#010;+IF (BUILD_CHECK_MEMORY)&#010;+  file (COPY ${VLD}/vld.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;+  file (COPY ${VLD}/bin/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;+  file (COPY ${VLD}/bin/vld.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;+  target_link_libraries (etch-cpp-helloworld-server ${VLD}/lib/vld.lib)&#010;+ENDIF (BUILD_CHECK_MEMORY)&#010; ENDIF ()&#010; set_target_properties(etch-cpp-helloworld-server PROPERTIES OUTPUT_NAME "helloworld-server")&#010; &#010;@@ -147,6 +156,12 @@ target_link_libraries(etch-cpp-helloworl&#010; set_target_properties(etch-cpp-helloworld-client PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS&#010;"-m32")&#010; ELSEIF(WIN32)&#010; target_link_libraries(etch-cpp-helloworld-client ${ETCH_LIBRARY} ${CAPU_LIBRARY})&#010;+IF (BUILD_CHECK_MEMORY)&#010;+  file (COPY ${VLD}/vld.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;+  file (COPY ${VLD}/bin/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;+  file (COPY ${VLD}/bin/vld.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})&#010;+  target_link_libraries (etch-cpp-helloworld-client ${VLD}/lib/vld.lib)&#010;+ENDIF (BUILD_CHECK_MEMORY)&#010; ENDIF ()&#010; &#010; set_target_properties(etch-cpp-helloworld-client PROPERTIES OUTPUT_NAME "helloworld-client")&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp (original)&#010;+++ incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp Thu&#010;Aug 23 16:48:16 2012&#010;@@ -12,7 +12,9 @@&#010; #include "MainHelloWorldClient.h"&#010; #include "ImplHelloWorldClient.h"&#010; #include "transport/EtchTransportData.h"&#010;-&#010;+#ifdef BUILD_CHECK_MEMORY&#010;+#include "vld.h"&#010;+#endif&#010; &#010; using namespace org_apache_etch_examples_helloworld_HelloWorld;&#010; &#010;@@ -64,6 +66,9 @@ capu::int32_t main(int argc, const char*&#010;   // Disconnect from the service&#010;   remote-&gt;transportControl(new EtchString(EtchTransportData::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(4000));&#010; &#010;+  //delete remote&#010;+  delete remote;&#010;+&#010;   //delete runtime&#010;   result = runtime-&gt;shutdown();&#010;   if (result != ETCH_OK) {&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldListener.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldListener.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldListener.cpp (original)&#010;+++ incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldListener.cpp Thu&#010;Aug 23 16:48:16 2012&#010;@@ -6,16 +6,18 @@&#010; // overwritten once it exists! Please edit this file as necessary to implement&#010; // your service logic.&#010; &#010;+#include "MainHelloWorldListener.h"&#010;+#include "ImplHelloWorldServer.h"&#010;+#include "RemoteHelloWorldClient.h"&#010;+&#010; #include "capu/os/Thread.h"&#010; #include "common/EtchTypes.h"&#010; #include "support/EtchRuntime.h"&#010;-#include "RemoteHelloWorldClient.h"&#010;-#include "MainHelloWorldListener.h"&#010;-#include "ImplHelloWorldServer.h"&#010; #include "transport/EtchTransportData.h"&#010;-#include "util/EtchLogger.h"&#010;-&#010; &#010;+#ifdef BUILD_CHECK_MEMORY&#010;+#include "vld.h"&#010;+#endif&#010; &#010; using namespace org_apache_etch_examples_helloworld_HelloWorld;&#010; &#010;@@ -36,13 +38,6 @@ int main(int argc, const char* argv[])&#010;   EtchRuntime* runtime = new EtchRuntime();&#010;   status = runtime-&gt;start();&#010; &#010;-  EtchLogger* logger = new EtchLogger();&#010;-  EtchAppender* appender = new EtchConsoleAppender();&#010;-  appender-&gt;setLoggingLevel(capu::CLL_TRACE);&#010;-  logger-&gt;setAppender(appender);&#010;-  EtchRuntime::setLogger(logger);&#010;-&#010;-&#010;   // TODO Change to correct URI&#010;   EtchString uri("tcp://0.0.0.0:4001");&#010; &#010;@@ -52,21 +47,29 @@ int main(int argc, const char* argv[])&#010;   status = HelloWorldHelper::newListener(runtime, uri, NULL, &amp;mainHelloWorldlistener,&#010;listener);&#010; &#010; &#010;-  // Start the Listener&#010;+  //start the Listener&#010;   status = listener-&gt;transportControl(new EtchString(EtchTransportData::START_AND_WAIT_UP()),&#010;new EtchInt32(4000));&#010;+  if (status == ETCH_OK) {&#010;+    printf("Hello World Server started successfully. Listening on port 4001\n\n");&#010;+  } else {&#010;+    printf("Error while starting Hello World Server. Errorcode %d \n\n", status);&#010;+    return -1;&#010;+  }&#010;+  &#010;+  //waiting&#010;+  printf("press any key to stop server\n");&#010;+  getchar();&#010; &#010;-  //Wait for finish...&#010;-  capu::Thread::Sleep(200000);&#010;-&#010;-  //Stop the Listener&#010;+  //stop the Listener&#010;   listener-&gt;transportControl(new EtchString(EtchTransportData::STOP_AND_WAIT_DOWN()),&#010;new EtchInt32(4000));&#010; &#010;+  //delete listener&#010;+  delete listener;&#010;+&#010;   //delete runtime&#010;   status = runtime-&gt;shutdown();&#010;-&#010;+  &#010;   delete runtime;&#010;-  delete logger;&#010;-  delete appender;&#010;   return 0;&#010; }&#010; &#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1376588 [1/2] - in /incubator/etch/trunk: binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/ binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ binding-cpp/runtime/include/common/ binding-...</title>
<author><name>veithm@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201208.mbox/%3c20120823164820.D2B9423888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120823164820-D2B9423888FD@eris-apache-org%3e</id>
<updated>2012-08-23T16:48:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: veithm&#010;Date: Thu Aug 23 16:48:16 2012&#010;New Revision: 1376588&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1376588&amp;view=rev&#010;Log:&#010;ETCH-198 Changes in helper and valuefactory&#010;&#010;Refactoring of life cycle and memory management&#010;&#010;Change-Id: If74bb9e43e0712fb8dca8cf52d364efa3d5d12a3&#010;&#010;Added:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h   (contents, props changed)&#010;      - copied, changed from r1376587, incubator/etch/trunk/binding-cpp/runtime/include/support/EtchClientStack.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h   (contents, props changed)&#010;      - copied, changed from r1376587, incubator/etch/trunk/binding-cpp/runtime/include/support/EtchServerStack.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp   (with props)&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp   (contents, props changed)&#010;      - copied, changed from r1376587, incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchClientStack.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp   (contents, props changed)&#010;      - copied, changed from r1376587, incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchServerStack.cpp&#010;Removed:&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchClientStack.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchServerStack.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchClientStack.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchServerStack.cpp&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h&#010;    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/ServerSocket.inc&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTransportFactory.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchClass2TypeMapTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeMapTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp&#010;    incubator/etch/trunk/examples/helloworld/cpp/CMakeLists.txt&#010;    incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp&#010;    incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldListener.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/java/org/apache/etch/bindings/cpp/compiler/Compiler.java Thu Aug 23 16:48:16 2012&#010;@@ -1186,7 +1186,7 @@ public class Compiler extends Backend {&#010;     Token t = type.type();&#010;     switch (t.kind) {&#010;     case EtchGrammarConstants.BOOLEAN:&#010;-      return "EtchBool";&#010;+      return "Bool";&#010;     case EtchGrammarConstants.BYTE:&#010;       return "Byte";&#010;     case EtchGrammarConstants.SHORT:&#010;@@ -1202,7 +1202,7 @@ public class Compiler extends Backend {&#010;     case EtchGrammarConstants.STRING:&#010;       return "String";&#010;     case EtchGrammarConstants.OBJECT:&#010;-      return "";&#010;+      return "Object";&#010;     default: {&#010;       // we have to use a fully qualified name here.&#010;       // find the actual type...&#010;@@ -1258,7 +1258,11 @@ public class Compiler extends Backend {&#010;     // TODO Auto-generated method stub&#010;     if(pointer)&#010;       return "EtchNativeArray" + this.getNativeArrayTypeName( type ) + "Ptr";&#010;-    return "EtchNativeArray" + this.getNativeArrayTypeName( type ) + "Obj";&#010;+    if (type.type().kind == EtchGrammarConstants.BYTE) {&#010;+      return "EtchNativeArray&lt;" + this.getNativeTypeName( type, true ) + "&gt; ";&#010;+    } else {&#010;+      return "EtchNativeArray&lt;" + this.getNativeTypeName( type, true ) + "Ptr&gt; ";&#010;+    }&#010;   }&#010; &#010;   public String getNativeTypeName(TypeRef type, boolean etch_type) {&#010;@@ -1269,7 +1273,7 @@ public class Compiler extends Backend {&#010;     case EtchGrammarConstants.BOOLEAN:&#010;       return (etch_type ? "EtchBool" : "capu::bool_t");&#010;     case EtchGrammarConstants.BYTE:&#010;-      return (etch_type ? "EtchByte" : "capu::int8_t");&#010;+      return (etch_type ? "capu::int8_t" : "capu::int8_t");&#010;     case EtchGrammarConstants.SHORT:&#010;       return (etch_type ? "EtchShort" : "capu::int16_t");&#010;     case EtchGrammarConstants.INT:&#010;@@ -1295,7 +1299,10 @@ public class Compiler extends Backend {&#010;       if (n.isBuiltin()) {&#010;         Builtin b = (Builtin) n;&#010;         if (n.efqname(this).equals("EtchDate")) return b.className();&#010;-        return b.className() + "Obj";&#010;+        if (n.efqname(this).equals("EtchHashTable")) return b.className()+"&lt;EtchObjectPtr, EtchObjectPtr&gt; ";&#010;+        if (n.efqname(this).equals("EtchHashSet")) return b.className()+"&lt;EtchObjectPtr&gt; ";&#010;+        throw new IllegalArgumentException(String.format(&#010;+                "unable to find correct Etch data type for type at line %d: %s", t.beginLine, n.efqname(this)));&#010;       }&#010;       if (n.isEnumx()) {&#010;         return n.efqname(this);&#010;@@ -1494,8 +1501,13 @@ public class Compiler extends Backend {&#010;         Builtin b = (Builtin) n;&#010; &#010;         String cn = b.className();&#010;-        if (!n.efqname(this).equals("EtchDate"))&#010;-          cn += "Obj";&#010;+        if (n.efqname(this).equals("EtchHashTable")) {&#010;+          cn += "&lt;EtchObjectPtr, EtchObjectPtr&gt;";&#010;+        }&#010;+        if (n.efqname(this).equals("EtchHashSet")) {&#010;+          cn += "&lt;EtchObjectPtr&gt;";&#010;+        }&#010;+&#010; &#010;         /*&#010;          * int i = cn.indexOf( '&lt;' ); if (i &gt;= 0) cn = cn.substring( 0, i );&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_cpp.vm Thu Aug 23 16:48:16 2012&#010;@@ -35,12 +35,8 @@&#010; #end&#010; &#010; \#include "support/EtchRuntime.h"&#010;-#if($helper.isServer($mc) || $helper.isBoth($mc))&#010;-\#include "support/EtchServerStack.h"&#010;-#end&#010;-#if($helper.isClient($mc) || $helper.isBoth($mc))&#010;-\#include "support/EtchClientStack.h"&#010;-#end&#010;+\#include "support/EtchStackClient.h"&#010;+\#include "support/EtchStackServer.h"&#010; \#include "support/EtchPool.h"&#010; \#include "transport/EtchPlainMailboxManager.h"&#010; \#include "transport/EtchDefaultDeliveryService.h"&#010;@@ -61,6 +57,10 @@ $clname::Listener${i}Server::~Listener${&#010; &#010; status_t $clname::Listener${i}Server::newServer(EtchRuntime* runtime, EtchTransportMessage* transport, const EtchString&amp; uri, EtchResources* resources)&#010; {&#010;+  //get stack instance&#010;+  EtchStackServer* stack = NULL;&#010;+  resources-&gt;get(EtchStack::STACK(), (EtchObject*&amp;)stack );&#010;+&#010;   //get value factory&#010;   EtchObject* obj;&#010;   resources-&gt;get( EtchTransport&lt;EtchValueFactory*&gt;::VALUE_FACTORY(), obj );&#010;@@ -68,8 +68,11 @@ status_t $clname::Listener${i}Server::ne&#010;   &#010;   //create stack layers&#010;   EtchMailboxManager* mbm = new EtchPlainMailboxManager(transport, uri, resources);&#010;+  stack-&gt;setMailboxManager(mbm);&#010;   EtchDeliveryService* dvs = new EtchDefaultDeliveryService(mbm, uri);&#010;-  Remote${i}Client* client = new Remote${i}Client(runtime, dvs, vf);&#010;+  stack-&gt;setDeliveryService(dvs);&#010;+  Remote${i}Client* client = new Remote${i}Client(runtime, dvs, vf, stack);&#010;+  stack-&gt;setRemote(client);&#010;   ${i}Server* server = mFactory-&gt;new${i}Server(client);&#010;   &#010;   //get thread pools&#010;@@ -81,7 +84,9 @@ status_t $clname::Listener${i}Server::ne&#010;   &#010;   //create stub&#010;   Stub${i}Server* tmp${i}Server = new Stub${i}Server(dvs, server, qp, fp);&#010;-  EtchStack* stack = new EtchServerStack(client, tmp${i}Server, resources, vf);&#010;+  stack-&gt;setStub(tmp${i}Server);&#010;+  &#010;+  //start remote client&#010;   client-&gt;start();&#010;   return ETCH_OK;&#010; }&#010;@@ -117,7 +122,7 @@ status_t $clname::newListener(EtchRuntim&#010;   status_t status = ETCH_OK;&#010; &#010;   //static initialization of value factory&#010;-  ValueFactory${i}::__INIT(runtime);&#010;+  ValueFactory${i}::InitValueFactory(runtime);&#010; &#010;   //init resources&#010;   EtchResources *res;&#010;@@ -159,8 +164,10 @@ status_t $clname::newListener(EtchRuntim&#010;   {&#010;     status_t status = ETCH_OK;&#010; &#010;+    EtchStackClient* stack = new EtchStackClient();&#010;+&#010;     //static initialization of value factory&#010;-    ValueFactory${i}::__INIT(runtime);&#010;+    ValueFactory${i}::InitValueFactory(runtime);&#010; &#010;     //init resources&#010;     EtchResources* res;&#010;@@ -169,6 +176,10 @@ status_t $clname::newListener(EtchRuntim&#010;       return status;&#010;     }&#010;     &#010;+    EtchObject* tmp = NULL;&#010;+    res-&gt;put(EtchStack::STACK(),stack, tmp);&#010;+    stack-&gt;mStaticResources = res;&#010;+    &#010;     //create valuefactory instance&#010;     ValueFactory${i}* vf = new ValueFactory${i}(uri);&#010;     EtchObject* vfobj = (EtchObject*) vf;&#010;@@ -180,8 +191,10 @@ status_t $clname::newListener(EtchRuntim&#010;     EtchTransportMessage* m;&#010;     EtchTransportFactory::getTransport(runtime, uri, res, m);&#010;     EtchMailboxManager* mbm = new EtchPlainMailboxManager(m, uri, res);&#010;+    stack-&gt;setMailboxManager(mbm);&#010;     EtchDeliveryService* dvs = new EtchDefaultDeliveryService(mbm, uri);&#010;-    Remote${i}Server* _server = new Remote${i}Server(runtime, dvs, vf);&#010;+    stack-&gt;setDeliveryService(dvs);&#010;+    Remote${i}Server* _server = new Remote${i}Server(runtime, dvs, vf, stack);&#010;     ${i}Client* client = implFactory.new${i}Client( server );&#010;     &#010;     //get pools&#010;@@ -193,7 +206,7 @@ status_t $clname::newListener(EtchRuntim&#010;     &#010;     //init stub&#010;     Stub${i}Client* tmpStub${i}Client = new Stub${i}Client(dvs, client, qp, fp);&#010;-    EtchStack* stack = new EtchClientStack(server, tmpStub${i}Client, res, vf);&#010;+    stack-&gt;setStub(tmpStub${i}Client);&#010;     &#010;     //return server&#010;     server = _server;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_h.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_h.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/helper_h.vm Thu Aug 23 16:48:16 2012&#010;@@ -147,7 +147,7 @@ private:&#010; #end&#010; &#010; #if($helper.isClient($mc) || $helper.isBoth($mc))&#010;-    static status_t newServer(EtchRuntime* runtime, EtchString uri, EtchResources* resources, ${i}ClientFactory&amp; implFactory, RemoteHelloWorldServer*&amp; server);&#010;+    static status_t newServer(EtchRuntime* runtime, EtchString uri, EtchResources* resources, ${i}ClientFactory&amp; implFactory, Remote${i}Server*&amp; server);&#010; #end&#010;   };&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/intf_h.vm Thu Aug 23 16:48:16 2012&#010;@@ -98,7 +98,7 @@ namespace $namespace {&#010;       * $s&#010; #end&#010;       */&#010;-      $i.name()#if($enumHelper &lt; $count),#end&#010;+      $n.name()_$i.name()#if($enumHelper &lt; $count),#end&#010; &#010; #end&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm Thu Aug 23 16:48:16 2012&#010;@@ -70,7 +70,7 @@ status_t $clname::$n.name()AsyncResultRe&#010;   return ETCH_OK;&#010; }&#010; &#010;-$intfname::$n.name()AsyncResultPtr $clname::$n.name()AsyncResultRemote::Begin($clname* base, #set($sep = "")#foreach($p in $n.iterator())$sep$helper.getEtchTypeName($p.type(), true) $p.name()#set($sep = ", ")#end) {&#010;+$intfname::$n.name()AsyncResultPtr $clname::$n.name()AsyncResultRemote::Begin($clname* base#set($sep = ", ")#foreach($p in $n.iterator())$sep$helper.getEtchTypeName($p.type(), true) $p.name()#end) {&#010;   status_t status;&#010; &#010;   capu::SmartPointer&lt;EtchMessage&gt; msg;&#010;@@ -108,11 +108,11 @@ $intfname::$n.name()AsyncResultPtr $clna&#010;  * @param vf&#010;  */&#010; #if($hasBaseClass)&#010;-$clname::$clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf )&#010;-  : Remote${i}(runtime, svc, vf) {&#010;+$clname::$clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack )&#010;+  : Remote${i}(runtime, svc, vf, stack) {&#010; #else&#010;-$clname::$clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf )&#010;-  : EtchRemoteBase(svc, vf), mRuntime(runtime) {&#010;+$clname::$clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack )&#010;+  : EtchRemoteBase(svc, vf, stack), mRuntime(runtime) {&#010; #end&#010; }&#010; &#010;@@ -131,7 +131,7 @@ $intfname::$n.name()AsyncResultPtr $clna&#010; }&#010; #else&#010; $intfname::$n.name()AsyncResultPtr $clname::$n.name()(#set( $sep = "" )#foreach( $p in $n.iterator() )$sep$helper.getEtchTypeName( $p.type(), true ) $p.name() #set( $sep = ", " )#end) {&#010;-  $n.name()AsyncResultPtr result = $clname::$n.name()AsyncResultRemote::Begin(this, #set($sep = "")#foreach($p in $n.iterator())$p.name() #set( $sep = ", ")#end);&#010;+  $n.name()AsyncResultPtr result = $clname::$n.name()AsyncResultRemote::Begin(this#set( $sep = ", ")#foreach($p in $n.iterator())$sep$p.name()#end);&#010;   return result;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm Thu Aug 23 16:48:16 2012&#010;@@ -33,7 +33,7 @@&#010; #if(!$hasBaseClass)&#010; \#include "support/EtchRemoteBase.h"&#010; #else&#010;-\#include "ValueFactoryHelloWorld.h"&#010;+\#include "${vfname}.h"&#010; \#include "$inc"&#010; \#include "Remote${i}.h"&#010; #end&#010;@@ -79,7 +79,7 @@ namespace $namespace {&#010;       /**&#010;        * Create a new instance from $clname class&#010;        */&#010;-       static $n.name()AsyncResultPtr Begin($clname* base, #set($sep = "")#foreach($p in $n.iterator())$sep$helper.getEtchTypeName($p.type(), true) $p.name()#set($sep = ", ")#end);&#010;+       static $n.name()AsyncResultPtr Begin($clname* base#set($sep = ", ")#foreach($p in $n.iterator())$sep$helper.getEtchTypeName($p.type(), true) $p.name()#end);&#010; &#010;     private:&#010;         $clname* mBase;&#010;@@ -94,8 +94,9 @@ namespace $namespace {&#010;      *&#010;      * @param svc&#010;      * @param vf&#010;+     * @param stack&#010;      */&#010;-    $clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf );&#010;+    $clname(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack );&#010;     &#010;     /**&#010;      * Destructor&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm Thu Aug 23 16:48:16 2012&#010;@@ -143,33 +143,33 @@ namespace $namespace {&#010;     {&#010;     }&#010;     virtual ~Stub$i$suffix() {}&#010;-    static void init()&#010;-    {&#010;-    // nothing to do.&#010;-    }&#010;-&#010;+    &#010; &#010; ##if($notEmpty)&#010;-   /*&#010;-    * Static Initialization-Helper&#010;-    */&#010;+   &#010;   private:&#010;     friend class ValueFactory${i};&#010;-    static void __INIT()&#010;+    &#010;+    /**&#010;+     * Static Initialization-Helper&#010;+     */&#010;+    static status_t Init()&#010;     {&#010;-#foreach( $mthd in $intf.iterator() )&#010;-#if ($mthd.isMsgDir($mc))&#010;-#if (!$mthd.isHidden())&#010;-    ValueFactory$i::${mthd.vname( $helper )}-&gt;setStubHelper(new Run${mthd.vname($helper)}());&#010;-#end&#010;-#end&#010;-#if( $n.isMixin() )&#010;-#set( $m = $n.getModule() )&#010;-#set( $z = $m.iterator().next() )&#010;-    ${m.name()}::Stub${z.name()}${suffix}::init();&#010;-#end&#010;-#end&#010;+      #foreach( $mthd in $intf.iterator() )&#010;+      #if ($mthd.isMsgDir($mc))&#010;+      #if (!$mthd.isHidden())&#010;+          ValueFactory$i::${mthd.vname( $helper )}-&gt;setStubHelper(new Run${mthd.vname($helper)}());&#010;+      #end&#010;+      #end&#010;+      #if( $n.isMixin() )&#010;+      #set( $m = $n.getModule() )&#010;+      #set( $z = $m.iterator().next() )&#010;+          ${m.name()}::Stub${z.name()}${suffix}::Init();&#010;+      #end&#010;+      #end&#010;+      return ETCH_OK;&#010;     }&#010;+&#010; ##end&#010;   };&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm Thu Aug 23 16:48:16 2012&#010;@@ -26,17 +26,37 @@&#010; #set( $vf = "ValueFactory$intf.name()" )&#010; &#010; \#include "$inc"&#010;+\#include "${intf.name()}.h"&#010;+\#include "Stub${i}Server.h"&#010;+\#include "Stub${i}Client.h"&#010; \#include "common/EtchError.h"&#010; \#include "serialization/EtchField.h"&#010; \#include "serialization/EtchAsyncMode.h"&#010; \#include "serialization/EtchDirection.h"&#010;-\#include "${intf.name()}.h"&#010; \#include "serialization/EtchValidators.h"&#010;-\#include "Stub${i}Server.h"&#010;-\#include "Stub${i}Client.h"&#010; &#010; using namespace $namespace;&#010; &#010;+status_t $vf::Etch${intf.name()}RuntimeListener::onRuntimeChanged(EtchRuntime* runtime) {&#010;+  capu::int_t index = $vf::SRuntimes.find(runtime-&gt;getId());&#010;+  if (index == -1) {&#010;+    return ETCH_ERROR;&#010;+  }&#010;+  if (runtime-&gt;isClosed()) {&#010;+    //the runtime is closed and is removed&#010;+    $vf::SRuntimes.removeAt(index);&#010;+  }&#010;+  if ($vf::SRuntimes.isEmpty()) {&#010;+    //clean up all static members&#010;+    $vf::DestroyValueFactory();&#010;+  }&#010;+  return ETCH_OK;&#010;+}&#010;+&#010;+capu::Mutex $vf::SRuntimesMutex;&#010;+capu::List&lt;capu::uint64_t&gt; $vf::SRuntimes;&#010;+$vf::Etch${intf.name()}RuntimeListener $vf::S${intf.name()}RuntimeListener;&#010;+&#010; ##--------------------------------------------------------------&#010; ## Classes that represent anonym creation in java&#010; ##--------------------------------------------------------------&#010;@@ -90,7 +110,7 @@ class ImportExportHelper$n.vname( $helpe&#010;      switch (v-&gt;Value)&#010;      {&#010; #foreach ($p in $n.iterator())&#010;-       case $tname::$p.name(): _struct-&gt;put($vf::$p.vname($helper)(), new EtchBool(true) ); break;&#010;+       case $tname::${tname}_$p.name(): _struct-&gt;put($vf::$p.vname($helper)(), new EtchBool(true) ); break;&#010; #end&#010;      }&#010;      result = _struct;&#010;@@ -105,11 +125,14 @@ class ImportExportHelper$n.vname( $helpe&#010;        return ETCH_EINVAL;&#010; &#010;      // there should only be a single key, so take the first one&#010;-     EtchField key = value-&gt;getFirstField();&#010;+     EtchHashTable&lt;EtchField, capu::SmartPointer&lt;EtchObject&gt; &gt;::Iterator it = value-&gt;begin();&#010;+     EtchHashTable&lt;EtchField, capu::SmartPointer&lt;EtchObject&gt; &gt;::Pair pair;&#010;+     it.next(&amp;pair);&#010;+     EtchField key = pair.first;&#010; #foreach ($p in $n.iterator())&#010;      if (key.equals(&amp;$vf::$p.vname($helper)()))&#010;      {&#010;-       result = new ${tname}(${tname}::$p.name());&#010;+       result = new ${tname}(${tname}::${tname}_$p.name());&#010;        return ETCH_OK;&#010;      }&#010; #end&#010;@@ -170,16 +193,17 @@ ${vf}::${vf}( EtchString uri ) : EtchDef&#010; #end&#010; }&#010; &#010;-void ${vf}::initTypes()&#010;+status_t ${vf}::InitTypes()&#010; {&#010; #foreach ( $n in $intf.iterator() )&#010; #if ($n.isEnumx() || $n.isStruct() || $n.isExtern() || $n.isExcept() || $n.isMessage())&#010;   types()-&gt;get(EtchString("$n.fqname()"), ${vf}::${n.vname( $helper )});&#010; #end&#010; #end&#010;+  return ETCH_OK;&#010; }&#010; &#010;-void ${vf}::initResults()&#010;+status_t ${vf}::InitResults()&#010; {&#010; //AF: TO-REVIEW: finde die Verwendung von Anonymer Enum bei EchtDirection und bei EtchAsyncMode unschoen&#010; &#010;@@ -202,10 +226,11 @@ void ${vf}::initResults()&#010; #end&#010; #end&#010; #end&#010;+  return ETCH_OK;&#010; }&#010; &#010; ## ----------------------------- import / export -----------------------------&#010;-void ${vf}::initImportExport()&#010;+status_t ${vf}::InitImportExport()&#010; {&#010; #foreach ( $n in $intf.iterator() )&#010; #if ($n.isStruct() || $n.isExcept())&#010;@@ -225,11 +250,13 @@ void ${vf}::initImportExport()&#010;   $vf::${n.vname( $helper )}-&gt;setImportExportHelper(new ImportExportHelper$n.vname($helper)());&#010; #end&#010; #end&#010;+&#010;+  return ETCH_OK;&#010; }&#010; &#010; ## ----------------------------- fields -----------------------------&#010; &#010;-void ${vf}::initFields()&#010;+status_t ${vf}::InitFields()&#010; {&#010; #set( $x = $params.clear() )&#010; ## standard params from DefaultValueFactory&#010;@@ -245,24 +272,17 @@ void ${vf}::initFields()&#010; #end&#010; #end&#010; #end&#010;+  return ETCH_OK;&#010; }&#010; &#010; &#010; #set( $ctr = 0 )&#010;-void $vf::initParams()&#010;+status_t $vf::InitParams()&#010; {&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmpValue;&#010; #foreach( $n in $intf.iterator() )&#010; #if ($n.isEnumx() || $n.isStruct() || $n.isExcept() || $n.isMessage())&#010;-#if ($ctr &gt; 0 &amp;&amp; $ctr % 100 == 0)&#010; &#010;-  initParams${ctr}();&#010;-}&#010;-&#010;-void $vf::initParams${ctr}()&#010;-{&#010;-  capu::SmartPointer&lt;EtchValidator&gt; tmpValue;&#010;-#end&#010; #set( $ctr = $ctr + 1 )&#010;   // params for $n.name()&#010; #if ($n.isStruct() || $n.isExcept())&#010;@@ -270,14 +290,14 @@ void $vf::initParams${ctr}()&#010;   $helper.getValidator($param);&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::$param.vname($helper)(), tmpValue);&#010; &#010;-#end&#010;+#end ## -- foreach --&#010; #else&#010; #foreach( $param in $n.iterator() )&#010;   $helper.getValidator($param);&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::$param.vname($helper)(), tmpValue);&#010; &#010;-#end&#010;-#end&#010;+#end ## -- foreach --&#010;+#end ## -- else --&#010; #if ($n.isMessage())&#010;   EtchValidatorLong::Get(0, tmpValue);&#010;   ${n.vname( $helper )}-&gt;putValidator($vf::_mf__messageId(), tmpValue);&#010;@@ -289,52 +309,104 @@ void $vf::initParams${ctr}()&#010;   $helper.getValidator($t)&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::$param.vname($helper)(), tmpValue); // thrown $t.name()&#010; &#010;-#end&#010;+#end ## -- foreach --&#010;   EtchValidatorRuntimeException::Get(tmpValue);&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::$param.vname($helper)(), tmpValue); // thrown RuntimeException&#010;   EtchValidatorLong::Get(0, tmpValue);&#010;   $vf::${n.vname( $helper )}-&gt;putValidator($vf::_mf__inReplyTo(), tmpValue);&#010;+#end ## -- isHidden --&#010;+#end ## -- isMessage --&#010;+#end ## -- $n.isEnumx() || $n.isStruct() || $n.isExcept() || $n.isMessage() --&#010;+#end ## -- foreach --&#010; &#010;-#end&#010;-#end&#010;-#end&#010;-#end&#010;+  return ETCH_OK;&#010; }&#010; &#010;-void $vf::__ShutDown()&#010;+status_t $vf::InitValueFactory(EtchRuntime* runtime)&#010; {&#010;-  $vf::types()-&gt;clear();&#010;-  delete $vf::types();&#010;-  delete $vf::class2type();&#010;-}&#010;+  status_t status;&#010;+  SRuntimesMutex.lock();&#010;+  if (SRuntimes.find(runtime-&gt;getId()) != -1) {&#010;+    //runtime is already in list&#010;+    return ETCH_OK;&#010;+  }&#010; &#010;-/**&#010;- * Static Initialization-Helper&#010;- */&#010;-bool $vf::INIT = false;&#010;-void $vf::__INIT(EtchRuntime* runtime)&#010;-{&#010;-  if(INIT)&#010;-    return;&#010;-  INIT = true;&#010;-  $vf::Init( types(), class2type() );&#010;-  $vf::initTypes();&#010;-  $vf::initResults();&#010;-  $vf::initFields();&#010;+  status = SRuntimes.add(runtime-&gt;getId());&#010;+  runtime-&gt;registerListener(&amp;S${i}RuntimeListener);&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+&#010;+  if (SRuntimes.size() &gt; 1) {&#010;+    //Valuefactory is already initialized&#010;+    SRuntimesMutex.unlock();&#010;+    return ETCH_OK;&#010;+  }&#010;+  SRuntimesMutex.unlock();&#010;+  &#010;+  status = $vf::Init( types(), class2type() );&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+  &#010;+  status = $vf::InitTypes();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+  &#010;+  status = $vf::InitResults();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+  &#010;+  status = $vf::InitFields();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010; #foreach( $n in $intf.iterator() )&#010; #if ($n.isExtern())&#010;-    ${n.sname( $helper )}.init( ${n.vname($helper)}(), class2type );&#010;+    status = ${n.sname( $helper )}.Init( ${n.vname($helper)}(), class2type );&#010;+    if (status != ETCH_OK) {&#010;+      return status;&#010;+    }&#010; #end&#010; #end&#010;-  $vf::initParams();&#010;-  $vf::initImportExport();&#010;+  status = $vf::InitParams();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+  &#010;+  status = $vf::InitImportExport();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010; &#010;-  Stub${i}&lt;void&gt;::__INIT();&#010;-  Stub${i}Server::__INIT();&#010;-  Stub${i}Client::__INIT();&#010;+  status = Stub${i}&lt;void&gt;::Init();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+  &#010;+  status = Stub${i}Server::Init();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010;+  &#010;+  status = Stub${i}Client::Init();&#010;+  if (status != ETCH_OK) {&#010;+    return status;&#010;+  }&#010; &#010;   // done updating types, and class2type: lock them.&#010;   types()-&gt;lock();&#010;   class2type()-&gt;lock();&#010;+  &#010;+  return ETCH_OK;&#010;+}&#010; &#010;+status_t $vf::DestroyValueFactory()&#010;+{&#010;+  $vf::types()-&gt;clear();&#010;+  delete $vf::types();&#010;+  delete $vf::class2type();&#010;+  return ETCH_OK;&#010; }&#010;\ No newline at end of file&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm (original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_h.vm Thu Aug 23 16:48:16 2012&#010;@@ -26,6 +26,8 @@&#010; #ifndef __$helper.getVfName($intf).toUpperCase()_H__&#010; \#define __$helper.getVfName($intf).toUpperCase()_H__&#010; &#010;+\#include "capu/os/Mutex.h"&#010;+\#include "capu/container/List.h"&#010; \#include "common/EtchTypes.h"&#010; \#include "serialization/EtchDefaultValueFactory.h"&#010; \#include "support/EtchRuntime.h"&#010;@@ -74,29 +76,44 @@ namespace $namespace {&#010;     static EtchTypeMap* types();&#010;     static EtchClass2TypeMap* class2type();&#010; &#010;-    static void initTypes();&#010;-    static void initResults();&#010;-    static void initFields();&#010;-    static void initParams();&#010;+    static status_t InitTypes();&#010;+    static status_t InitResults();&#010;+    static status_t InitFields();&#010;+    static status_t InitParams();&#010; #set( $ctr = 0 )&#010; #foreach( $n in $intf.iterator() )&#010; #if ($n.isEnumx() || $n.isStruct() || $n.isExcept() || $n.isMessage())&#010; #if ($ctr &gt; 0 &amp;&amp; $ctr % 100 == 0)&#010;-    static void initParams${ctr}();&#010;+    static status_t InitParams${ctr}();&#010; #end&#010; #set( $ctr = $ctr + 1 )&#010; #end&#010; #end&#010;-    static void initImportExport();&#010;+    static status_t InitImportExport();&#010; &#010;     /**&#010;      * Static Initialization-Helper&#010;      */&#010;   private:&#010;+    /**&#010;+     * Listener which reacts to changes in runtime&#010;+     * Destroys the statically initialized members if the last runtime has been deleted &#010;+     */&#010;+    class Etch${i}RuntimeListener : public EtchRuntimeListener {&#010;+      /**&#010;+       * @see EtchRuntime&#010;+       */&#010;+      status_t onRuntimeChanged(EtchRuntime* runtime);&#010;+    };&#010;+  &#010;     friend class ${i}Helper;&#010;-    static void __ShutDown();&#010;-    static bool INIT;&#010;-    static void __INIT(EtchRuntime* runtime);&#010;+    friend class Etch${i}RuntimeListener;&#010;+    static status_t InitValueFactory(EtchRuntime* runtime);&#010;+    static status_t DestroyValueFactory();&#010;+    static capu::Mutex SRuntimesMutex;&#010;+    static capu::List&lt;capu::uint64_t&gt; SRuntimes;&#010;+    static Etch${i}RuntimeListener S${i}RuntimeListener;&#010;+    &#010;   };&#010; }&#010; #endif&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h Thu Aug 23 16:48:16 2012&#010;@@ -71,6 +71,9 @@ enum EtchObjectTypeIds {&#010;   EOTID_STUBHELPER,&#010;   EOTID_VALIDATOR_CUSTOM,&#010;   EOTID_VALIDATOR_CUSTOM_KEY,&#010;+  EOTID_STACK,&#010;+  EOTID_STACK_CLIENT,&#010;+  EOTID_STACK_SERVER,&#010;   EOTID_DYNAMIC_START&#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h Thu Aug 23 16:48:16 2012&#010;@@ -98,7 +98,7 @@ protected:&#010; &#010; public:&#010; &#010;-  static void Init(EtchTypeMap* types, EtchClass2TypeMap* class2type);&#010;+  static status_t Init(EtchTypeMap* types, EtchClass2TypeMap* class2type);&#010; &#010;   /**&#010;    * The msg field of the standard unchecked exception.&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h Thu Aug 23 16:48:16 2012&#010;@@ -24,6 +24,7 @@&#010; &#010; #include "common/EtchTypes.h"&#010; #include "support/EtchDeliveryService.h"&#010;+#include "support/EtchStack.h"&#010; #include "serialization/EtchValueFactory.h"&#010; &#010; class EtchRuntime;&#010;@@ -39,7 +40,7 @@ public:&#010;    * @param svc the delivery service used to send messages.&#010;    * @param vf the value factory used to create messages and encode/decode types.&#010;    */&#010;-  EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf);&#010;+  EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack);&#010; &#010;   /**&#010;    * Destructor&#010;@@ -189,6 +190,7 @@ public:&#010; private:&#010;   EtchRuntime* mRuntime;&#010;   EtchDeliveryService * mSvc;&#010;+  EtchStack* mStack;&#010;   EtchValueFactory* mVf;&#010; };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStack.h Thu Aug 23 16:48:16 2012&#010;@@ -16,11 +16,133 @@&#010;  */&#010; &#010; #ifndef ETCHSTACK_H&#010;-#define&#009;ETCHSTACK_H&#010;+#define ETCHSTACK_H&#010; &#010;-class EtchStack {&#010;+#include "support/EtchStubBase.h"&#010;+#include "transport/EtchTransportData.h"&#010;+#include "transport/EtchTransportPacket.h"&#010;+#include "transport/EtchTransportMessage.h"&#010;+#include "transport/EtchPlainMailboxManager.h"&#010;+#include "transport/EtchDefaultDeliveryService.h"&#010;+#include "serialization/EtchValueFactory.h"&#010;+#include "util/EtchResources.h"&#010;+&#010;+/* *&#010;+ * This class serves as a container for all layers created during the setup of a new stack (connection, packetizer, messagizer, ...).&#010;+ */&#010;+class EtchStack : public EtchObject{&#010; public:&#010;-  virtual ~EtchStack() {}&#010;+&#010;+  /**&#010;+   * EtchObjectType for EtchStack.&#010;+   */&#010;+  static const EtchObjectType* TYPE();&#010;+&#010;+  /**&#010;+   * Resource identifier&#010;+   */&#010;+  const static EtchString&amp; STACK();&#010;+&#010;+  /**&#010;+   * Default Constructor&#010;+   */&#010;+  EtchStack();&#010;+&#010;+  /**&#010;+   * Destructor which cleans the whole stack&#010;+   */&#010;+  virtual ~EtchStack();&#010;+&#010;+  /**&#010;+   * sets the transport interface&#010;+   */&#010;+  void setTransportData(EtchTransportData* transportData);&#010;+&#010;+  /**&#010;+   * sets the packet interface&#010;+   */&#010;+  void setTransportPacket(EtchTransportPacket* transportPacket);&#010;+&#010;+  /**&#010;+   * sets the message interface&#010;+   */&#010;+  void setTransportMessage(EtchTransportMessage* transportMessage);&#010;+&#010;+  /**&#010;+   * sets the resources&#010;+   */&#010;+  void setResources(EtchResources* resources);&#010;+&#010;+  /**&#010;+   * sets the value factory&#010;+   */&#010;+  void setValueFactory(EtchValueFactory* valuefactory);&#010;+&#010;+  /**&#010;+   * sets the mailbox manager&#010;+   */&#010;+  void setMailboxManager(EtchMailboxManager* mailboxmanager);&#010;+&#010;+  /**&#010;+   * sets the delivery service&#010;+   */&#010;+  void setDeliveryService(EtchDeliveryService* deliveryservice);&#010;+  &#010;+  /**&#010;+   * sets the stub implemenation&#010;+   */&#010;+  void setStub(EtchSessionMessage* stub);&#010;+&#010;+  /**&#010;+   * returns the transport interface&#010;+   */&#010;+  EtchTransportData* getTransportData();&#010;+&#010;+  /**&#010;+   * returns the packet interface&#010;+   */&#010;+  EtchTransportPacket* getTransportPacket();&#010;+&#010;+  /**&#010;+   * returns the message interface&#010;+   */&#010;+  EtchTransportMessage* getTransportMessage();&#010;+&#010;+  /**&#010;+   * returns the resources&#010;+   */&#010;+  EtchResources* getResources();&#010;+&#010;+  /**&#010;+   * returns the value factory&#010;+   */&#010;+  EtchValueFactory* getValueFactory();&#010;+&#010;+  /**&#010;+   * returns the mailbox manager&#010;+   */&#010;+  EtchMailboxManager* getMailboxManager();&#010;+&#010;+  /**&#010;+   * returns the delivery service&#010;+   */&#010;+  EtchDeliveryService* getDeliveryService();&#010;+&#010;+  /**&#010;+   * returns the stub implemenatation&#010;+   */&#010;+  EtchSessionMessage* getStub();&#010;+&#010;+private:&#010;+  EtchTransportData* mTransportData;&#010;+  EtchTransportPacket* mTransportPacket;&#010;+  EtchTransportMessage* mTransportMessage;&#010;+  EtchResources* mResources;&#010;+  EtchValueFactory* mValueFactory;&#010;+  EtchMailboxManager* mMailboxManager;&#010;+  EtchDeliveryService* mDeliveryService;&#010;+  EtchSessionMessage* mStub;&#010;+&#010; };&#010; &#010; #endif /* ETCHSTACK_H */&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h (from r1376587, incubator/etch/trunk/binding-cpp/runtime/include/support/EtchClientStack.h)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h&amp;p1=incubator/etch/trunk/binding-cpp/runtime/include/support/EtchClientStack.h&amp;r1=1376587&amp;r2=1376588&amp;rev=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchClientStack.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h Thu Aug 23 16:48:16 2012&#010;@@ -15,36 +15,37 @@&#010;  * limitations under the License.&#010;  */&#010; &#010;-&#010;-#ifndef __ETCHCLIENTSTACK_H__&#010;-#define __ETCHCLIENTSTACK_H__&#010;+#ifndef __ETCHSTACKCLIENT_H__&#010;+#define __ETCHSTACKCLIENT_H__&#010; &#010; #include "support/EtchStack.h"&#010;-#include "support/EtchRemoteBase.h"&#010;-#include "transport/EtchSessionMessage.h"&#010;-#include "support/EtchTransportHelper.h"&#010;-&#010;-// TODO: Refactoring of stack lifecycle ETCH-240&#010;+#include "util/EtchResources.h"&#010; &#010;-//Entry for EtchRuntime&#010;-class EtchClientStack : public EtchStack {&#010;+/* *&#010;+ * This class serves as a container for all layers created during the setup of a new stack (connection, packetizer, messagizer, ...).&#010;+ */&#010;+class EtchStackClient : public EtchStack {&#010; public:&#010; &#010;   /**&#010;-   * Constructs the EtchClientStack.&#010;+   * EtchObjectType for EtchStackClient.&#010;    */&#010;-  EtchClientStack(EtchRemoteBase* rb, EtchSessionMessage *helper, EtchResources *res, EtchValueFactory* vf);&#010;+  static const EtchObjectType* TYPE();&#010; &#010;   /**&#010;-   * Destructor&#010;+   * Default Constructor&#010;    */&#010;-  virtual ~EtchClientStack();&#010;+  EtchStackClient();&#010;+&#010;+  /**&#010;+   * Destructor which cleans the whole stack&#010;+   */&#010;+  virtual ~EtchStackClient();&#010;+&#010;+public:&#010;+  EtchResources* mStaticResources;&#010;+&#010; &#010;-private:&#010;-  EtchValueFactory *mVf;&#010;-  EtchRemoteBase *mRemoteBase;&#010;-  EtchSessionMessage *mStubHelper;&#010;-  EtchResources *mResources;&#010; };&#010; &#010;-#endif /* ETCHCLIENTSTACK_H */&#010;+#endif /* __ETCHSTACKCLIENT_H__ */&#010;&#010;Propchange: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h&#010;------------------------------------------------------------------------------&#010;    svn:eol-style = native&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h (from r1376587, incubator/etch/trunk/binding-cpp/runtime/include/support/EtchServerStack.h)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h&amp;p1=incubator/etch/trunk/binding-cpp/runtime/include/support/EtchServerStack.h&amp;r1=1376587&amp;r2=1376588&amp;rev=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchServerStack.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h Thu Aug 23 16:48:16 2012&#010;@@ -15,35 +15,48 @@&#010;  * limitations under the License.&#010;  */&#010; &#010;-#ifndef __ETCHSERVERSTACK_H__&#010;-#define __ETCHSERVERSTACK_H__&#010;+#ifndef __ETCHSTACKSERVER_H__&#010;+#define __ETCHSTACKSERVER_H__&#010; &#010;-#include "support/EtchStack.h"&#010; #include "support/EtchRemoteBase.h"&#010;-#include "transport/EtchSessionMessage.h"&#010;-#include "support/EtchTransportHelper.h"&#010; &#010;-// TODO: Refactoring of stack lifecycle ETCH-240&#010;-&#010;-//Entry for EtchRuntime&#010;-class EtchServerStack : public EtchStack {&#010;+/* *&#010;+ * This class serves as a container for all layers created during the setup of a new stack (connection, packetizer, messagizer, ...).&#010;+ */&#010;+class EtchStackServer : public EtchStack{&#010; public:&#010; &#010;   /**&#010;-   * Constructs the EtchClientStack.&#010;+   * EtchObjectType for EtchStackServer.&#010;+   */&#010;+  static const EtchObjectType* TYPE();&#010;+&#010;+  /**&#010;+   * Default Constructor&#010;    */&#010;-  EtchServerStack(EtchRemoteBase* rb, EtchSessionMessage *helper, EtchResources *res, EtchValueFactory* vf);&#010;+  EtchStackServer();&#010; &#010;   /**&#010;-   * Destructor&#010;+   * Destructor which cleans the whole stack&#010;    */&#010;-  virtual ~EtchServerStack();&#010;+  virtual ~EtchStackServer();&#010;+&#010;+&#010;+  /**&#010;+   * sets the remote implementation&#010;+   */&#010;+  void setRemote(EtchRemoteBase* remote);&#010;+&#010;+  /**&#010;+   * returns the remote implementation&#010;+   */&#010;+  EtchRemoteBase* getRemote();&#010; &#010; private:&#010;-  EtchValueFactory *mVf;&#010;-  EtchRemoteBase *mRemoteBase;&#010;-  EtchSessionMessage *mStubHelper;&#010;-  EtchResources *mResources;&#010;+  EtchRemoteBase* mRemote;&#010;+&#010;+&#010;+&#010; };&#010; &#010;-#endif&#009;/* ETCHSERVERSTACK_H */&#010;+#endif /* __ETCHSTACKSERVER_H__ */&#010;&#010;Propchange: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackServer.h&#010;------------------------------------------------------------------------------&#010;    svn:eol-style = native&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStubBase.h Thu Aug 23 16:48:16 2012&#010;@@ -34,7 +34,7 @@&#010; template&lt;typename T&gt;&#010; class EtchStubBase : public EtchSessionMessage {&#010; public:&#010;-  template &lt;typename Class&gt;&#010;+  template &lt;typename U&gt;&#010;   friend class EtchStubPoolRunnable;&#010; &#010;   /**&#010;@@ -84,7 +84,7 @@ protected:&#010;   T* mObj;&#010; };&#010; &#010;-template&lt;typename T&gt;&#010;+template&lt;typename U&gt;&#010; class EtchStubPoolRunnable : public EtchPoolRunnable {&#010; public:&#010; &#010;@@ -97,7 +97,7 @@ public:&#010;    * @param msg the message.&#010;    * @param helper the StubHelper which will dispatch the message.&#010;    */&#010;-  EtchStubPoolRunnable(EtchStubBase&lt;T&gt;* stub, capu::SmartPointer&lt;EtchWho&gt; sender, capu::SmartPointer&lt;EtchMessage&gt; msg, EtchStubHelper&lt;T&gt;* helper)&#010;+  EtchStubPoolRunnable(EtchStubBase&lt;U&gt;* stub, capu::SmartPointer&lt;EtchWho&gt; sender, capu::SmartPointer&lt;EtchMessage&gt; msg, EtchStubHelper&lt;U&gt;* helper)&#010;     : mStub(stub)&#010;     , mSender(sender)&#010;     , mMsg(msg)&#010;@@ -118,10 +118,10 @@ public:&#010;   }&#010; &#010; private:&#010;-  EtchStubBase&lt;T&gt;* mStub;&#010;+  EtchStubBase&lt;U&gt;* mStub;&#010;   capu::SmartPointer&lt;EtchWho&gt; mSender;&#010;   capu::SmartPointer&lt;EtchMessage&gt; mMsg;&#010;-  EtchStubHelper&lt;T&gt;* mHelper;&#010;+  EtchStubHelper&lt;U&gt;* mHelper;&#010; };&#010; &#010; template&lt;typename T&gt;&#010;@@ -133,7 +133,6 @@ EtchStubBase&lt;T&gt;::EtchStubBase(EtchDelive&#010; template&lt;typename T&gt;&#010; EtchStubBase&lt;T&gt;::~EtchStubBase() {&#010;   delete mObj;&#010;-  delete mSvc;&#010; }&#010; &#010; template&lt;typename T&gt;&#010;@@ -190,4 +189,4 @@ status_t EtchStubBase&lt;T&gt;::sessionQuery(c&#010;   return ETCH_EUNIMPL;&#010; }&#010; &#010;-#endif&#010;+#endif /* __ETCHSTUBBASE_H__ */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h Thu Aug 23 16:48:16 2012&#010;@@ -168,7 +168,7 @@ status_t EtchConnection&lt;S&gt;::fireUp() {&#010; &#010;   if (mSession != NULL) {&#010;     //TODO: run this in seperate thread&#010;-&#009;mMutex.unlock();&#010;+    mMutex.unlock();&#010;     return mSession-&gt;sessionNotify(new EtchString(EtchSession::UP()));&#010;   }&#010;   mMutex.unlock();&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Thu Aug 23 16:48:16 2012&#010;@@ -103,13 +103,6 @@ protected:&#010;    */&#010;   virtual status_t readSocket();&#010; &#010;-private:&#010;-  EtchRuntime* mRuntime;&#010;-  EtchServerSocket* mSocket;&#010;-  capu::uint16_t mPort;&#010;-  capu::uint8_t mBackLog;&#010;-&#010;-&#010; public:&#010;   /**&#010;    * Query term for URI to specify backlog value to ServerSocket. The value&#010;@@ -122,6 +115,40 @@ public:&#010;    * @see #TcpListener(String, Resources)&#010;    */&#010;   const static EtchString&amp; BACKLOG();&#010;+&#010;+  const static EtchString&amp; CONNECTION_CHECK();&#010;+&#010;+private:&#010;+  class ConnectionChecker : public capu::Runnable {&#010;+  public:&#010;+    /**&#010;+     * Constructor&#010;+     * @param instance of TcpListener&#010;+     */&#010;+    ConnectionChecker(EtchTcpListener* listener);&#010;+&#010;+    /**&#010;+     * Destructor&#010;+     */&#010;+    virtual ~ConnectionChecker();&#010;+&#010;+    /**&#010;+     * @see Runnable&#010;+     */&#010;+    void run();&#010;+  private:&#010;+    EtchTcpListener *mListener;&#010;+  };&#010;+&#010;+  friend class ConnectionChecker;&#010;+&#010;+  EtchRuntime* mRuntime;&#010;+  EtchServerSocket* mSocket;&#010;+  capu::uint16_t mPort;&#010;+  capu::uint8_t mBackLog;&#010;+  capu::Thread* mConnectionCheckerThread;&#010;+  ConnectionChecker* mConnectionChecker;&#010;+&#010; };&#010; &#010; #endif /* ETCHTCPLISTENER_H */&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h Thu Aug 23 16:48:16 2012&#010;@@ -23,6 +23,7 @@&#010; #include "common/EtchString.h"&#010; #include "common/EtchConfig.h"&#010; #include "support/EtchServerFactory.h"&#010;+#include "support/EtchStack.h"&#010; #include "transport/EtchTransportMessage.h"&#010; #include "transport/EtchTransportData.h"&#010; #include "transport/EtchTcpConnection.h"&#010;@@ -38,6 +39,7 @@ class EtchTcpTransportFactory&#010;  : public EtchTransportFactory {&#010; public:&#010; &#010;+  friend class MySessionListener;&#010;   /**&#010;    * Constructor&#010;    * @param runtime&#010;@@ -81,7 +83,7 @@ private:&#010;      * @param uri&#010;      * @param resources&#010;      */&#010;-    MySessionListener(EtchRuntime* runtime, EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt; *transport,&#010;+    MySessionListener(EtchRuntime* runtime, EtchTcpTransportFactory* factory, EtchTransport&lt;EtchSessionListener&lt;EtchSocket&gt; &gt; *transport,&#010;             EtchString uri, EtchResources* resources, capu::bool_t secure);&#010; &#010;      /**&#010;@@ -141,6 +143,8 @@ private:&#010;     EtchServerFactory* mSession;&#010;     EtchRuntime* mRuntime;&#010;     capu::bool_t mIsSecure;&#010;+    capu::List&lt;EtchStack*&gt;* mConnectionStacks;&#010;+    EtchTcpTransportFactory* mFactory;&#010; &#010;   };&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/ServerSocket.inc&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/ServerSocket.inc?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/ServerSocket.inc (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/ServerSocket.inc Thu Aug 23 16:48:16 2012&#010;@@ -60,7 +60,11 @@ inline ServerSocket::~ServerSocket()&#010; &#010; inline Socket* ServerSocket::accept()&#010; {&#010;-  Socket *clientSocket = new Socket(::accept(mServerSocket, NULL, NULL));&#010;+  SOCKET handle = ::accept(mServerSocket, NULL, NULL);&#010;+  if (handle == INVALID_SOCKET) {&#010;+    return NULL;&#010;+  }&#010;+  Socket *clientSocket = new Socket(handle);&#010;   return clientSocket;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt Thu Aug 23 16:48:16 2012&#010;@@ -58,7 +58,7 @@ SET(MAIN_INCLUDES&#010;     ${PROJECT_SOURCE_DIR}/include/transport/EtchTransportData.h&#010;     ${PROJECT_SOURCE_DIR}/include/transport/EtchTransportMessage.h&#010;     ${PROJECT_SOURCE_DIR}/include/transport/EtchTransportPacket.h&#010;-    ${PROJECT_SOURCE_DIR}/include/transport/EtchTransportFactory.h &#010;+    ${PROJECT_SOURCE_DIR}/include/transport/EtchTransportFactory.h&#010;     ${PROJECT_SOURCE_DIR}/include/transport/EtchMessagizer.h&#010;     ${PROJECT_SOURCE_DIR}/include/transport/EtchFormat.h&#010;     ${PROJECT_SOURCE_DIR}/include/transport/EtchTcpTransportFactory.h&#010;@@ -127,7 +127,7 @@ SET(MAIN_INCLUDES&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchPoolRunnable.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchFreePool.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchQueuedPool.h&#010;-    ${PROJECT_SOURCE_DIR}/include/support/EtchRemoteBase.h    &#010;+    ${PROJECT_SOURCE_DIR}/include/support/EtchRemoteBase.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchServerFactory.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchStubHelper.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchStubBase.h&#010;@@ -135,9 +135,9 @@ SET(MAIN_INCLUDES&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchPlainMailbox.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchMonitor.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchStack.h&#010;+    ${PROJECT_SOURCE_DIR}/include/support/EtchStackClient.h&#010;+    ${PROJECT_SOURCE_DIR}/include/support/EtchStackServer.h&#010;     ${PROJECT_SOURCE_DIR}/include/support/EtchRuntime.h&#010;-    ${PROJECT_SOURCE_DIR}/include/support/EtchServerStack.h&#010;-    ${PROJECT_SOURCE_DIR}/include/support/EtchClientStack.h&#010;     ${PROJECT_SOURCE_DIR}/include/util/EtchUtil.h&#010;     ${PROJECT_SOURCE_DIR}/include/util/EtchCircularQueue.h&#010;     ${PROJECT_SOURCE_DIR}/include/util/EtchIdGenerator.h&#010;@@ -223,8 +223,9 @@ SET(MAIN_SOURCES&#010;     support/EtchTransportHelper.cpp&#010;     support/EtchMonitor.cpp&#010;     support/EtchRuntime.cpp&#010;-    support/EtchServerStack.cpp&#010;-    support/EtchClientStack.cpp&#010;+    support/EtchStack.cpp&#010;+  support/EtchStackClient.cpp&#010;+  support/EtchStackServer.cpp&#010;     support/EtchAsyncResultNone.cpp&#010;     util/EtchCircularQueue.cpp&#010;     util/EtchUtil.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -71,21 +71,34 @@ status_t EtchAuthenticationExceptionSeri&#010;   EtchRuntime* runtime = EtchRuntime::getRuntime();&#010; &#010;   status_t result;&#010;-  EtchField field_ptr;&#010;-  result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;-  if (result != ETCH_OK)&#010;+&#010;+  EtchField field;&#010;+  result = type-&gt;getField(FIELD_NAME(), &amp;field);&#010;+  if (result != ETCH_OK) {&#010;+    return result;&#010;+  }&#010;+&#010;+  result = class2type-&gt;put(EtchAuthenticationException::TYPE(), type);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  class2type-&gt;put(EtchAuthenticationException::TYPE(), type);&#010;+  }&#010;+&#010;   type-&gt;setComponentType(EtchAuthenticationException::TYPE());&#010;+&#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchAuthenticationExceptionSerializer(type, &amp;field_ptr));&#010;+  type-&gt;setImportExportHelper(new EtchAuthenticationExceptionSerializer(type, &amp;field));&#010;+&#010;+  //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;   result = EtchValidatorString::Get(0, tmp);&#010;-  if (result != ETCH_OK)&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  result = type-&gt;putValidator(field_ptr, tmp);&#010;-  if (result != ETCH_OK)&#010;+  }&#010;+  result = type-&gt;putValidator(field, tmp);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;+  }&#010;+&#010;   type-&gt;lock();&#010;   CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchAuthenticationExceptionSerializer has been initialized");&#010;   return ETCH_OK;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp Thu Aug 23 16:48:16 2012&#010;@@ -39,9 +39,6 @@ status_t EtchClass2TypeMap::put(const Et&#010; &#010;   EtchType* tmp = NULL;&#010;   if (mC2T.get(classType, &amp;tmp) == ETCH_OK) {&#010;-    if (!tmp-&gt;equals(type)) {&#010;-      return ETCH_ERANGE;&#010;-    }&#010;     return ETCH_OK;&#010;   }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -72,22 +72,34 @@ status_t EtchDateSerializer::Init(EtchTy&#010;   EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;   &#010;   status_t result;&#010;-  EtchField field_ptr;&#010;-  result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;-  if (result != ETCH_OK)&#010;+&#010;+  EtchField field;&#010;+  result = type-&gt;getField(FIELD_NAME(), &amp;field);&#010;+  if (result != ETCH_OK) {&#010;+    return result;&#010;+  }&#010;+&#010;+  result = class2type-&gt;put(EtchDate::TYPE(), type);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  class2type-&gt;put(EtchDate::TYPE(), type);&#010;+  }&#010;+&#010;   type-&gt;setComponentType(EtchDate::TYPE());&#010; &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchDateSerializer(type, &amp;field_ptr));&#010;+  type-&gt;setImportExportHelper(new EtchDateSerializer(type, &amp;field));&#010;+&#010;+  //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; val;&#010;   result = EtchValidatorLong::Get(0, val);&#010;-  if (result != ETCH_OK)&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  result = type-&gt;putValidator(field_ptr, val);&#010;-  if (result != ETCH_OK)&#010;+  }&#010;+  result = type-&gt;putValidator(field, val);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;+  }&#010;+&#010;   type-&gt;lock();&#010;   CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchDateSerializer has been initialized");&#010;   return ETCH_OK;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp Thu Aug 23 16:48:16 2012&#010;@@ -131,36 +131,39 @@ EtchDefaultValueFactory::~EtchDefaultVal&#010;   delete mDynamicTypes;&#010; }&#010; &#010;-void EtchDefaultValueFactory::Init(EtchTypeMap* types, EtchClass2TypeMap* class2type) {&#010;+status_t EtchDefaultValueFactory::Init(EtchTypeMap* types, EtchClass2TypeMap* class2type) {&#010;+  status_t result;&#010; &#010;   EtchType *type;&#010;-  types-&gt;get(ETCH_RUNTIME_EXCEPTION_TYPE_NAME(), type);&#010;-  EtchRuntimeExceptionSerializer::Init(type, class2type);&#010;+  result = types-&gt;get(ETCH_RUNTIME_EXCEPTION_TYPE_NAME(), type);&#010;+  result = EtchRuntimeExceptionSerializer::Init(type, class2type);&#010; &#010;-  types-&gt;get(ETCH_LIST_TYPE_NAME(), type);&#010;-  EtchListSerializer::Init(type, class2type);&#010;+  result = types-&gt;get(ETCH_LIST_TYPE_NAME(), type);&#010;+  result = EtchListSerializer::Init(type, class2type);&#010; &#010;-  types-&gt;get(ETCH_MAP_TYPE_NAME(), type);&#010;-  EtchHashTableSerializer::Init(type, class2type);&#010;+  result = types-&gt;get(ETCH_MAP_TYPE_NAME(), type);&#010;+  result = EtchHashTableSerializer::Init(type, class2type);&#010; &#010;-  types-&gt;get(ETCH_SET_TYPE_NAME(), type);&#010;-  EtchSetSerializer::Init(type, class2type);&#010;+  result = types-&gt;get(ETCH_SET_TYPE_NAME(), type);&#010;+  result = EtchSetSerializer::Init(type, class2type);&#010; &#010;-  types-&gt;get(ETCH_DATETIME_TYPE_NAME(), type);&#010;-  EtchDateSerializer::Init(type, class2type);&#010;+  result = types-&gt;get(ETCH_DATETIME_TYPE_NAME(), type);&#010;+  result = EtchDateSerializer::Init(type, class2type);&#010; &#010;-  types-&gt;get(ETCH_AUTH_EXCEPTION_TYPE_NAME(), type);&#010;-  EtchAuthenticationExceptionSerializer::Init(type, class2type);&#010;+  result = types-&gt;get(ETCH_AUTH_EXCEPTION_TYPE_NAME(), type);&#010;+  result = EtchAuthenticationExceptionSerializer::Init(type, class2type);&#010; &#010;   {&#010;-    types-&gt;get(ETCH_EXCEPTION_MESSAGE_NAME(), type);&#010;+    result = types-&gt;get(ETCH_EXCEPTION_MESSAGE_NAME(), type);&#010;     capu::SmartPointer&lt;EtchValidator&gt; val;&#010;     EtchValidatorRuntimeException::Get(val);&#010;-    type-&gt;putValidator(_mf_result(), val);&#010;+    result = type-&gt;putValidator(_mf_result(), val);&#010;     EtchValidatorLong::Get(0, val);&#010;-    type-&gt;putValidator(_mf__messageId(), val);&#010;-    type-&gt;putValidator(_mf__inReplyTo(), val);&#010;+    result = type-&gt;putValidator(_mf__messageId(), val);&#010;+    result = type-&gt;putValidator(_mf__inReplyTo(), val);&#010;   }&#010;+&#010;+  return ETCH_OK;&#010; }&#010; &#010; const EtchType * EtchDefaultValueFactory::get_mt__Etch_RuntimeException() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -103,21 +103,34 @@ status_t EtchHashTableSerializer::Init(E&#010;   EtchRuntime* runtime = EtchRuntime::getRuntime();&#010; &#010;   status_t result;&#010;-  EtchField field_ptr;&#010;-  result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;-  if (result != ETCH_OK)&#010;+&#010;+  EtchField field;&#010;+  result = type-&gt;getField(FIELD_NAME(), &amp;field);&#010;+  if (result != ETCH_OK) {&#010;+    return result;&#010;+  }&#010;+  &#010;+  result = class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;+  }&#010;+  &#010;   type-&gt;setComponentType(EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE());&#010;+  &#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchHashTableSerializer(type, &amp;field_ptr));&#010;+  type-&gt;setImportExportHelper(new EtchHashTableSerializer(type, &amp;field));&#010;+  &#010;+  //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;   result = EtchValidatorObject::Get(1, tmp);&#010;-  if (result != ETCH_OK)&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  result = type-&gt;putValidator(field_ptr, tmp);&#010;-  if (result != ETCH_OK)&#010;+  }&#010;+  result = type-&gt;putValidator(field, tmp);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;+  }&#010;+&#010;   type-&gt;lock();&#010;   CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchHashTableSerializer has been initialized");&#010;   return ETCH_OK;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -104,11 +104,18 @@ status_t EtchListSerializer::Init(EtchTy&#010;     return result;&#010;   }&#010; &#010;-  class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;+  result = class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;+  if (result != ETCH_OK) {&#010;+    return result;&#010;+  }&#010;+&#010;   type-&gt;setComponentType(EtchList&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE());&#010;+&#010;   //set the import export helper&#010;   // TODO memory EtchField&#010;   type-&gt;setImportExportHelper(new EtchListSerializer(type, &amp;field));&#010;+  &#010;+  //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; validator;&#010;   result = EtchValidatorObject::Get(1, validator);&#010;   if (result != ETCH_OK) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -76,21 +76,35 @@ status_t EtchRuntimeExceptionSerializer:&#010;   EtchRuntime* runtime = EtchRuntime::getRuntime();&#010; &#010;   status_t result;&#010;-  EtchField field_ptr;&#010;-  result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;-  if (result != ETCH_OK)&#010;+&#010;+  EtchField field;&#010;+  result = type-&gt;getField(FIELD_NAME(), &amp;field);&#010;+  if (result != ETCH_OK) {&#010;+    return result;&#010;+  }&#010;+&#010;+  result = class2type-&gt;put(EtchRuntimeException::TYPE(), type);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  class2type-&gt;put(EtchRuntimeException::TYPE(), type);&#010;+  }&#010;+&#010;   type-&gt;setComponentType(EtchRuntimeException::TYPE());&#010;+&#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchRuntimeExceptionSerializer(type, &amp;field_ptr));&#010;+  type-&gt;setImportExportHelper(new EtchRuntimeExceptionSerializer(type, &amp;field));&#010;+&#010;+  //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;   result = EtchValidatorString::Get(0, tmp);&#010;-  if (result != ETCH_OK)&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  result = type-&gt;putValidator(field_ptr, tmp);&#010;-  if (result != ETCH_OK)&#010;+  }&#010;+  result = type-&gt;putValidator(field, tmp);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;+  }&#010;+&#010;+  //lock type&#010;   type-&gt;lock();&#010;   CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchRuntimeExceptionSerializer has been initialized");&#010;   return ETCH_OK;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -94,21 +94,34 @@ status_t EtchSetSerializer::Init(EtchTyp&#010;   EtchRuntime* runtime = EtchRuntime::getRuntime();&#010; &#010;   status_t result;&#010;-  EtchField field_ptr;&#010;-  result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;-  if (result != ETCH_OK)&#010;+&#010;+  EtchField field;&#010;+  result = type-&gt;getField(FIELD_NAME(), &amp;field);&#010;+  if (result != ETCH_OK) {&#010;+    return result;&#010;+  }&#010;+&#010;+  result = class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  class2type-&gt;put(EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE(), type);&#010;+  }&#010;+&#010;   type-&gt;setComponentType(EtchHashSet&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;::TYPE());&#010;+&#010;   //set the import export helper&#010;-  type-&gt;setImportExportHelper(new EtchSetSerializer(type, &amp;field_ptr));&#010;+  type-&gt;setImportExportHelper(new EtchSetSerializer(type, &amp;field));&#010;+&#010;+  //get validator&#010;   capu::SmartPointer&lt;EtchValidator&gt; tmp;&#010;   result = EtchValidatorObject::Get(1, tmp);&#010;-  if (result != ETCH_OK)&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;-  result = type-&gt;putValidator(field_ptr, tmp);&#010;-  if (result != ETCH_OK)&#010;+  }&#010;+  result = type-&gt;putValidator(field, tmp);&#010;+  if (result != ETCH_OK) {&#010;     return result;&#010;+  }&#010;+&#010;   type-&gt;lock();&#010;   CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchSetSerializer has been initialized");&#010;   return ETCH_OK;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp Thu Aug 23 16:48:16 2012&#010;@@ -24,6 +24,14 @@ EtchTypeMap::EtchTypeMap()&#010; }&#010; &#010; EtchTypeMap::~EtchTypeMap() {&#010;+  EtchHashTable&lt;capu::int32_t, EtchType*, capu::Hash, capu::Comparator &gt;::Iterator it = mById.begin();&#010;+  while (it.hasNext()) {&#010;+    capu::Pair&lt;capu::int32_t, EtchType*&gt; pair;&#010;+    it.next(&amp;pair);&#010;+    delete pair.second;&#010;+  }&#010;+  mById.clear();&#010;+  mByName.clear();&#010; }&#010; &#010; status_t EtchTypeMap::add(EtchType *type) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp Thu Aug 23 16:48:16 2012&#010;@@ -20,16 +20,22 @@&#010; #include "transport/EtchTransportData.h"&#010; #include "support/EtchRuntime.h"&#010; #include "util/EtchLogger.h"&#010;+#include "support/EtchStackClient.h"&#010; &#010; static char* TAG = "EtchRemoteBase";&#010; &#010;-EtchRemoteBase::EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf) &#010;-  : mSvc(svc), mVf(vf) {&#010;+EtchRemoteBase::EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack) &#010;+  : mSvc(svc), mVf(vf), mStack(stack) {&#010;   //TODO refactor this&#010;   mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchRemoteBase::~EtchRemoteBase() {&#010;+  if (mStack != NULL) {&#010;+    if (mStack-&gt;isInstanceOf(EtchStackClient::TYPE())) {&#010;+      delete mStack;&#010;+    }&#010;+  }&#010; }&#010; &#010; status_t EtchRemoteBase::newMessage( EtchType* type, capu::SmartPointer&lt;EtchMessage&gt; *message) {&#010;&#010;Added: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp?rev=1376588&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp (added)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp Thu Aug 23 16:48:16 2012&#010;@@ -0,0 +1,134 @@&#010;+/* $Id$&#010;+ * Licensed to the Apache Software Foundation (ASF) under one or more&#010;+ * contributor license agreements. See the NOTICE file distributed with&#010;+ * this work for additional information regarding copyright ownership.&#010;+ * The ASF licenses this file to you under the Apache License, Version&#010;+ * 2.0 (the "License"); you may not use this file except in compliance&#010;+ * with the License. You may obtain a copy of the License at&#010;+ *&#010;+ * http://www.apache.org/licenses/LICENSE-2.0&#010;+ *&#010;+ * Unless required by applicable law or agreed to in writing, software&#010;+ * distributed under the License is distributed on an "AS IS" BASIS,&#010;+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#010;+ * See the License for the specific language governing permissions and&#010;+ * limitations under the License.&#010;+ */&#010;+&#010;+#include "support/EtchStack.h"&#010;+#include "support/EtchTransportHelper.h"&#010;+&#010;+const EtchObjectType* EtchStack::TYPE() {&#010;+   const static EtchObjectType TYPE(EOTID_STACK, NULL);&#010;+   return &amp;TYPE;&#010;+}&#010;+&#010;+const EtchString&amp; EtchStack::STACK() {&#010;+  static const EtchString cmd("STACK");&#010;+  return cmd;&#010;+}&#010;+&#010;+EtchStack::EtchStack() : EtchObject()&#010;+  , mTransportData(NULL)&#010;+  , mTransportPacket(NULL)&#010;+  , mTransportMessage(NULL)&#010;+  , mResources(NULL)&#010;+  , mMailboxManager(NULL)&#010;+  , mDeliveryService(NULL)&#010;+  , mStub(NULL)&#010;+  {&#010;+    EtchObject::addObjectType(EtchStack::TYPE());&#010;+}&#010;+&#010;+EtchStack::~EtchStack() {&#010;+  if (mTransportMessage != NULL) {&#010;+    delete mTransportMessage;&#010;+  }&#010;+  if (mTransportPacket != NULL) {&#010;+    delete mTransportPacket;&#010;+  }&#010;+  if (mTransportData != NULL) {&#010;+    delete mTransportData;&#010;+  }&#010;+  if (mResources != NULL) {&#010;+    delete mResources;&#010;+  }&#010;+  if (mValueFactory != NULL) {&#010;+    delete mValueFactory;&#010;+  }&#010;+  if (mMailboxManager != NULL) {&#010;+    delete mMailboxManager;&#010;+  }&#010;+  if (mDeliveryService != NULL) {&#010;+    delete mDeliveryService;&#010;+  }&#010;+&#010;+  if (mStub != NULL) {&#010;+    delete mStub;&#010;+  }&#010;+}&#010;+&#010;+void EtchStack::setTransportData(EtchTransportData* transportData) {&#010;+  mTransportData = transportData;&#010;+}&#010;+&#010;+void EtchStack::setTransportPacket(EtchTransportPacket* transportPacket) {&#010;+  mTransportPacket = transportPacket;&#010;+}&#010;+&#010;+void EtchStack::setTransportMessage(EtchTransportMessage* transportMessage) {&#010;+  mTransportMessage = transportMessage;&#010;+}&#010;+&#010;+void EtchStack::setResources(EtchResources* resources) {&#010;+  mResources = resources;&#010;+}&#010;+&#010;+void EtchStack::setValueFactory(EtchValueFactory* valuefactory) {&#010;+  mValueFactory = valuefactory;&#010;+}&#010;+&#010;+void EtchStack::setMailboxManager(EtchMailboxManager* mailboxmanager) {&#010;+  mMailboxManager = mailboxmanager;&#010;+}&#010;+&#010;+void EtchStack::setDeliveryService(EtchDeliveryService* deliveryservice) {&#010;+  mDeliveryService = deliveryservice;&#010;+}&#010;+&#010;+void EtchStack::setStub(EtchSessionMessage* stub) {&#010;+  mStub = stub;&#010;+}&#010;+&#010;+EtchTransportData* EtchStack::getTransportData() {&#010;+  return mTransportData;&#010;+}&#010;+&#010;+EtchTransportPacket* EtchStack::getTransportPacket() {&#010;+  return mTransportPacket;&#010;+}&#010;+&#010;+EtchTransportMessage* EtchStack::getTransportMessage() {&#010;+  return mTransportMessage;&#010;+}&#010;+&#010;+EtchResources* EtchStack::getResources() {&#010;+  return mResources;&#010;+}&#010;+&#010;+EtchValueFactory* EtchStack::getValueFactory() {&#010;+  return mValueFactory;&#010;+}&#010;+&#010;+EtchMailboxManager* EtchStack::getMailboxManager() {&#010;+  return mMailboxManager;&#010;+}&#010;+&#010;+EtchDeliveryService* EtchStack::getDeliveryService() {&#010;+  return mDeliveryService;&#010;+}&#010;+&#010;+EtchSessionMessage* EtchStack::getStub() {&#010;+  return mStub;&#010;+}&#010;+&#010;&#010;Propchange: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStack.cpp&#010;------------------------------------------------------------------------------&#010;    svn:eol-style = native&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp (from r1376587, incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchClientStack.cpp)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp?p2=incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp&amp;p1=incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchClientStack.cpp&amp;r1=1376587&amp;r2=1376588&amp;rev=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchClientStack.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp Thu Aug 23 16:48:16 2012&#010;@@ -15,22 +15,22 @@&#010;  * limitations under the License.&#010;  */&#010; &#010;-#include "support/EtchClientStack.h"&#010;+#include "support/EtchStackClient.h"&#010;+#include "support/EtchTransportHelper.h"&#010; &#010;-EtchClientStack::EtchClientStack(EtchRemoteBase* rb, EtchSessionMessage *helper, EtchResources *res, EtchValueFactory* vf)&#010;-: mRemoteBase(rb), mStubHelper(helper),mResources(res), mVf(vf) {&#010;+const EtchObjectType* EtchStackClient::TYPE() {&#010;+   const static EtchObjectType TYPE(EOTID_STACK_CLIENT, NULL);&#010;+   return &amp;TYPE;&#010; }&#010; &#010;-EtchClientStack::~EtchClientStack() {&#010;-  status_t status;&#010;-  status = EtchTransportHelper::DestroyResources(mResources);&#010;-  if(status != ETCH_OK) {&#010;-    // Log error&#010;-  }&#010;-  if(mStubHelper != NULL) {&#010;-    delete mStubHelper;&#010;-  }&#010;-  if(mVf != NULL) {&#010;-    delete mVf;&#010;+EtchStackClient::EtchStackClient() : EtchStack(), mStaticResources(NULL) {&#010;+  EtchObject::addObjectType(EtchStackClient::TYPE());&#010;+  EtchObject::setObjectType(EtchStackClient::TYPE());&#010;+}&#010;+&#010;+EtchStackClient::~EtchStackClient() {&#010;+  if (mStaticResources != NULL) {&#010;+    EtchTransportHelper::DestroyResources(mStaticResources);&#010;   }&#010; }&#010;+&#010;&#010;Propchange: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp&#010;------------------------------------------------------------------------------&#010;    svn:eol-style = native&#010;&#010;Copied: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp (from r1376587, incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchServerStack.cpp)&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp?p2=incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp&amp;p1=incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchServerStack.cpp&amp;r1=1376587&amp;r2=1376588&amp;rev=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchServerStack.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -15,15 +15,31 @@&#010;  * limitations under the License.&#010;  */&#010; &#010;-#include "support/EtchServerStack.h"&#010;+#include "support/EtchStackServer.h"&#010; &#010;-EtchServerStack::EtchServerStack(EtchRemoteBase* rb, EtchSessionMessage *helper, EtchResources *res, EtchValueFactory* vf)&#010;-: mRemoteBase(rb), mStubHelper(helper),mResources(res), mVf(vf) {&#010;+const EtchObjectType* EtchStackServer::TYPE() {&#010;+   const static EtchObjectType TYPE(EOTID_STACK_SERVER, NULL);&#010;+   return &amp;TYPE;&#010; }&#010; &#010;-EtchServerStack::~EtchServerStack() {&#010;-  delete mResources;&#010;-  delete mRemoteBase;&#010;-  delete mStubHelper;&#010;-  delete mVf;&#010;+EtchStackServer::EtchStackServer()&#010;+: EtchStack()&#010;+  , mRemote(NULL)&#010;+{&#010;+  EtchObject::addObjectType(EtchStackServer::TYPE());&#010;+  EtchObject::setObjectType(EtchStackServer::TYPE());&#010;+}&#010;+&#010;+EtchStackServer::~EtchStackServer() {&#010;+  if (mRemote != NULL) {&#010;+    delete mRemote;&#010;+  }&#010;+}&#010;+&#010;+void EtchStackServer::setRemote(EtchRemoteBase* remote) {&#010;+  mRemote = remote;&#010;+}&#010;+&#010;+EtchRemoteBase* EtchStackServer::getRemote() {&#010;+  return mRemote;&#010; }&#010;&#010;Propchange: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackServer.cpp&#010;------------------------------------------------------------------------------&#010;    svn:eol-style = native&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp Thu Aug 23 16:48:16 2012&#010;@@ -67,9 +67,7 @@ void EtchDefaultDeliveryService::init(Et&#010; }&#010; &#010; EtchDefaultDeliveryService::~EtchDefaultDeliveryService() {&#010;-  if(mTransport != NULL) {&#010;-    delete mTransport;&#010;-  }&#010;+&#010; }&#010; &#010; const EtchMailboxManager* EtchDefaultDeliveryService::getTransport() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -51,8 +51,6 @@ EtchMessagizer::EtchMessagizer(EtchTrans&#010; }&#010; &#010; EtchMessagizer::~EtchMessagizer() {&#010;-  if(mTransport != NULL)&#010;-    delete mTransport;&#010;   if (mTdi != NULL)&#010;     delete mTdi;&#010;   if (mTdo != NULL)&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp Thu Aug 23 16:48:16 2012&#010;@@ -85,8 +85,7 @@ EtchPacketizer::EtchPacketizer(EtchTrans&#010; }&#010; &#010; EtchPacketizer::~EtchPacketizer() {&#010;-  if (mTransport != NULL)&#010;-    delete mTransport;&#010;+&#010; }&#010; &#010; capu::int32_t EtchPacketizer::getHeaderSize() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp Thu Aug 23 16:48:16 2012&#010;@@ -36,7 +36,6 @@ EtchPlainMailboxManager::~EtchPlainMailb&#010;     p.second-&gt;closeDelivery();&#010;     delete p.second;&#010;   }&#010;-  delete mTransport;&#010; }&#010; &#010; EtchTransportMessage* EtchPlainMailboxManager::getTransport() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp Thu Aug 23 16:48:16 2012&#010;@@ -122,7 +122,9 @@ status_t EtchTcpConnection::openSocket(c&#010;       }&#010;     }&#010;     // try to open a socket.&#010;-    mSocket = new EtchSocket();&#010;+    if (mSocket == NULL) {&#010;+      mSocket = new EtchSocket();&#010;+    }&#010;     if (mSocket-&gt;connect((unsigned char *) mHost.c_str(), mPort) == ETCH_OK) {&#010;       mMutexConnection.unlock();&#010;       CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Connection established", mHost.c_str(), mPort);&#010;@@ -131,6 +133,7 @@ status_t EtchTcpConnection::openSocket(c&#010;       mSocket-&gt;close();&#010;       delete mSocket;&#010;       mSocket = NULL;&#010;+      first = false;&#010;     }&#010;     CAPU_LOG_WARN(mRuntime-&gt;getLogger(), "EtchTcpConnection", "%s : %d =&gt; Connection could not be established for stack %d", mHost.c_str(), mPort);&#010;   }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp?rev=1376588&amp;r1=1376587&amp;r2=1376588&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp Thu Aug 23 16:48:16 2012&#010;@@ -21,11 +21,33 @@&#010; &#010; &#010; &#010;+EtchTcpListener::ConnectionChecker::ConnectionChecker(EtchTcpListener* listener) : mListener(listener){ }&#010;+&#010;+EtchTcpListener::ConnectionChecker::~ConnectionChecker() {}&#010;+&#010;+void EtchTcpListener::ConnectionChecker::run() {&#010;+  status_t result;&#010;+  while (mListener-&gt;mIsStarted) {&#010;+    if (mListener-&gt;mSession != NULL) {&#010;+      result = mListener-&gt;mSession-&gt;sessionNotify(new EtchString(EtchTcpListener::CONNECTION_CHECK()));&#010;+      if (result != ETCH_OK) {&#010;+        //TODO handle error&#010;+      }&#010;+      capu::Thread::Sleep(1000);&#010;+    }&#010;+  }&#010;+}&#010;+&#010; const EtchString&amp; EtchTcpListener::BACKLOG() {&#010;   static const EtchString name("TcpTransportFactory.socket");&#010;   return name;&#010; }&#010; &#010;+const EtchString&amp; EtchTcpListener::CONNECTION_CHECK() {&#010;+  static const EtchString name("connection.check");&#010;+  return name;&#010;+}&#010;+&#010; EtchTcpListener::EtchTcpListener(EtchURL *url)&#010; : mPort(url-&gt;getPort()) {&#010;   //TODO rafactor this&#010;@@ -45,6 +67,8 @@ EtchTcpListener::EtchTcpListener(EtchURL&#010;   mIsStarted = false;&#010;   mThread = NULL;&#010;   mSocket = NULL;&#010;+  mConnectionCheckerThread = NULL;&#010;+  mConnectionChecker = NULL;&#010; }&#010; &#010; EtchTcpListener::~EtchTcpListener() {&#010;@@ -52,12 +76,18 @@ EtchTcpListener::~EtchTcpListener() {&#010;     mThread-&gt;join();&#010;     delete mThread;&#010;   }&#010;+  if (mConnectionCheckerThread != NULL) {&#010;+    mConnectionCheckerThread-&gt;join();&#010;+    delete mConnectionCheckerThread;&#010;+  }&#010;   if (mSocket != NULL) {&#010;     mSocket-&gt;close();&#010;     delete mSocket;&#010;     mSocket = NULL;&#010;   }&#010; &#010;+  delete mConnectionChecker;&#010;+&#010; }&#010; &#010; capu::bool_t EtchTcpListener::isStarted() {&#010;@@ -65,8 +95,9 @@ capu::bool_t EtchTcpListener::isStarted(&#010; }&#010; &#010; status_t EtchTcpListener::close() {&#010;-  if (mSocket != NULL)&#010;+  if (mSocket != NULL) {&#010;     return mSocket-&gt;close();&#010;+  }&#010;   return ETCH_ERROR;&#010; }&#010; &#010;@@ -74,18 +105,19 @@ status_t EtchTcpListener::openSocket(cap&#010;   // if a one time connection from a server socket listener, just&#010;   // return the existing socket.&#010;   mMutexConnection.lock();&#010;-  if (!reconnect &amp;&amp; (mSocket != NULL)) {&#010;+  if (reconnect &amp;&amp; (mSocket != NULL)) {&#010;     mMutexConnection.unlock();&#010;     return ETCH_OK;&#010;   }&#010;-  while (isStarted()) {&#010;+  while (mIsStarted) {&#010;     // if reconnect is false and first is true, this is our&#010;     // very first attempt to connect. otherwise, we are trying&#010;     // to reconnect a broken link or establish a link where we&#010;     // have already failed at least once.&#010;     // try to open a socket.&#010;-&#010;-    mSocket = new EtchServerSocket();&#010;+    if (mSocket == NULL) {&#010;+      mSocket = new EtchServerSocket();&#010;+    }&#010;     if (mSocket-&gt;bind(mPort) == ETCH_OK) {&#010;       if (mSocket-&gt;listen(mBackLog) == ETCH_OK) {&#010;         mMutexConnection.unlock();&#010;@@ -97,7 +129,6 @@ status_t EtchTcpListener::openSocket(cap&#010;         CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpListener", "Listening on specified port has failed");&#010;       }&#010;     } else {&#010;-      mSocket-&gt;close();&#010;       delete mSocket;&#010;       mSocket = NULL;&#010;       CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpListener", "Binding to specified port has failed");&#010;@@ -110,7 +141,7 @@ status_t EtchTcpListener::openSocket(cap&#010; &#010; status_t EtchTcpListener::readSocket() {&#010;   EtchSocket* s = NULL;&#010;-  while (isStarted()) {&#010;+  while (mIsStarted) {&#010;     s = mSocket-&gt;accept();&#010;     if (s == NULL)&#010;       break;&#010;@@ -136,8 +167,11 @@ status_t EtchTcpListener::transportContr&#010;     mIsStarted = true;&#010;     mMutex.unlock();&#010;     mThread = new capu::Thread(this);&#010;+    mConnectionChecker = new ConnectionChecker(this);&#010;+    mConnectionCheckerThread = new capu::Thread(mConnectionChecker);&#010;     mThread-&gt;start();&#010;     CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "EtchTcpListener", "Start command received and EtchTcpListener starts listening on port %d", mPort);&#010;+    mConnectionCheckerThread-&gt;start();&#010;     return ETCH_OK;&#010;   }&#010; &#010;@@ -150,8 +184,11 @@ status_t EtchTcpListener::transportContr&#010;     mIsStarted = true;&#010;     mMutex.unlock();&#010;     mThread = new capu::Thread(this);&#010;+    mConnectionChecker = new ConnectionChecker(this);&#010;+    mConnectionCheckerThread = new capu::Thread(mConnectionChecker);&#010;     mThread-&gt;start();&#010;     CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "EtchTcpListener", "Start and wait up command received and EtchTcpListener starts listening on port %d", mPort);&#010;+    mConnectionCheckerThread-&gt;start();&#010;     return waitUp(((EtchInt32*) value.get())-&gt;get());&#010;   }&#010; &#010;@@ -175,10 +212,9 @@ status_t EtchTcpListener::transportContr&#010;     mMutex.lock();&#010;     mIsStarted = false;&#010;     mMutex.unlock();&#010;-    status_t ret = waitDown(((EtchInt32*) value.get())-&gt;get());&#010;     close();&#010;     CAPU_LOG_DEBUG(mRuntime-&gt;getLogger(), "EtchTcpListener", "Stop and wait command received and EtchTcpListener sets the stop flag");&#010;-    //TODO: Wait handling in one of the next releases&#010;+    status_t ret = waitDown(((EtchInt32*) value.get())-&gt;get());&#010;     return ret;&#010;   }&#010; &#010;@@ -223,7 +259,7 @@ void EtchTcpListener::run() {&#010; &#010;   while (mIsStarted) {&#010; &#010;-    if (openSocket(!first) != ETCH_OK) {&#010;+    if (openSocket(first) != ETCH_OK) {&#010;       CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), "EtchTcpListener", "Socket has not been created");&#010;       break;&#010;     }&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1376587 - in /incubator/etch/trunk: binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ binding-cpp/runtime/include/common/ binding-cpp/runtime/include/support/ binding-cpp/runtime/src/main/common/ binding-cpp/ru...</title>
<author><name>fitzner@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201208.mbox/%3c20120823164638.8B05723888FD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120823164638-8B05723888FD@eris-apache-org%3e</id>
<updated>2012-08-23T16:46:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: fitzner&#010;Date: Thu Aug 23 16:46:37 2012&#010;New Revision: 1376587&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1376587&amp;view=rev&#010;Log:&#010;ETCH-198 Changed remote compiler template&#010;&#010;Implemented initial client answers&#010;&#010;Change-Id: I2bc036e131e9b5e90ffd1a204b14f9b49c0cafc2&#010;&#010;Added:&#010;    incubator/etch/trunk/examples/helloworld/java/.classpath&#010;    incubator/etch/trunk/examples/helloworld/java/.project&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm&#010;    incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h&#010;    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPlainMailbox.cpp&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp&#010;    incubator/etch/trunk/examples/helloworld/cpp/src/main/include/MainHelloWorldClient.h&#010;    incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_cpp.vm&#010;Thu Aug 23 16:46:37 2012&#010;@@ -35,8 +35,9 @@ using namespace $namespace;&#010; #foreach($n in $intf.iterator())&#010; #if($n.isMsgDir($mc))&#010; #if(!$n.isHidden())&#010;-$clname::$n.name()AsyncResultRemote::$n.name()AsyncResultRemote(EtchRuntime* runtime, EtchMailbox*&#010;mailbox) &#010;-  : #if($n.hasReturn())EtchAsyncResult&lt;$helper.getEtchTypeName($n.type(), false)&gt;(runtime,&#010;mailbox)#{else}EtchAsyncResultNone(runtime, mailbox)#end {&#010;+$clname::$n.name()AsyncResultRemote::$n.name()AsyncResultRemote($clname* base, EtchMailbox*&#010;mailbox) &#010;+  : #if($n.hasReturn())EtchAsyncResult&lt;$helper.getEtchTypeName($n.type(), false)&gt;(base-&gt;mRuntime,&#010;mailbox)#{else}EtchAsyncResultNone(base-&gt;mRuntime, mailbox)#end {&#010;+  mBase = base;&#010; }&#010; &#010; $clname::$n.name()AsyncResultRemote::~$n.name()AsyncResultRemote() {&#010;@@ -44,7 +45,28 @@ $clname::$n.name()AsyncResultRemote::~$n&#010; &#010; &#010; status_t $clname::$n.name()AsyncResultRemote::mailboxStatus(EtchMailbox* mb, EtchObject*&#010;state, capu::bool_t closed) {&#010;-  //TODO implemented callback&#010;+#if(!$n.isOneway())&#010;+  status_t status;&#010;+&#010;+  if(!closed) {&#010;+    capu::SmartPointer&lt;EtchObject&gt; result;&#010;+    status = mBase-&gt;endcall(mb, $vfname::$n.getResultMessage().vname($helper), result);&#010;+    if(status != ETCH_OK) {&#010;+      // TODO set result to a runtime exception &#010;+      return ETCH_OK;&#010;+    }&#010;+    if(result-&gt;isInstanceOf(EtchException::TYPE())) {&#010;+      setException(result);&#010;+    }&#010;+#if($n.hasReturn())&#010;+    else {&#010;+      setResult(result);&#010;+    }&#010;+#end&#010;+&#010;+  }&#010;+&#010;+#end&#010;   return ETCH_OK;&#010; }&#010; &#010;@@ -70,7 +92,7 @@ $intfname::$n.name()AsyncResultPtr $clna&#010;     // TODO log error&#010;   }&#010; &#010;-  $n.name()AsyncResultRemote* result = new $n.name()AsyncResultRemote(base-&gt;mRuntime,&#010;mb); &#010;+  $n.name()AsyncResultRemote* result = new $n.name()AsyncResultRemote(base, mb); &#010;   return result;&#010; }&#010; &#010;@@ -103,13 +125,10 @@ $clname::~$clname() {&#010; #if(!$methodList.contains($n.name().name()))&#010; #set ( $addMethodListStatus = $methodList.add($n.name().name()))&#010; &#010;-#if(!$n.isMsgDirBoth())&#010;-#if($n.isOneway())&#010;+#if($hasBaseClass &amp;&amp; $n.isMsgDirBoth())&#010; $intfname::$n.name()AsyncResultPtr $clname::$n.name()(#set( $sep = "" )#foreach( $p in $n.iterator()&#010;)$sep$helper.getEtchTypeName( $p.type(), true ) $p.name() #set( $sep = ", " )#end) {&#010;-  $n.name()AsyncResultPtr result = $clname::$n.name()AsyncResultRemote::Begin(this, #set($sep&#010;= "")#foreach($p in $n.iterator())$p.name() #set( $sep = ", ")#end);&#010;-  return result;&#010;+  return Remote$i::$n.name()(#set( $sep = "" )#foreach( $p in $n.iterator() )$sep$p.name()&#010;#set( $sep = ", " )#end);&#010; }&#010;-&#010; #else&#010; $intfname::$n.name()AsyncResultPtr $clname::$n.name()(#set( $sep = "" )#foreach( $p in $n.iterator()&#010;)$sep$helper.getEtchTypeName( $p.type(), true ) $p.name() #set( $sep = ", " )#end) {&#010;   $n.name()AsyncResultPtr result = $clname::$n.name()AsyncResultRemote::Begin(this, #set($sep&#010;= "")#foreach($p in $n.iterator())$p.name() #set( $sep = ", ")#end);&#010;@@ -117,12 +136,6 @@ $intfname::$n.name()AsyncResultPtr $clna&#010; }&#010; &#010; #end&#010;-#else&#010;-$intfname::$n.name()AsyncResultPtr $clname::$n.name()(#set( $sep = "" )#foreach( $p in $n.iterator()&#010;)$sep$helper.getEtchTypeName( $p.type(), true ) $p.name() #set( $sep = ", " )#end) {&#010;-  return Remote$i::$n.name()(#set( $sep = "" )#foreach( $p in $n.iterator() )$sep$p.name()&#010;#set( $sep = ", " )#end);&#010;-}&#010;-#end&#010;-&#010; #end&#010; #end&#010; #end&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/remote_h.vm&#010;Thu Aug 23 16:46:37 2012&#010;@@ -64,7 +64,7 @@ namespace $namespace {&#010;       /**&#010;        * Create a new instance from $clname class&#010;        */&#010;-      $n.name()AsyncResultRemote(EtchRuntime* runtime, EtchMailbox* mailbox);&#010;+      $n.name()AsyncResultRemote($clname* base, EtchMailbox* mailbox);&#010; &#010;       /**&#010;        * Destructor&#010;@@ -80,6 +80,9 @@ namespace $namespace {&#010;        * Create a new instance from $clname class&#010;        */&#010;        static $n.name()AsyncResultPtr Begin($clname* base, #set($sep = "")#foreach($p in&#010;$n.iterator())$sep$helper.getEtchTypeName($p.type(), true) $p.name()#set($sep = ", ")#end);&#010;+&#010;+    private:&#010;+        $clname* mBase;&#010;     };&#010; &#010; #end&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;(original)&#010;+++ incubator/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/stub_h.vm&#010;Thu Aug 23 16:46:37 2012&#010;@@ -80,9 +80,7 @@ public:&#010;     // create result message&#010; #if($mthd.hasReturn())&#010;     if(ar-&gt;hasResult()) {&#010;-        capu::SmartPointer&lt;$helper.getEtchTypeName($mthd.type(), false)&gt; result;&#010;-        ar-&gt;getResult(result);&#010;-        _rmsg-&gt;put(ValueFactory$i::_mf_result(), result);&#010;+        _rmsg-&gt;put(ValueFactory$i::_mf_result(), ar-&gt;getResult());&#010;     } else&#010; #end&#010;     if(ar-&gt;hasException()) {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h Thu Aug 23 16:46:37&#010;2012&#010;@@ -20,7 +20,7 @@&#010; #define __ETCHOBJECT_H__&#010; &#010; #include "capu/util/SmartPointer.h"&#010;-#include "capu/container/List.h"&#010;+#include "capu/container/List.h"&#010; #include "EtchError.h"&#010; &#010; class EtchObjectType;&#010;@@ -49,17 +49,16 @@ public:&#010;   virtual ~EtchObject();&#010; &#010;   /**&#010;-  * Returns object type id of this type.&#010;-  */&#010;+   */&#010;   virtual const EtchObjectType* getObjectType() const;&#010; &#010;-  /**&#010;-   * Returns true if the type hierarchy of this instance&#010;-   * is from the given type.&#010;-   * @param type to check&#010;-   * @return true if the instance is compatible to the given type&#010;-   */&#010;-   virtual capu::bool_t isInstanceOf(const EtchObjectType* type) const;&#010;+  /**&#010;+   * Returns true if the type hierarchy of this instance&#010;+   * is from the given type.&#010;+   * @param type to check&#010;+   * @return true if the instance is compatible to the given type&#010;+   */&#010;+  virtual capu::bool_t isInstanceOf(const EtchObjectType* type) const;&#010; &#010;   /**&#010;    * Returns hash code&#010;@@ -72,19 +71,19 @@ public:&#010;    */&#010;   virtual capu::bool_t equals(const EtchObject * other) const;&#010; &#010;-  protected:&#010;-    /**&#010;-     * Adds the object type to the type hierachy of this instance.&#010;-     * @param type that should be added to type hierachy of this instance.&#010;-     */&#010;-    virtual status_t addObjectType(const EtchObjectType* type);&#010;-&#010;-    // TODO remove me if object hierachy was refactored&#010;-    virtual status_t setObjectType(const EtchObjectType* type);&#010;-&#010;-  private:&#010;-    const EtchObjectType* mType;&#010;-    capu::List&lt;const EtchObjectType*&gt; mTypes;&#010;+protected:&#010;+  /**&#010;+   * Adds the object type to the type hierachy of this instance.&#010;+   * @param type that should be added to type hierachy of this instance.&#010;+   */&#010;+  virtual status_t addObjectType(const EtchObjectType* type);&#010;+&#010;+  // TODO remove me if object hierachy was refactored&#010;+  virtual status_t setObjectType(const EtchObjectType* type);&#010;+&#010;+private:&#010;+  const EtchObjectType* mType;&#010;+  capu::List&lt;const EtchObjectType*&gt; mTypes;&#010; };&#010; &#010; typedef capu::SmartPointer&lt;EtchObject&gt; EtchObjectPtr;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h Thu Aug 23&#010;16:46:37 2012&#010;@@ -75,15 +75,14 @@ public:&#010;   /**&#010;    * Returns the result&#010;    */&#010;-  status_t getResult(capu::SmartPointer&lt;T&gt; &amp;result) {&#010;+  capu::SmartPointer&lt;T&gt; getResult() {&#010;     if(hasException()) {&#010;-      return ETCH_ERROR;&#010;-    }&#010;+      return NULL;&#010;+    } else&#010;     if(hasResult()) {&#010;-      result = mResult;&#010;-      return ETCH_OK;&#010;+      return mResult;&#010;     }&#010;-    return ETCH_OK;&#010;+    return NULL;&#010;   }&#010; &#010; private:&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResultNone.h Thu Aug&#010;23 16:46:37 2012&#010;@@ -62,7 +62,7 @@ public:&#010;   /**&#010;    * @see EtchNotify&#010;    */&#010;-  virtual status_t mailboxStatus(EtchMailbox* mb, EtchObject* state, capu::bool_t closed);&#010;+  virtual status_t mailboxStatus(EtchMailbox* mb, EtchObject* state, capu::bool_t closed)&#010;{return ETCH_OK;};&#010; &#010; protected:&#010;   EtchRuntime* mRuntime;&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchException.cpp Thu Aug 23&#010;16:46:37 2012&#010;@@ -23,13 +23,17 @@ const EtchObjectType* EtchException::TYP&#010; }&#010; &#010; EtchException::EtchException()&#010;-: EtchObject(EtchException::TYPE()), mErrorMessage(""), mErrorcode(0), mExcptype(0) {&#010;-&#010;+: EtchObject(), mErrorMessage(""), mErrorcode(0), mExcptype(0) {&#010;+  EtchObject::addObjectType(EtchException::TYPE());&#010;+  // TODO change object hierachy&#010;+  EtchObject::setObjectType(EtchException::TYPE());&#010; }&#010; &#010; EtchException::EtchException(EtchString msg, status_t errcode, EtchExceptionType type)&#010;-: EtchObject(EtchException::TYPE()), mErrorMessage(msg), mErrorcode(errcode), mExcptype(type)&#010;{&#010;-&#010;+: EtchObject(), mErrorMessage(msg), mErrorcode(errcode), mExcptype(type) {&#010;+  EtchObject::addObjectType(EtchException::TYPE());&#010;+  // TODO change object hierachy&#010;+  EtchObject::setObjectType(EtchException::TYPE());&#010; }&#010; &#010; EtchException::EtchException(EtchString msg, status_t errcode, EtchExceptionType type, const&#010;EtchObjectType* type_id)&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchAsyncResultNone.cpp Thu&#010;Aug 23 16:46:37 2012&#010;@@ -38,8 +38,6 @@ EtchAsyncResultNone::~EtchAsyncResultNon&#010; capu::bool_t EtchAsyncResultNone::hasException() {&#010;   mMutex.lock();&#010;   while(!mHasMailboxStatus) {&#010;-    // TODO wait&#010;-    break;&#010;     mCond.wait(&amp;mMutex);&#010;   }&#010;   mMutex.unlock();&#010;@@ -61,17 +59,3 @@ void EtchAsyncResultNone::setException(c&#010;   mCond.signal();&#010;   mMutex.unlock();&#010; }&#010;-&#010;-status_t EtchAsyncResultNone::mailboxStatus(EtchMailbox* mb, EtchObject* state, capu::bool_t&#010;closed) {&#010;-&#010;-  // TODO get data or exception from mailbox&#010;-  // TODO call onResult( EtchObject* state);&#010;-  // TODO call onEception( EtchObject* state);&#010;-  // TODO setException(NULL);&#010;-  // TODO call delegate&#010;-  mMutex.lock();&#010;-  mHasMailboxStatus = true;&#010;-  mCond.signal();&#010;-  mMutex.unlock();&#010;-  return ETCH_OK;&#010;-}&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPlainMailbox.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPlainMailbox.cpp?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPlainMailbox.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchPlainMailbox.cpp Thu Aug&#010;23 16:46:37 2012&#010;@@ -66,12 +66,12 @@ void EtchPlainMailbox::fireNotify() {&#010;   n = mNotify;&#010;   s = mState;&#010;   c = mQueue.isClosed();&#010;+  &#010;+  mMutex.unlock();&#010; &#010;   if (n != NULL) {&#010;     n-&gt;mailboxStatus(this, s, c);&#010;   }&#010;-  // TODO: check if the unlock must be so late&#010;-  mMutex.unlock();&#010; }&#010; &#010; status_t EtchPlainMailbox::read(EtchMailbox::EtchElement*&amp; result) {&#010;@@ -120,11 +120,60 @@ status_t EtchPlainMailbox::closeRead() {&#010; }&#010; &#010; status_t EtchPlainMailbox::registerNotify(EtchMailbox::EtchNotify* notify, EtchObject* state,&#010;capu::int32_t maxDelay) {&#010;-  return ETCH_EUNIMPL;&#010;+  if(notify == NULL) {&#010;+    return ETCH_EINVAL;&#010;+  }&#010;+&#010;+  if(maxDelay &lt; 0) {&#010;+    return ETCH_EINVAL;&#010;+  }&#010;+&#010;+  capu::bool_t isNotEmptyOrIsClosed;&#010;+&#010;+  mMutex.lock();&#010;+&#010;+  if(mNotify != NULL) {&#010;+    mMutex.unlock();&#010;+    return ETCH_EINVAL;&#010;+  }&#010;+&#010;+  mNotify = notify;&#010;+  mState = state;&#010;+&#010;+  isNotEmptyOrIsClosed = !mQueue.isEmpty() || mQueue.isClosed();&#010;+&#010;+  mMutex.unlock();&#010;+&#010;+  if(isNotEmptyOrIsClosed) {&#010;+    fireNotify();&#010;+  }&#010;+&#010;+  return ETCH_OK;&#010; }&#010; &#010; status_t EtchPlainMailbox::unregisterNotify(EtchMailbox::EtchNotify* notify) {&#010;-  return ETCH_EUNIMPL;&#010;+&#010;+  if(mNotify == NULL) {&#010;+    return ETCH_EINVAL;&#010;+  }&#010;+&#010;+  if(notify == NULL) {&#010;+    return ETCH_OK;&#010;+  }&#010;+&#010;+  mMutex.lock();&#010;+&#010;+  if(mNotify !=  notify) {&#010;+    mMutex.unlock();&#010;+    return ETCH_EINVAL;&#010;+  }&#010;+&#010;+  mNotify = NULL;&#010;+  mState = NULL;&#010;+&#010;+  mMutex.unlock();&#010;+&#010;+  return ETCH_OK;&#010; }&#010; &#010; capu::bool_t EtchPlainMailbox::isEmpty() {&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchObjectTest.cpp Thu Aug 23&#010;16:46:37 2012&#010;@@ -19,9 +19,61 @@&#010; #include &lt;gtest/gtest.h&gt;&#010; #include "common/EtchString.h"&#010; &#010;+class EtchObjectMy1Object : public EtchObject {&#010;+public:&#010;+&#010;+   /**&#010;+   * EtchObjectType for EtchObjectMyObject.&#010;+   */&#010;+  static const EtchObjectType* TYPE() {&#010;+    const static EtchObjectType TYPE(11, NULL);&#010;+    return &amp;TYPE;&#010;+  }&#010;+&#010;+  /**&#010;+   * Constructor&#010;+   */&#010;+  EtchObjectMy1Object()&#010;+    : EtchObject() {&#010;+      EtchObject::addObjectType(TYPE());&#010;+  }&#010;+&#010;+};&#010;+&#010;+class EtchObjectMy2Object : public EtchObject {&#010;+public:&#010;+&#010;+   /**&#010;+   * EtchObjectType for EtchObjectMyObject.&#010;+   */&#010;+  static const EtchObjectType* TYPE() {&#010;+    const static EtchObjectType TYPE(12, NULL);&#010;+    return &amp;TYPE;&#010;+  }&#010;+&#010;+  /**&#010;+   * Constructor&#010;+   */&#010;+  EtchObjectMy2Object()&#010;+    : EtchObject() {&#010;+      EtchObject::addObjectType(TYPE());&#010;+  }&#010;+&#010;+};&#010;+&#010;+&#010; TEST(EtchObjectTest, getTypeTrait) {&#010;   EXPECT_EQ(EtchObjectType::VALUE, EtchObjectType::getTypeTrait&lt;EtchString&gt;());&#010;   EXPECT_EQ(EtchObjectType::POINTER, EtchObjectType::getTypeTrait&lt;EtchString*&gt;());&#010;   EXPECT_EQ(EtchObjectType::SMART_POINTER, EtchObjectType::getTypeTrait&lt;capu::SmartPointer&lt;EtchString&gt;&#010;&gt;());&#010; &#010; }&#010;+&#010;+TEST(EtchObjectTest, isInstanceOf) {&#010;+  EtchObjectMy1Object* o1 = new EtchObjectMy1Object();&#010;+  EXPECT_EQ(true, o1-&gt;isInstanceOf(EtchObjectMy1Object::TYPE()));&#010;+  EXPECT_EQ(true, o1-&gt;isInstanceOf(EtchObject::TYPE()));&#010;+  EXPECT_EQ(false, o1-&gt;isInstanceOf(EtchObjectMy2Object::TYPE()));&#010;+&#010;+  delete o1;&#010;+}&#010;\ No newline at end of file&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/cpp/src/main/include/MainHelloWorldClient.h&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/cpp/src/main/include/MainHelloWorldClient.h?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/cpp/src/main/include/MainHelloWorldClient.h (original)&#010;+++ incubator/etch/trunk/examples/helloworld/cpp/src/main/include/MainHelloWorldClient.h Thu&#010;Aug 23 16:46:37 2012&#010;@@ -19,11 +19,11 @@ namespace org_apache_etch_examples_hello&#010;    * Main program for HelloWorldClient. This program makes a connection to the&#010;    * listener created by MainHelloWorldListener.&#010;    */&#010;-  class MainHelloWorldClient&#010;+  class MainHelloWorldClientFactory&#010;    : public HelloWorldHelper::HelloWorldClientFactory&#010;   {&#010;   public:&#010;-    virtual ~MainHelloWorldClient() {}&#010;+    virtual ~MainHelloWorldClientFactory() {}&#010;     HelloWorldClient* newHelloWorldClient(RemoteHelloWorldServer* server);&#010;   };&#010; }&#010;&#010;Modified: incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp?rev=1376587&amp;r1=1376586&amp;r2=1376587&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp (original)&#010;+++ incubator/etch/trunk/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp Thu&#010;Aug 23 16:46:37 2012&#010;@@ -16,7 +16,7 @@&#010; &#010; using namespace org_apache_etch_examples_helloworld_HelloWorld;&#010; &#010;-HelloWorldClient* MainHelloWorldClient::newHelloWorldClient(RemoteHelloWorldServer* server)&#010;+HelloWorldClient* MainHelloWorldClientFactory::newHelloWorldClient(RemoteHelloWorldServer*&#010;server)&#010; {&#010;   return new ImplHelloWorldClient(server);&#010; }&#010;@@ -35,16 +35,15 @@ capu::int32_t main(int argc, const char*&#010;   // TODO Change to correct URI&#010;   EtchString uri("tcp://127.0.0.1:4001");&#010; &#010;-  MainHelloWorldClient mc;&#010;-  status_t result;&#010;+  MainHelloWorldClientFactory mc;&#010; &#010;+  status_t result;&#010;   RemoteHelloWorldServer *remote = NULL;&#010;   result = HelloWorldHelper::newServer(runtime, uri, NULL, mc, remote);&#010;   if (result != ETCH_OK) {&#010;     //TODO Handle error&#010;   }&#010; &#010;-&#010;   // Connect to the service&#010;   result = remote-&gt;transportControl(new EtchString(EtchTransportData::START_AND_WAIT_UP()),&#010;new EtchInt32(4000));&#010;   if (result != ETCH_OK) {&#010;@@ -52,8 +51,16 @@ capu::int32_t main(int argc, const char*&#010;   }&#010; &#010;   HelloWorld::userPtr myUser = new HelloWorld::user(new EtchInt32(1),new EtchString("World"));&#010;-  remote-&gt;say_hello(myUser);&#010;-  &#010;+  HelloWorldServer::say_helloAsyncResultPtr say_helloResult = remote-&gt;say_hello(myUser);&#010;+  if(say_helloResult-&gt;hasException()) {&#010;+    capu::SmartPointer&lt;EtchException&gt; exception = say_helloResult-&gt;getException();&#010;+    printf("say_hello FAILED: exception=%s \n", exception-&gt;getErrorMessage().c_str());&#010;+  }&#010;+  if(say_helloResult-&gt;hasResult()) {&#010;+    capu::SmartPointer&lt;EtchString&gt; result = say_helloResult-&gt;getResult();&#010;+    printf("say_hello OK: result=%s\n", result-&gt;c_str());&#010;+  }&#010;+&#010;   // Disconnect from the service&#010;   remote-&gt;transportControl(new EtchString(EtchTransportData::STOP_AND_WAIT_DOWN()), new&#010;EtchInt32(4000));&#010; &#010;&#010;Added: incubator/etch/trunk/examples/helloworld/java/.classpath&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/java/.classpath?rev=1376587&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/java/.classpath (added)&#010;+++ incubator/etch/trunk/examples/helloworld/java/.classpath Thu Aug 23 16:46:37 2012&#010;@@ -0,0 +1,8 @@&#010;+&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#010;+&lt;classpath&gt;&#010;+&#009;&lt;classpathentry kind="src" path="src/main"/&gt;&#010;+&#009;&lt;classpathentry kind="src" path="target/generated-sources/java"/&gt;&#010;+&#009;&lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/&gt;&#010;+&#009;&lt;classpathentry kind="var" path="ETCH_HOME/binding-java/lib/apache-etch-java-runtime-1.3.0-incubating.jar"/&gt;&#010;+&#009;&lt;classpathentry kind="output" path="bin"/&gt;&#010;+&lt;/classpath&gt;&#010;&#010;Added: incubator/etch/trunk/examples/helloworld/java/.project&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/java/.project?rev=1376587&amp;view=auto&#010;==============================================================================&#010;--- incubator/etch/trunk/examples/helloworld/java/.project (added)&#010;+++ incubator/etch/trunk/examples/helloworld/java/.project Thu Aug 23 16:46:37 2012&#010;@@ -0,0 +1,17 @@&#010;+&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#010;+&lt;projectDescription&gt;&#010;+&#009;&lt;name&gt;org.apache.etch.binding-java.examples.helloworld&lt;/name&gt;&#010;+&#009;&lt;comment&gt;&lt;/comment&gt;&#010;+&#009;&lt;projects&gt;&#010;+&#009;&lt;/projects&gt;&#010;+&#009;&lt;buildSpec&gt;&#010;+&#009;&#009;&lt;buildCommand&gt;&#010;+&#009;&#009;&#009;&lt;name&gt;org.eclipse.jdt.core.javabuilder&lt;/name&gt;&#010;+&#009;&#009;&#009;&lt;arguments&gt;&#010;+&#009;&#009;&#009;&lt;/arguments&gt;&#010;+&#009;&#009;&lt;/buildCommand&gt;&#010;+&#009;&lt;/buildSpec&gt;&#010;+&#009;&lt;natures&gt;&#010;+&#009;&#009;&lt;nature&gt;org.eclipse.jdt.core.javanature&lt;/nature&gt;&#010;+&#009;&lt;/natures&gt;&#010;+&lt;/projectDescription&gt;&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1376586 - /incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp</title>
<author><name>fitzner@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201208.mbox/%3c20120823164528.765AE23889D5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120823164528-765AE23889D5@eris-apache-org%3e</id>
<updated>2012-08-23T16:45:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: fitzner&#010;Date: Thu Aug 23 16:45:28 2012&#010;New Revision: 1376586&#010;&#010;URL: http://svn.apache.org/viewvc?rev=1376586&amp;view=rev&#010;Log:&#010;ETCH-243 EtchRuntimeTest Warning Fix&#010;&#010;- warning fix EQ(false, foo())&#010;- Assert to Expect&#010;&#010;Change-Id: I5163338cc51b404427118ed3f709a3f9948ed19d&#010;&#010;Modified:&#010;    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp?rev=1376586&amp;r1=1376585&amp;r2=1376586&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp Thu Aug&#010;23 16:45:28 2012&#010;@@ -32,9 +32,9 @@ TEST(EtchRuntime, getId) {&#010; &#010; TEST(EtchRuntime, isClosed) {&#010;   EtchRuntime* runtime = new EtchRuntime();&#010;-  ASSERT_EQ(false, runtime-&gt;isClosed());&#010;+  EXPECT_FALSE(runtime-&gt;isClosed());&#010;   runtime-&gt;shutdown();&#010;-  ASSERT_EQ(true, runtime-&gt;isClosed());&#010;+  EXPECT_TRUE(runtime-&gt;isClosed());&#010;   delete runtime;&#010; }&#010; &#010;@@ -43,7 +43,7 @@ public:&#010;   /**&#010;    * Constructor&#010;    */&#010;-  EtchRuntimeTestListener() &#010;+  EtchRuntimeTestListener()&#010;     : mId(0) {&#010;   }&#010; &#010;@@ -61,22 +61,22 @@ public:&#010; TEST(EtchRuntime, registerListener) {&#010;   status_t status;&#010;   EtchRuntime* runtime = new EtchRuntime();&#010;-  &#010;+&#010;   status = runtime-&gt;registerListener(NULL);&#010;-  ASSERT_EQ(ETCH_EINVAL, status);&#010;+  EXPECT_EQ(ETCH_EINVAL, status);&#010; &#010;   EtchRuntimeTestListener listener;&#010;   status = runtime-&gt;registerListener(&amp;listener);&#010;-  ASSERT_EQ(ETCH_OK, status);&#010;+  EXPECT_EQ(ETCH_OK, status);&#010; &#010;   // a shutdown leads to a runtime change&#010;   runtime-&gt;shutdown();&#010; &#010;   status = runtime-&gt;unregisterListener(&amp;listener);&#010;-  ASSERT_EQ(ETCH_OK, status);&#010;+  EXPECT_EQ(ETCH_OK, status);&#010; &#010;   // check if callback was fired&#010;-  ASSERT_EQ(1, listener.mId);&#010;+  EXPECT_EQ(1, listener.mId);&#010; &#010;   delete runtime;&#010; }&#010;&#010;&#010;&#010;
</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r1376584 [2/3] - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ include/serialization/ include/support/ include/transport/ include/util/ lib/capu/modules/capu/ lib/capu/modules/capu/include/capu/container/ lib/capu/modules/ca...</title>
<author><name>fitzner@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/incubator-etch-commits/201208.mbox/%3c20120823164254.AD30B23889D5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20120823164254-AD30B23889D5@eris-apache-org%3e</id>
<updated>2012-08-23T16:42:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp Thu Aug 23 16:42:45 2012&#010;@@ -18,7 +18,9 @@&#010; &#010; &#010; #include "serialization/EtchHashTableSerializer.h"&#010;+#include "support/EtchRuntime.h"&#010; &#010;+static char* TAG = "EtchHashTableSerializer";&#010; &#010; const EtchString&amp; EtchHashTableSerializer::FIELD_NAME() {&#010;   static const EtchString name("keysAndValues");&#010;@@ -27,11 +29,11 @@ const EtchString&amp; EtchHashTableSerialize&#010; &#010; EtchHashTableSerializer::EtchHashTableSerializer(EtchType* type, EtchField* field)&#010; : mField(*field), mType(type) {&#010;-&#010;+  //TODO refactoring&#010;+  mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchHashTableSerializer::~EtchHashTableSerializer() {&#010;-&#010; }&#010; &#010; status_t EtchHashTableSerializer::exportValue(EtchValueFactory* vf, capu::SmartPointer&lt;EtchObject&gt; value, EtchStructValue*&amp; result) {&#010;@@ -42,10 +44,10 @@ status_t EtchHashTableSerializer::export&#010; &#010;   capu::SmartPointer&lt;EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; table = capu::smartpointer_cast&lt;EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; (value);&#010; &#010;-  EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt; , capu::SmartPointer&lt;EtchObject&gt; &gt;::Iterator it = table-&gt;begin();&#010;+  EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;::Iterator it = table-&gt;begin();&#010;   capu::SmartPointer&lt;EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; keysAndValuesArray = new EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; (table-&gt;count()*2);&#010;   capu::int32_t i = 0;&#010;-  EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt; , capu::SmartPointer&lt;EtchObject&gt; &gt;::Pair ptr;&#010;+  EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;::Pair ptr;&#010; &#010;   while (it.hasNext()) {&#010;     it.next(&amp;ptr);&#010;@@ -59,7 +61,7 @@ status_t EtchHashTableSerializer::export&#010;   if (result-&gt;put(mField, keysAndValuesArray) != ETCH_OK) {&#010;     return ETCH_ERROR;&#010;   }&#010;-&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "HashTable has been serialized");&#010;   return ETCH_OK;&#010; }&#010; &#010;@@ -70,10 +72,12 @@ status_t EtchHashTableSerializer::import&#010;     return ETCH_EINVAL;&#010;   }&#010;   capu::SmartPointer&lt;EtchObject&gt; tmp;&#010;-  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK)&#010;+  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "KeysAndValues Field could not be found");&#010;     return ETCH_ERROR;&#010;+  }&#010; &#010;-  EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt; , capu::SmartPointer&lt;EtchObject&gt; &gt;* table = new EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt; , capu::SmartPointer&lt;EtchObject&gt; &gt;();&#010;+  EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;* table = new EtchHashTable&lt;capu::SmartPointer&lt;EtchObject&gt;, capu::SmartPointer&lt;EtchObject&gt; &gt;();&#010; &#010;   capu::SmartPointer&lt;EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; keysAndValuesArray = capu::smartpointer_cast&lt;EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; (tmp);&#010; &#010;@@ -90,10 +94,14 @@ status_t EtchHashTableSerializer::import&#010;       return res;&#010;   }&#010;   result = (EtchObject*) table;&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "HashTable has been deserialized");&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchHashTableSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;+  //TODO rafactor this&#010;+  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;+&#010;   status_t result;&#010;   EtchField field_ptr;&#010;   result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;@@ -111,5 +119,6 @@ status_t EtchHashTableSerializer::Init(E&#010;   if (result != ETCH_OK)&#010;     return result;&#010;   type-&gt;lock();&#010;+  CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchHashTableSerializer has been initialized");&#010;   return ETCH_OK;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp Thu Aug 23 16:42:45 2012&#010;@@ -17,6 +17,9 @@&#010;  */&#010; &#010; #include "serialization/EtchListSerializer.h"&#010;+#include "support/EtchRuntime.h"&#010;+&#010;+static char* TAG = "EtchListSerializer";&#010; &#010; const EtchString&amp; EtchListSerializer::FIELD_NAME() {&#010;   static const EtchString name("values");&#010;@@ -27,6 +30,8 @@ const EtchString&amp; EtchListSerializer::FI&#010; &#010; EtchListSerializer::EtchListSerializer(EtchType* type, EtchField* field)&#010; : mField(*field), mType(type) {&#010;+  //TODO refactor this&#010;+  mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchListSerializer::~EtchListSerializer() {&#010;@@ -53,6 +58,7 @@ status_t EtchListSerializer::exportValue&#010;   result = new EtchStructValue(mType, vf);&#010;   if (result-&gt;put(mField, values) != ETCH_OK)&#010;     return ETCH_ERROR;&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "List has been serialized");&#010;   return ETCH_OK;&#010; }&#010; &#010;@@ -65,8 +71,10 @@ status_t EtchListSerializer::importValue&#010;   }&#010; &#010;   capu::SmartPointer&lt;EtchObject&gt; tmp = NULL;&#010;-  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK)&#010;+  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Values Field could not be found");&#010;     return ETCH_ERROR;&#010;+  }&#010; &#010;   capu::SmartPointer&lt;EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; &gt; values = capu::smartpointer_cast&lt;EtchNativeArray&lt;capu::SmartPointer&lt;EtchObject&gt; &gt; &gt;(tmp);&#010; &#010;@@ -80,10 +88,14 @@ status_t EtchListSerializer::importValue&#010;       return res;&#010;   }&#010;   result = (EtchObject*) list;&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "List has been deserialized");&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchListSerializer::Init(EtchType* type, EtchClass2TypeMap * class2type) {&#010;+  //TODO rafactor this&#010;+  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;+  &#010;   status_t result;&#010; &#010;   EtchField field;&#010;@@ -108,5 +120,6 @@ status_t EtchListSerializer::Init(EtchTy&#010;   }&#010;   type-&gt;lock();&#010; &#010;+  CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchListSerializer has been initialized");&#010;   return ETCH_OK;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp Thu Aug 23 16:42:45 2012&#010;@@ -17,6 +17,9 @@&#010;  */&#010; &#010; #include "serialization/EtchRuntimeExceptionSerializer.h"&#010;+#include "support/EtchRuntime.h"&#010;+&#010;+static char* TAG = "EtchRuntimeExceptionSerializer";&#010; &#010; const EtchString&amp; EtchRuntimeExceptionSerializer::FIELD_NAME() {&#010;   static const EtchString name("msg");&#010;@@ -24,9 +27,11 @@ const EtchString&amp; EtchRuntimeExceptionSe&#010; }&#010; &#010; // TODO: check signature regarding by value copy&#010;+&#010; EtchRuntimeExceptionSerializer::EtchRuntimeExceptionSerializer(EtchType* type, EtchField* field)&#010; : mField(*field), mType(type) {&#010;-&#010;+  //TODO refactor this&#010;+  mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchRuntimeExceptionSerializer::~EtchRuntimeExceptionSerializer() {&#010;@@ -41,11 +46,14 @@ status_t EtchRuntimeExceptionSerializer:&#010;   }&#010; &#010;   capu::SmartPointer&lt;EtchObject&gt; tmp;&#010;-  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK)&#010;+  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Msg Field could not be found");&#010;     return ETCH_ERROR;&#010;+  }&#010; &#010;   EtchString str = *((EtchString*) tmp.get());&#010;   result = new EtchRuntimeException(str, ETCH_ERROR);&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Exception has been deserialized");&#010;   return ETCH_OK;&#010; }&#010; &#010;@@ -59,11 +67,13 @@ status_t EtchRuntimeExceptionSerializer:&#010; &#010;   if (result-&gt;put(mField, str) != ETCH_OK)&#010;     return ETCH_ERROR;&#010;-&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Exception has been serialized");&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchRuntimeExceptionSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;+  //TODO rafactor this&#010;+  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010; &#010;   status_t result;&#010;   EtchField field_ptr;&#010;@@ -82,5 +92,6 @@ status_t EtchRuntimeExceptionSerializer:&#010;   if (result != ETCH_OK)&#010;     return result;&#010;   type-&gt;lock();&#010;+  CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchRuntimeExceptionSerializer has been initialized");&#010;   return ETCH_OK;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp Thu Aug 23 16:42:45 2012&#010;@@ -17,6 +17,9 @@&#010;  */&#010; &#010; #include "serialization/EtchSetSerializer.h"&#010;+#include "support/EtchRuntime.h"&#010;+&#010;+static const char* TAG = "EtchSetSerializer";&#010; &#010; const EtchString&amp; EtchSetSerializer::FIELD_NAME() {&#010;   static const EtchString name("keys");&#010;@@ -25,11 +28,11 @@ const EtchString&amp; EtchSetSerializer::FIE&#010; &#010; EtchSetSerializer::EtchSetSerializer(EtchType* type, EtchField* field)&#010; : mField(*field), mType(type) {&#010;-&#010;+  // TODO refactoring&#010;+  mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchSetSerializer::~EtchSetSerializer() {&#010;-&#010; }&#010; &#010; status_t EtchSetSerializer::exportValue(EtchValueFactory* vf, capu::SmartPointer&lt;EtchObject&gt; value, EtchStructValue*&amp; result) {&#010;@@ -54,7 +57,7 @@ status_t EtchSetSerializer::exportValue(&#010;   result = new EtchStructValue(mType, vf);&#010;   if (result-&gt;put(mField, array) != ETCH_OK)&#010;     return ETCH_ERROR;&#010;-&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Set has been serialized");&#010;   return ETCH_OK;&#010; }&#010; &#010;@@ -65,8 +68,10 @@ status_t EtchSetSerializer::importValue(&#010;     return ETCH_EINVAL;&#010;   }&#010;   capu::SmartPointer&lt;EtchObject&gt; tmp;&#010;-  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK)&#010;+  if (value-&gt;get(mField, &amp;tmp) != ETCH_OK) {&#010;+    CAPU_LOG_ERROR(mRuntime-&gt;getLogger(), TAG, "Keys Field could not be found");&#010;     return ETCH_ERROR;&#010;+  }&#010; &#010;   EtchHashSet&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;* set = new EtchHashSet&lt;capu::SmartPointer&lt;EtchObject&gt; &gt;();&#010; &#010;@@ -80,10 +85,14 @@ status_t EtchSetSerializer::importValue(&#010;       return res;&#010;   }&#010;   result = (capu::SmartPointer&lt;EtchObject&gt;) set;&#010;+  CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Set has been deserialized");&#010;   return ETCH_OK;&#010; }&#010; &#010; status_t EtchSetSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {&#010;+  //TODO refactoring&#010;+  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;+&#010;   status_t result;&#010;   EtchField field_ptr;&#010;   result = type-&gt;getField(FIELD_NAME(), &amp;field_ptr);&#010;@@ -101,5 +110,6 @@ status_t EtchSetSerializer::Init(EtchTyp&#010;   if (result != ETCH_OK)&#010;     return result;&#010;   type-&gt;lock();&#010;+  CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchSetSerializer has been initialized");&#010;   return ETCH_OK;&#010; }&#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp Thu Aug 23 16:42:45 2012&#010;@@ -17,11 +17,13 @@&#010;  */&#010; &#010; #include "serialization/EtchValidatorBoolean.h"&#010;+#include "support/EtchRuntime.h"&#010; &#010;-capu::SmartPointer&lt;EtchValidator&gt;* EtchValidatorBoolean::Validators()&#010;-{&#010;-  static capu::SmartPointer&lt;EtchValidator&gt; ret[MAX_CACHED];&#010;-  return &amp;(ret[0]);&#010;+static const char* TAG = "EtchValidatorBoolean";&#010;+&#010;+capu::SmartPointer&lt;EtchValidator&gt;* EtchValidatorBoolean::Validators(EtchRuntime* runtime) {&#010;+  static EtchValidatorCaches validators;&#010;+  return validators.get(runtime);&#010; }&#010; &#010; const EtchObjectType* EtchValidatorBoolean::TYPE() {&#010;@@ -31,7 +33,8 @@ const EtchObjectType* EtchValidatorBoole&#010; &#010; EtchValidatorBoolean::EtchValidatorBoolean(capu::uint32_t ndim)&#010; : EtchTypeValidator(EtchValidatorBoolean::TYPE(), EtchBool::TYPE(), EtchBool::TYPE(), ndim) {&#010;-&#010;+  //TODO rafactor this&#010;+  mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchValidatorBoolean::~EtchValidatorBoolean() {&#010;@@ -63,14 +66,19 @@ capu::bool_t EtchValidatorBoolean::valid&#010; &#010; status_t EtchValidatorBoolean::validateValue(capu::SmartPointer&lt;EtchObject&gt; value, capu::SmartPointer&lt;EtchObject&gt;&amp; result) {&#010;   if (validate(value)) {&#010;+    CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), TAG, "Object has been validated");&#010;     result = value;&#010;     return ETCH_OK;&#010;   } else {&#010;+    CAPU_LOG_WARN(mRuntime-&gt;getLogger(), TAG, "Object has not been validated");&#010;     return ETCH_ERROR;&#010;   }&#010; }&#010; &#010; status_t EtchValidatorBoolean::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;+  //TODO rafactor this&#010;+  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;+&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;@@ -78,10 +86,11 @@ status_t EtchValidatorBoolean::Get(capu:&#010;     val = new EtchValidatorBoolean(ndim);&#010;     return ETCH_OK;&#010;   }&#010;-  if (Validators()[ndim].get() == NULL) {&#010;-    Validators()[ndim] = new EtchValidatorBoolean(ndim);&#010;+  if (Validators(runtime)[ndim].get() == NULL) {&#010;+    Validators(runtime)[ndim] = new EtchValidatorBoolean(ndim);&#010;+    CAPU_LOG_TRACE(runtime-&gt;getLogger(), TAG, "EtchValidatorBoolean has been created");&#010;   }&#010;-  val = Validators()[ndim];&#010;+  val = Validators(runtime)[ndim];&#010;   return ETCH_OK;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp Thu Aug 23 16:42:45 2012&#010;@@ -17,11 +17,13 @@&#010;  */&#010; &#010; #include "serialization/EtchValidatorByte.h"&#010;+#include "support/EtchRuntime.h"&#010; &#010;-capu::SmartPointer&lt;EtchValidator&gt;* EtchValidatorByte::Validators()&#010;-{&#010;-  static capu::SmartPointer&lt;EtchValidator&gt; ret[MAX_CACHED];&#010;-  return &amp;(ret[0]);&#010;+static const char* TAG = "EtchValidatorByte";&#010;+&#010;+capu::SmartPointer&lt;EtchValidator&gt;* EtchValidatorByte::Validators(EtchRuntime* runtime) {&#010;+  static EtchValidatorCaches validators;&#010;+  return validators.get(runtime);&#010; }&#010; &#010; const EtchObjectType* EtchValidatorByte::TYPE() {&#010;@@ -31,7 +33,8 @@ const EtchObjectType* EtchValidatorByte:&#010; &#010; EtchValidatorByte::EtchValidatorByte(capu::uint32_t ndim)&#010; : EtchTypeValidator(EtchValidatorByte::TYPE(), EtchByte::TYPE(), EtchByte::TYPE(), ndim) {&#010;-&#010;+  //TODO rafactor this&#010;+  mRuntime = EtchRuntime::getRuntime();&#010; }&#010; &#010; EtchValidatorByte::~EtchValidatorByte() {&#010;@@ -49,17 +52,17 @@ capu::bool_t EtchValidatorByte::validate&#010; &#010;   if (value-&gt;getObjectType()-&gt;equals(EtchShort::TYPE())) {&#010;     EtchShort *v = (EtchShort *) value.get();&#010;-    return ((v-&gt;get() &gt;= capu::NumericLimitMin&lt;capu::int8_t&gt; ()) &amp;&amp; (v-&gt;get() &lt;= capu::NumericLimitMax&lt;capu::int8_t&gt; ()));&#010;+    return ((v-&gt;get() &gt;= capu::NumericLimitMin&lt;capu::int8_t &gt; ()) &amp;&amp; (v-&gt;get() &lt;= capu::NumericLimitMax&lt;capu::int8_t &gt; ()));&#010;   }&#010; &#010;   if (value-&gt;getObjectType()-&gt;equals(EtchInt32::TYPE())) {&#010;     EtchInt32 *v = (EtchInt32 *) value.get();&#010;-    return ((v-&gt;get() &gt;= capu::NumericLimitMin&lt;capu::int8_t&gt; ()) &amp;&amp; (v-&gt;get() &lt;= capu::NumericLimitMax&lt;capu::int8_t&gt; ()));&#010;+    return ((v-&gt;get() &gt;= capu::NumericLimitMin&lt;capu::int8_t &gt; ()) &amp;&amp; (v-&gt;get() &lt;= capu::NumericLimitMax&lt;capu::int8_t &gt; ()));&#010;   }&#010; &#010;   if (value-&gt;getObjectType()-&gt;equals(EtchLong::TYPE())) {&#010;     EtchLong *v = (EtchLong *) value.get();&#010;-    return ((v-&gt;get() &gt;= capu::NumericLimitMin&lt;capu::int8_t&gt; ()) &amp;&amp; (v-&gt;get() &lt;= capu::NumericLimitMax&lt;capu::int8_t&gt; ()));&#010;+    return ((v-&gt;get() &gt;= capu::NumericLimitMin&lt;capu::int8_t &gt; ()) &amp;&amp; (v-&gt;get() &lt;= capu::NumericLimitMax&lt;capu::int8_t &gt; ()));&#010;   }&#010;   //array handling&#010;   if ((value-&gt;getObjectType()-&gt;isArray()) &amp;&amp; (mExpectedType-&gt;isArray())) {&#010;@@ -81,33 +84,44 @@ status_t EtchValidatorByte::validateValu&#010;   if (validate(value)) {&#010;     if ((value-&gt;getObjectType()-&gt;equals(EtchByte::TYPE())) || (mNDims &gt; 0)) {&#010;       result = value;&#010;+      CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchValidatorByte", "Object has been validated");&#010;       return ETCH_OK;&#010;     } else {&#010;       if (value-&gt;getObjectType()-&gt;equals(EtchShort::TYPE())) {&#010;         EtchShort *v = (EtchShort *) value.get();&#010;         result = new EtchByte((capu::int8_t)v-&gt;get());&#010;+        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchValidatorByte", "Short has been validated by EtchValidatorByte and converted to EtchByte");&#010;+&#010;         return ETCH_OK;&#010;       }&#010; &#010;       if (value-&gt;getObjectType()-&gt;equals(EtchLong::TYPE())) {&#010;         EtchLong *v = (EtchLong *) value.get();&#010;         result = new EtchByte((capu::int8_t)v-&gt;get());&#010;+        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchValidatorByte", "EtchLong has been validated by EtchValidatorByte and converted to EtchByte");&#010;+&#010;         return ETCH_OK;&#010;       }&#010; &#010;       if (value-&gt;getObjectType()-&gt;equals(EtchInt32::TYPE())) {&#010;         EtchInt32 *v = (EtchInt32 *) value.get();&#010;         result = new EtchByte((capu::int8_t)v-&gt;get());&#010;+        CAPU_LOG_TRACE(mRuntime-&gt;getLogger(), "EtchValidatorByte", "EtchInt32 has been validated by EtchValidatorByte and converted to EtchByte");&#010;         return ETCH_OK;&#010;       }&#010;+      CAPU_LOG_WARN(mRuntime-&gt;getLogger(), "EtchValidatorByte", "Object has not been validated");&#010;       return ETCH_ERROR;&#010;     }&#010;   } else {&#010;+    CAPU_LOG_WARN(mRuntime-&gt;getLogger(), "EtchValidatorByte", "Object has not been validated");&#010;     return ETCH_ERROR;&#010;   }&#010; }&#010; &#010; status_t EtchValidatorByte::Get(capu::uint32_t ndim, capu::SmartPointer&lt;EtchValidator&gt; &amp;val) {&#010;+  //TODO rafactor this&#010;+  EtchRuntime* runtime = EtchRuntime::getRuntime();&#010;+&#010;   if (ndim &gt; MAX_NDIMS) {&#010;     return ETCH_EINVAL;&#010;   }&#010;@@ -115,10 +129,12 @@ status_t EtchValidatorByte::Get(capu::ui&#010;     val = new EtchValidatorByte(ndim);&#010;     return ETCH_OK;&#010;   }&#010;-  if (Validators()[ndim].get() == NULL) {&#010;-    Validators()[ndim] = new EtchValidatorByte(ndim);&#010;+  if (Validators(runtime)[ndim].get() == NULL) {&#010;+    Validators(runtime)[ndim] = new EtchValidatorByte(ndim);&#010;+    CAPU_LOG_TRACE(runtime-&gt;getLogger(), "EtchValidatorByte", "EtchValidatorByte has been created");&#010;+&#010;   }&#010;-  val = Validators()[ndim];&#010;+  val = Validators(runtime)[ndim];&#010;   return ETCH_OK;&#010; }&#010; &#010;&#010;Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp&#010;URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1376584&amp;r1=1376583&amp;r2=1376584&amp;view=diff&#010;==============================================================================&#010;--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp (original)&#010;+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp Thu Aug 23 16:42:45 2012&#010;@@ -18,6 +18,63 @@&#010; &#010; #include "serialization/EtchValidatorCustom.h"&#010; &#010;+/**&#010;+ * Etch validator chaches for each runtime&#010;+ */&#010;+class EtchValidatorCustomCaches : public EtchRuntimeListener {&#010;+public:&#010;+  /**&#010;+   * Validator cache&#010;+   */&#010;+  struct ValidatorCache {&#010;+    capu::uint64_t id;&#010;+    EtchHashTable&lt;EtchValidatorCustomKey, capu::SmartPointer&lt;EtchValidator&gt; &gt; validators;&#010;+  };&#010;+&#010;+  /**&#010;+   * Construct a new instance from the Validators class.&#010;+   */&#010;+  EtchValidatorCustomCaches() {&#010;+  }&#010;+&#010;+  /**&#010;+   * Destructor&#010;+   */&#010;+  virtual ~EtchValidatorCustomCaches() {&#010;+    capu::List&lt;ValidatorCache*&gt;::Iterator iter