You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by ve...@apache.org on 2012/10/17 08:50:05 UTC

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-...

Author: veithm
Date: Wed Oct 17 06:50:01 2012
New Revision: 1399114

URL: http://svn.apache.org/viewvc?rev=1399114&view=rev
Log:
ETCH-244 EtchRuntime refactoring

replaced EtchRuntime::getRuntime with mRuntime given by the constructor
Fixed Warnings under Linux

Change-Id: I2a22bf7f0f3418ca2e1aa5a60921b4cbc2f80ada

Modified:
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h
    incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h
    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorLong.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorString.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchTypeTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorBooleanTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorByteTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorCustomTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorRuntimeExceptionTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStringTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRuntimeTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp
    incubator/etch/trunk/examples/helloworld/etch/HelloWorld.etch
    incubator/etch/trunk/examples/helloworld/java/.classpath
    incubator/etch/trunk/examples/helloworld/java/src/main/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchNativeArray.h Wed Oct 17 06:50:01 2012
@@ -507,7 +507,7 @@ public:
   /**
    * Returns the dim of array
    */
-  virtual capu::int32_t getDim() = 0;
+  virtual capu::uint32_t getDim() = 0;
 
 };
 
@@ -585,7 +585,7 @@ public:
   /**
    * Returns the dim of array
    */
-  capu::int32_t getDim();
+  capu::uint32_t getDim();
 
   /**
    * Creates a new nested array
@@ -636,7 +636,6 @@ EtchNativeArray<T>::EtchNativeArray(capu
     mData->set(0, 0, array, length, 0, length, &bytesWritten);
   } else if (dim == 2) {
     mData = new EtchArray<T>(length, dim);
-    capu::int32_t dimCount = dim;
     capu::int32_t offset = 0;
     for (capu::int32_t i = 0; i < length; i++) {
       mData->createArray(i, 0, 2,dim-1);
@@ -711,7 +710,7 @@ capu::int32_t EtchNativeArray<T>::getLen
 }
 
 template<class T>
-capu::int32_t EtchNativeArray<T>::getDim() {
+capu::uint32_t EtchNativeArray<T>::getDim() {
   return mData->getDim();
 }
 
@@ -779,6 +778,9 @@ status_t EtchNativeArray<T>::resize(capu
       } \
       break; \
     } \
+    default: { \
+      return ETCH_ERROR; \
+    } \
   } \
 }
 
@@ -811,7 +813,7 @@ status_t EtchNativeArray<T>::resize(capu
       } \
       break; \
     } \
-    case EtchObjectType::SMART_POINTER: \
+    case EtchObjectType::SMART_POINTER: { \
       EtchNativeArray<capu::SmartPointer<type> >* na = (EtchNativeArray<capu::SmartPointer<type> >*)(this); \
       if(dims == 1) { \
         capu::SmartPointer<type> value = capu::smartpointer_cast<type> (data); \
@@ -822,6 +824,10 @@ status_t EtchNativeArray<T>::resize(capu
       } \
       break; \
     } \
+    default: { \
+      break; \
+    } \
+  } \
   break; \
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h Wed Oct 17 06:50:01 2012
@@ -36,7 +36,7 @@ public:
   /**
    * Constructor
    */
-  EtchAuthenticationExceptionSerializer(EtchType* type, EtchField* field);
+  EtchAuthenticationExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);
 
   /**
    * Destructor
@@ -53,7 +53,7 @@ public:
    * @param type
    * @param collection
    */
-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataInput.h Wed Oct 17 06:50:01 2012
@@ -33,10 +33,10 @@ public:
 
   /**
    * Constructs the BinaryTaggedDataInput with a null buffer.
-   * 
+   *
    * @param vf the value factory for the service.
    */
-  EtchBinaryTaggedDataInput(EtchValueFactory *vf);
+  EtchBinaryTaggedDataInput(EtchRuntime* runtime, EtchValueFactory *vf);
 
   /**
    * Destructor

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h Wed Oct 17 06:50:01 2012
@@ -43,7 +43,7 @@ public:
    * @param vf the value factory for the service.
    * @param uri.
    */
-  EtchBinaryTaggedDataOutput(EtchValueFactory *vf, EtchURL* uri);
+  EtchBinaryTaggedDataOutput(EtchRuntime* runtime, EtchValueFactory *vf, EtchURL* uri);
 
   /**
    * Destructor
@@ -58,8 +58,8 @@ public:
 
 private:
   EtchRuntime* mRuntime;
-  capu::SmartPointer<EtchFlexBuffer> mBuffer;
   EtchLevel mLevel;
+  capu::SmartPointer<EtchFlexBuffer> mBuffer;
   capu::bool_t mStringTypeAndField;
   capu::SmartPointer<EtchValidator> mIntValidator;
   capu::SmartPointer<EtchValidator> mStringValidator;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h Wed Oct 17 06:50:01 2012
@@ -35,7 +35,7 @@ public:
   /**
    * Constructor
    */
-  EtchDateSerializer(EtchType* type, EtchField* field);
+  EtchDateSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);
 
   /**
    * Destructor
@@ -58,7 +58,7 @@ public:
    * @param type
    * @param collection
    */
-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h Wed Oct 17 06:50:01 2012
@@ -98,7 +98,7 @@ protected:
 
 public:
 
-  static status_t Init(EtchTypeMap* types, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchTypeMap* types, EtchClass2TypeMap* class2type);
 
   /**
    * The msg field of the standard unchecked exception.

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h Wed Oct 17 06:50:01 2012
@@ -37,7 +37,7 @@ public:
   /**
    * Constructor
    */
-  EtchHashTableSerializer(EtchType* type, EtchField& field);
+  EtchHashTableSerializer(EtchRuntime* runtime, EtchType* type, EtchField& field);
 
   /**
    * Destructor
@@ -59,7 +59,7 @@ public:
    * @param type
    * @param collection
    */
-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h Wed Oct 17 06:50:01 2012
@@ -36,7 +36,7 @@ public:
   /**
    * Constructor
    */
-  EtchListSerializer(EtchType* type, EtchField* field);
+  EtchListSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);
 
   /**
    * Destructor
@@ -58,12 +58,12 @@ public:
    * @param type
    * @param class2type
    */
-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);
 
 private:
   EtchRuntime* mRuntime;
-  EtchType* mType;
   EtchField mField;
+  EtchType* mType;
   const static EtchString& FIELD_NAME();
 };
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h Wed Oct 17 06:50:01 2012
@@ -37,7 +37,7 @@ public:
   /**
    * Constructor
    */
-  EtchRuntimeExceptionSerializer(EtchType* type, EtchField* field);
+  EtchRuntimeExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);
 
   /**
    * Destructor
@@ -59,12 +59,12 @@ public:
    * @param type
    * @param class2type
    */
-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);
 
 private:
   EtchRuntime* mRuntime;
-  EtchType* mType;
   EtchField mField;
+  EtchType* mType;
   const static EtchString& FIELD_NAME();
 
 };

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h Wed Oct 17 06:50:01 2012
@@ -37,7 +37,7 @@ public:
   /**
    * Constructor
    */
-  EtchSetSerializer(EtchType* type, EtchField* field);
+  EtchSetSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field);
 
   /**
    * Destructor
@@ -53,7 +53,7 @@ public:
    * @param type
    * @param collection
    */
-  static status_t Init(EtchType* type, EtchClass2TypeMap* class2type);
+  static status_t Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h Wed Oct 17 06:50:01 2012
@@ -61,10 +61,10 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorBoolean(capu::uint32_t ndim);
+  EtchValidatorBoolean(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h Wed Oct 17 06:50:01 2012
@@ -66,15 +66,15 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorByte(capu::uint32_t ndim);
+  EtchValidatorByte(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;
   static capu::SmartPointer<EtchValidator>* Validators(EtchRuntime* runtime);
-
+  
 };
 
 #endif /* ETCHVALIDATORBYTE_H */

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h Wed Oct 17 06:50:01 2012
@@ -110,7 +110,7 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer<EtchValidator> &val);
 
 protected:
 
@@ -120,9 +120,10 @@ protected:
    * @param dim dimensions
    * @param sub is subclass ok
    */
-  EtchValidatorCustom(const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub);
+  EtchValidatorCustom(EtchRuntime* runtime, const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub);
 
 private:
+  EtchRuntime* mRuntime;
   static EtchHashTable<EtchValidatorCustomKey, capu::SmartPointer<EtchValidator> >& Validators(EtchRuntime* runtime);
 };
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h Wed Oct 17 06:50:01 2012
@@ -63,10 +63,10 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorDouble(capu::uint32_t ndim);
+  EtchValidatorDouble(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h Wed Oct 17 06:50:01 2012
@@ -63,10 +63,10 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorFloat(capu::uint32_t ndim);
+  EtchValidatorFloat(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h Wed Oct 17 06:50:01 2012
@@ -67,12 +67,12 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 
 
 protected:
-  EtchValidatorInt(capu::uint32_t ndim);
+  EtchValidatorInt(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h Wed Oct 17 06:50:01 2012
@@ -65,10 +65,10 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorLong(capu::uint32_t ndim);
+  EtchValidatorLong(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h Wed Oct 17 06:50:01 2012
@@ -54,12 +54,12 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::SmartPointer<EtchValidator> &val);
 
   static const EtchObjectType* TYPE();
 
 protected:
-  EtchValidatorNone();
+  EtchValidatorNone(EtchRuntime* runtime);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h Wed Oct 17 06:50:01 2012
@@ -60,10 +60,10 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorObject(capu::uint32_t ndim);
+  EtchValidatorObject(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h Wed Oct 17 06:50:01 2012
@@ -54,7 +54,7 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::SmartPointer<EtchValidator> &val);
 
   /**
    * EtchObjectType for EtchValidatorRuntimeException.
@@ -62,7 +62,7 @@ public:
   static const EtchObjectType* TYPE();
 
 protected:
-  EtchValidatorRuntimeException();
+  EtchValidatorRuntimeException(EtchRuntime* runtime);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h Wed Oct 17 06:50:01 2012
@@ -66,11 +66,11 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
 
-  EtchValidatorShort(capu::uint32_t ndim);
+  EtchValidatorShort(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h Wed Oct 17 06:50:01 2012
@@ -61,10 +61,10 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
 protected:
-  EtchValidatorString(capu::uint32_t ndim);
+  EtchValidatorString(EtchRuntime* runtime, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorStructValue.h Wed Oct 17 06:50:01 2012
@@ -57,7 +57,7 @@ public:
   /**
    * @see EtchValidator
    */
-  static status_t Get(EtchType* type, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
+  static status_t Get(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val);
 
   /**
    * EtchObjectType for EtchRuntimeException.
@@ -68,7 +68,7 @@ public:
 
 protected:
 
-  EtchValidatorStructValue(EtchType* type, capu::uint32_t ndim);
+  EtchValidatorStructValue(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim);
 
 private:
   EtchRuntime* mRuntime;

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchAsyncResult.h Wed Oct 17 06:50:01 2012
@@ -81,8 +81,8 @@ public:
   }
 
 private:
-   capu::bool_t mHasResult;
-   capu::SmartPointer<T> mResult;
+  capu::SmartPointer<T> mResult;
+  capu::bool_t mHasResult;
 };
 
 #endif

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchDefaultServerFactory.h Wed Oct 17 06:50:01 2012
@@ -85,8 +85,8 @@ public:
   virtual status_t transportQuery(capu::SmartPointer<EtchObject> query, capu::SmartPointer<EtchObject> *result);
 
 private:
-  EtchSession* mSession;
   EtchTransport<EtchServerFactory>* mListener;
+  EtchSession* mSession;
 };
 
 #endif /* __ETCHDEFAULTSERVERFACTORY_H__*/

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRemoteBase.h Wed Oct 17 06:50:01 2012
@@ -40,7 +40,7 @@ public:
    * @param svc the delivery service used to send messages.
    * @param vf the value factory used to create messages and encode/decode types.
    */
-  EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack);
+  EtchRemoteBase(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack);
 
   /**
    * Destructor
@@ -190,8 +190,8 @@ public:
 private:
   EtchRuntime* mRuntime;
   EtchDeliveryService * mSvc;
-  EtchStack* mStack;
   EtchValueFactory* mVf;
+  EtchStack* mStack;
 };
 
 #endif /* __ETCHREMOTBASE_H__ */

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchRuntime.h Wed Oct 17 06:50:01 2012
@@ -86,28 +86,16 @@ public:
   status_t shutdown();
 
   /**
-   * Sets Logger
-   * @param logger
-   */
-  status_t setLogger(EtchLogger* logger);
-
-  /**
    * Gets Logger
    * @return logger if exists
    */
-  EtchLogger* getLogger();
-
-  /**
-   * TODO: Remove this after refactoring! A instance to the runtime shoulde be injected to each class
-   */
-  static EtchRuntime* getRuntime();
+  EtchLogger& getLogger();
 
 private:
-  static EtchRuntime* sRuntime;
+  capu::bool_t mIsClosed;
+  EtchLogger mLogger;
   static capu::uint64_t sId;
   capu::uint64_t mId;
-  EtchLogger* mLogger;
-  capu::bool_t mIsClosed;
   capu::Mutex mMutex;
   capu::List<EtchRuntimeListener*> mListeners;
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchStackClient.h Wed Oct 17 06:50:01 2012
@@ -21,6 +21,8 @@
 #include "support/EtchStack.h"
 #include "util/EtchResources.h"
 
+class EtchRuntime;
+
 /* *
  * This class serves as a container for all layers created during the setup of a new stack (connection, packetizer, messagizer, ...).
  */
@@ -35,7 +37,7 @@ public:
   /**
    * Default Constructor
    */
-  EtchStackClient();
+  EtchStackClient(EtchRuntime* runtime);
 
   /**
    * Copy Constructor
@@ -48,9 +50,8 @@ public:
   virtual ~EtchStackClient();
 
 public:
+  EtchRuntime* mRuntime;
   EtchResources* mStaticResources;
-
-
 };
 
 #endif /* __ETCHSTACKCLIENT_H__ */

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h Wed Oct 17 06:50:01 2012
@@ -22,6 +22,8 @@
 #include "common/EtchString.h"
 #include "util/EtchResources.h"
 
+class EtchRuntime;
+
 /**
  * Class to help construct transport stacks.
  */
@@ -63,7 +65,7 @@ public:
    * @return an error if there is a problem
    *         ETCH_OK otherwise
    */
-  static status_t InitResources( EtchResources* resources, EtchResources*& result );
+  static status_t InitResources(EtchRuntime* runtime, EtchResources* resources, EtchResources*& result);
 
   /**
    * Destroyes the given standard resources
@@ -71,7 +73,7 @@ public:
    * @return an error if there is a problem
    *         ETCH_OK otherwise
    */
-  static status_t DestroyResources(EtchResources* resources);
+  static status_t DestroyResources(EtchRuntime* runtime, EtchResources* resources);
 };
 
 #endif /* __ETCHTRANSPORTHELPER_H__ */

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h Wed Oct 17 06:50:01 2012
@@ -50,14 +50,14 @@ public:
    * @param transport the MailBoxManager implementation
    * @param uri as an EtchString object
    */
-  EtchDefaultDeliveryService(EtchMailboxManager* transport, const EtchString& uri);
+  EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, const EtchString& uri);
 
   /**
    * Constructor
    * @param transport the MailBoxManager implementation
    * @param uri as an EtchURL object
    */
-  EtchDefaultDeliveryService(EtchMailboxManager* transport, EtchURL* uri);
+  EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, EtchURL* uri);
 
   /**
    * Destructor

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h Wed Oct 17 06:50:01 2012
@@ -55,7 +55,7 @@ public:
    * @param uri the uri being used to configure the transport stack.
    * @param resources the associated set of resources for this service.
    */
-  EtchMessagizer(EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources);
+  EtchMessagizer(EtchRuntime* runtime, EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources);
 
   /**
    * Destructor

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h Wed Oct 17 06:50:01 2012
@@ -61,7 +61,7 @@ public:
    * @param uri
    * @param resources
    */
-  EtchPacketizer(EtchTransportData* transport, EtchString& uri);
+  EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchString& uri);
 
   /**
    * Constructs the Packetizer with null packet handler and uri specified
@@ -70,7 +70,7 @@ public:
    * @param uri
    * @param resources
    */
-  EtchPacketizer(EtchTransportData* transport, EtchURL* uri);
+  EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchURL* uri);
 
   /**
    * Destructor

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPlainMailboxManager.h Wed Oct 17 06:50:01 2012
@@ -37,7 +37,7 @@ public:
    * @param uri
    * @param resources
    */
-  EtchPlainMailboxManager(EtchTransportMessage* transport, const EtchString& url, EtchResources* resources);
+  EtchPlainMailboxManager(EtchRuntime* runtime, EtchTransportMessage* transport, const EtchString& url, EtchResources* resources);
 
   /**
    * Destructure

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpConnection.h Wed Oct 17 06:50:01 2012
@@ -135,12 +135,12 @@ public:
   void setNumAttempts(capu::uint8_t numAttempts);
 
 private:
+  EtchRuntime *mRuntime;
   EtchString mHost;
   capu::uint16_t mPort;
   EtchSocket* mSocket;
   EtchTcpOption mOptions;
   capu::uint8_t mNumAttempts;
-  EtchRuntime *mRuntime;
 
 protected:
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Wed Oct 17 06:50:01 2012
@@ -48,7 +48,7 @@ public:
   /**
    * Default Constructor
    */
-  EtchTcpListener(EtchURL *url);
+  EtchTcpListener(EtchRuntime* runtime, EtchURL *url);
 
   /**
    * Destructor

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h Wed Oct 17 06:50:01 2012
@@ -70,8 +70,8 @@ public:
 
 private:
   static const EtchString& SOCKET();
-  const capu::bool_t mIsSecure;
   EtchRuntime* mRuntime;
+  const capu::bool_t mIsSecure;
 
   class MySessionListener : public EtchTransport<EtchServerFactory>, public EtchSessionListener<EtchSocket> {
   public:
@@ -137,15 +137,14 @@ private:
     status_t sessionNotify(capu::SmartPointer<EtchObject> event);
 
   private:
+    EtchRuntime* mRuntime;
+    EtchTcpTransportFactory* mFactory;
     EtchTransport<EtchSessionListener<EtchSocket> > *mTransport;
     EtchString mUri;
     EtchResources* mResources;
-    EtchServerFactory* mSession;
-    EtchRuntime* mRuntime;
     capu::bool_t mIsSecure;
+    EtchServerFactory* mSession;
     capu::List<EtchStack*>* mConnectionStacks;
-    EtchTcpTransportFactory* mFactory;
-
   };
 
 };

Modified: incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/util/EtchCircularQueue.h Wed Oct 17 06:50:01 2012
@@ -88,10 +88,10 @@ public:
   /**
    * Gets the next available item from the queue, waiting
    * until an item is available or the queue is closed.
-   * 
+   *
    * @param element an item from the queue or null if the queue
    * is closed
-   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if 
+   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if
    * the param is invalid or ETCH_ERROR if the queue is closed.
    */
    status_t get(EtchMailbox::EtchElement** element);
@@ -99,14 +99,14 @@ public:
   /**
    * Gets the next available item from the queue, waiting
    * until an item is available or the queue is closed.
-   * 
+   *
    * @param element an item from the queue or null if maxDelay
    * has been exceeded or the queue is closed.
    * @param maxDelay the maximum time in ms to wait for
    * something to be put in the queue; 0 means wait forever,
    * less than 0 means don't wait at all.
    *
-   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if 
+   * @return ETCH_OK if the item could be dequeued, ETCH_EINVAL if
    * the param is invalid, ETCH_TIMEOUT if maxDelay has been exceeded
    * or ETCH_ERROR if an error occurred
    */
@@ -115,10 +115,10 @@ public:
   /**
    * Puts an item in the queue, waiting until space is available
    * or the queue is closed.
-   * 
+   *
    * @param obj a non-null item to put in the queue.
-   * 
-   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if 
+   *
+   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if
    * the param is invalid or ETCH_ERROR if the queue is closed.
    */
   status_t put(EtchMailbox::EtchElement* obj);
@@ -126,17 +126,17 @@ public:
   /**
    * Puts an item in the queue, waiting until space is available
    * or the queue is closed.
-   * 
+   *
    * @param obj a non-null item to put in the queue.
-   * 
+   *
    * @param maxDelay the maximum time in ms to wait for
    * available space the queue; 0 means wait forever,
    * less than 0 means don't wait at all.
-   * 
-   * @return ETCH_OK if the item was placed in the queue, 
+   *
+   * @return ETCH_OK if the item was placed in the queue,
    *  ETCH_TIMEOUT if maxDelay has been exceeded or ETCH_ERROR if an error occurred
    */
-  status_t put(EtchMailbox::EtchElement* obj, capu::int32_t maxDelay); 
+  status_t put(EtchMailbox::EtchElement* obj, capu::int32_t maxDelay);
 
   /**
    * Closes the queue so that no more items may be put into it.
@@ -166,7 +166,7 @@ private:
    * up the next one waiting for the queue, either to get or put.
    * @param obj non-null item to put.
    *
-   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if 
+   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if
    * the param is invalid or ETCH_ERROR if the queue is closed.
    */
   status_t putAndNotify(EtchMailbox::EtchElement* obj);
@@ -184,7 +184,7 @@ private:
    * Puts the item at the tail of the queue.
    * @param obj non-null item to put.
    *
-   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if 
+   * @return ETCH_OK if the item was placed in the queue, ETCH_EINVAL if
    * the param is invalid or ETCH_ERROR if the queue is closed.
    */
   status_t put0(EtchMailbox::EtchElement* obj);

Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp Wed Oct 17 06:50:01 2012
@@ -98,31 +98,29 @@ namespace capu {
     return CAPU_OK;
   }
 
-  status_t Logger::vlog(LoggerLevel level, const char *tag, const char *file, int32_t line, const char *msgFormat, va_list args) {
+  status_t Logger::vlog(LoggerLevel level, const char_t *tag, const char_t *file, int32_t line, const char_t *msgFormat, va_list args) {
 
-    LoggerMessage *msg = new LoggerMessage();
-    msg->setId(mId);
-    msg->setTimestamp(0); // not implemented
-    msg->setThreadId(0);  // not implemented
-    msg->setLevel(level);
-    msg->setTag(tag);
-    msg->setFile(file);
-    msg->setLine(line);
+    LoggerMessage msg;
+    msg.setId(mId);
+    msg.setTimestamp(0); // not implemented
+    msg.setThreadId(0);  // not implemented
+    msg.setLevel(level);
+    msg.setTag(tag);
+    msg.setFile(file);
+    msg.setLine(line);
 
     int32_t size = StringUtils::Vscprintf(msgFormat, args);
-    char* buffer = new char[size + 1];
+    char_t* buffer = new char_t[size + 1];
     StringUtils::Vsprintf(buffer, size + 1, msgFormat, args);
-    msg->setMessage(buffer);
+    msg.setMessage(buffer);
     delete [] buffer;
 
     // log message
     for(int i = 0; i < LOGGER_APPENDER_MAX; i++) {
       if(mAppenders[i] != NULL) {
-        mAppenders[i]->log(msg);
+        mAppenders[i]->log(&msg);
       }
     }
-    delete msg;
-
     return CAPU_OK;
   }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchNativeArray.cpp Wed Oct 17 06:50:01 2012
@@ -35,7 +35,7 @@ status_t EtchNativeArrayBase::getBase(Po
   status_t ret = ETCH_OK;
   const EtchObjectType* type = getObjectType()->getObjectComponentType();
   const EtchObjectType::EtchObjectTypeTrait trait = getObjectType()->getObjectComponentTypeTrait();
-  const capu::int32_t dims = getDim();
+  const capu::uint32_t dims = getDim();
 
   switch(type->getTypeId()) {
     case EOTID_BYTE: {
@@ -76,7 +76,7 @@ status_t EtchNativeArrayBase::getBase(Po
           }
           break;
         }
-        case EtchObjectType::SMART_POINTER:
+        case EtchObjectType::SMART_POINTER: {
           EtchNativeArray<capu::SmartPointer<capu::int8_t> >* na = (EtchNativeArray<capu::SmartPointer<capu::int8_t> >*)(this);
           if(dims == 1) {
             capu::SmartPointer<capu::int8_t> value = NULL;
@@ -93,6 +93,10 @@ status_t EtchNativeArrayBase::getBase(Po
           }
           break;
         }
+        default: {
+          return ETCH_ERROR;
+        }
+      }
       break;
     }
 
@@ -185,6 +189,9 @@ status_t EtchNativeArrayBase::getBase(Po
           }
           break;
         }
+        default: {
+          return ETCH_ERROR;
+        }
       }
       break;
     }
@@ -196,6 +203,9 @@ status_t EtchNativeArrayBase::getBase(Po
       GETBASE_CAST_OBJECT_TO_NA(EtchList<capu::SmartPointer<EtchObject> > )
       break;
     }
+    default: {
+      return ETCH_ERROR;
+    }
   }
   return ret;
 }
@@ -238,7 +248,7 @@ status_t EtchNativeArrayBase::setBase(Po
           }
           break;
         }
-        case EtchObjectType::SMART_POINTER:
+        case EtchObjectType::SMART_POINTER: {
           EtchNativeArray<capu::SmartPointer<capu::int8_t> >* na = (EtchNativeArray<capu::SmartPointer<capu::int8_t> >*)(this);
           if(dims == 1) {
             capu::SmartPointer<EtchInt32> value = capu::smartpointer_cast<EtchInt32> (data);
@@ -254,6 +264,10 @@ status_t EtchNativeArrayBase::setBase(Po
           }
           break;
         }
+        default: {
+          break;
+        }
+      }
       break;
     }
     case EOTID_OBJECT: {
@@ -319,7 +333,7 @@ status_t EtchNativeArrayBase::setBase(Po
           }
           break;
         }
-        case EtchObjectType::SMART_POINTER:
+        case EtchObjectType::SMART_POINTER: {
           EtchNativeArray<capu::SmartPointer<EtchHashTable<capu::SmartPointer<EtchObject>, capu::SmartPointer<EtchObject> > > >* na = (EtchNativeArray<capu::SmartPointer<EtchHashTable<capu::SmartPointer<EtchObject>, capu::SmartPointer<EtchObject> > > >*)(this);
           if(dims == 1) {
             capu::SmartPointer<EtchHashTable<capu::SmartPointer<EtchObject>, capu::SmartPointer<EtchObject> > > value = capu::smartpointer_cast<EtchHashTable<capu::SmartPointer<EtchObject>, capu::SmartPointer<EtchObject> > > (data);
@@ -330,6 +344,10 @@ status_t EtchNativeArrayBase::setBase(Po
           }
           break;
         }
+        default: {
+          break;
+        }
+      }
       break;
     }
     case EOTID_SET: {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp Wed Oct 17 06:50:01 2012
@@ -26,10 +26,8 @@ const EtchString& EtchAuthenticationExce
   return name;
 }
 
-EtchAuthenticationExceptionSerializer::EtchAuthenticationExceptionSerializer(EtchType* type, EtchField* field)
-: mField(*field), mType(type) {
-  // TODO refactor
-  mRuntime = EtchRuntime::getRuntime();
+EtchAuthenticationExceptionSerializer::EtchAuthenticationExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)
+: mRuntime(runtime), mField(*field), mType(type) {
 }
 
 EtchAuthenticationExceptionSerializer::~EtchAuthenticationExceptionSerializer() {
@@ -66,10 +64,7 @@ status_t EtchAuthenticationExceptionSeri
   return ETCH_OK;
 }
 
-status_t EtchAuthenticationExceptionSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {
-  // TODO refactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchAuthenticationExceptionSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {
   status_t result;
 
   EtchField field;
@@ -86,11 +81,11 @@ status_t EtchAuthenticationExceptionSeri
   type->setComponentType(EtchAuthenticationException::TYPE());
 
   //set the import export helper
-  type->setImportExportHelper(new EtchAuthenticationExceptionSerializer(type, &field));
+  type->setImportExportHelper(new EtchAuthenticationExceptionSerializer(runtime, type, &field));
 
   //get validator
   capu::SmartPointer<EtchValidator> tmp;
-  result = EtchValidatorString::Get(0, tmp);
+  result = EtchValidatorString::Get(runtime, 0, tmp);
   if (result != ETCH_OK) {
     return result;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp Wed Oct 17 06:50:01 2012
@@ -21,17 +21,14 @@
 
 static const char* TAG = "EtchBinaryTaggedDataInput";
 
-EtchBinaryTaggedDataInput::EtchBinaryTaggedDataInput(EtchValueFactory* vf)
-: EtchBinaryTaggedData(vf), mBuffer(NULL), mLengthBudget(0) {
-  // TODO refacotring
-  mRuntime = EtchRuntime::getRuntime();
-
+EtchBinaryTaggedDataInput::EtchBinaryTaggedDataInput(EtchRuntime* runtime, EtchValueFactory* vf)
+: EtchBinaryTaggedData(vf), mRuntime(runtime), mBuffer(NULL), mLengthBudget(0) {
   //get int validator
-  EtchValidatorInt::Get(0, mIntValidator);
+  EtchValidatorInt::Get(runtime, 0, mIntValidator);
 
   //get string validator
   capu::SmartPointer<EtchValidator> stringValidator;
-  EtchValidatorString::Get(0, stringValidator);
+  EtchValidatorString::Get(runtime, 0, stringValidator);
 
   //create combo validator
   mIntOrStrValidator = new EtchComboValidator(mIntValidator, stringValidator);
@@ -149,7 +146,7 @@ status_t EtchBinaryTaggedDataInput::read
     } else {
       capu::SmartPointer<EtchObject> obj;
       capu::SmartPointer<EtchValidator> val;
-      EtchValidatorObject::Get(0, val);
+      EtchValidatorObject::Get(mRuntime, 0, val);
       readValue(val, obj);
     }
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp Wed Oct 17 06:50:01 2012
@@ -25,21 +25,17 @@ const EtchString& EtchBinaryTaggedDataOu
   return name;
 }
 
-EtchBinaryTaggedDataOutput::EtchBinaryTaggedDataOutput(EtchValueFactory *vf, EtchURL* uri)
-: EtchBinaryTaggedData(vf), mLevel(vf->getLevel()), mBuffer(NULL) {
-  // TODO refactoring
-  mRuntime = EtchRuntime::getRuntime();
-
+EtchBinaryTaggedDataOutput::EtchBinaryTaggedDataOutput(EtchRuntime* runtime, EtchValueFactory *vf, EtchURL* uri)
+: EtchBinaryTaggedData(vf), mRuntime(runtime), mLevel(vf->getLevel()), mBuffer(NULL) {
   EtchString tmp;
   if (uri->getTerms().get(STRING_TYPE_AND_FIELD(), &tmp) == ETCH_OK) {
     mStringTypeAndField = atoi(tmp.c_str()) > 0;
   } else {
     mStringTypeAndField = false;
   }
-  EtchValidatorInt::Get(0, mIntValidator);
-  EtchValidatorString::Get(0, mStringValidator);
-  EtchValidatorNone::Get(mNoneValidator);
-
+  EtchValidatorInt::Get(runtime, 0, mIntValidator);
+  EtchValidatorString::Get(runtime, 0, mStringValidator);
+  EtchValidatorNone::Get(runtime, mNoneValidator);
 }
 
 EtchBinaryTaggedDataOutput::~EtchBinaryTaggedDataOutput() {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDateSerializer.cpp Wed Oct 17 06:50:01 2012
@@ -26,10 +26,8 @@ const EtchString& EtchDateSerializer::FI
   return name;
 }
 
-EtchDateSerializer::EtchDateSerializer(EtchType* type, EtchField* field)
-: mField(*field), mType(type) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchDateSerializer::EtchDateSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)
+: mRuntime(runtime), mField(*field), mType(type) {
 }
 
 EtchDateSerializer::~EtchDateSerializer() {
@@ -67,10 +65,8 @@ status_t EtchDateSerializer::exportValue
   return ETCH_OK;
 }
 
-status_t EtchDateSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {
-  //TODO refactoring
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-  
+status_t EtchDateSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {
+
   status_t result;
 
   EtchField field;
@@ -87,11 +83,11 @@ status_t EtchDateSerializer::Init(EtchTy
   type->setComponentType(EtchDate::TYPE());
 
   //set the import export helper
-  type->setImportExportHelper(new EtchDateSerializer(type, &field));
+  type->setImportExportHelper(new EtchDateSerializer(runtime, type, &field));
 
   //get validator
   capu::SmartPointer<EtchValidator> val;
-  result = EtchValidatorLong::Get(0, val);
+  result = EtchValidatorLong::Get(runtime, 0, val);
   if (result != ETCH_OK) {
     return result;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchDefaultValueFactory.cpp Wed Oct 17 06:50:01 2012
@@ -131,39 +131,40 @@ EtchDefaultValueFactory::~EtchDefaultVal
   delete mDynamicTypes;
 }
 
-status_t EtchDefaultValueFactory::Init(EtchTypeMap* types, EtchClass2TypeMap* class2type) {
-  status_t result;
+status_t EtchDefaultValueFactory::Init(EtchRuntime* runtime, EtchTypeMap* types, EtchClass2TypeMap* class2type) {
+  status_t result = ETCH_OK;
 
   EtchType *type;
-  result = types->get(ETCH_RUNTIME_EXCEPTION_TYPE_NAME(), type);
-  result = EtchRuntimeExceptionSerializer::Init(type, class2type);
+  result |= types->get(ETCH_RUNTIME_EXCEPTION_TYPE_NAME(), type);
 
-  result = types->get(ETCH_LIST_TYPE_NAME(), type);
-  result = EtchListSerializer::Init(type, class2type);
+  result |= EtchRuntimeExceptionSerializer::Init(runtime, type, class2type);
 
-  result = types->get(ETCH_MAP_TYPE_NAME(), type);
-  result = EtchHashTableSerializer::Init(type, class2type);
+  result |= types->get(ETCH_LIST_TYPE_NAME(), type);
+  result |= EtchListSerializer::Init(runtime, type, class2type);
 
-  result = types->get(ETCH_SET_TYPE_NAME(), type);
-  result = EtchSetSerializer::Init(type, class2type);
+  result |= types->get(ETCH_MAP_TYPE_NAME(), type);
+  result |= EtchHashTableSerializer::Init(runtime, type, class2type);
 
-  result = types->get(ETCH_DATETIME_TYPE_NAME(), type);
-  result = EtchDateSerializer::Init(type, class2type);
+  result |= types->get(ETCH_SET_TYPE_NAME(), type);
+  result |= EtchSetSerializer::Init(runtime, type, class2type);
 
-  result = types->get(ETCH_AUTH_EXCEPTION_TYPE_NAME(), type);
-  result = EtchAuthenticationExceptionSerializer::Init(type, class2type);
+  result |= types->get(ETCH_DATETIME_TYPE_NAME(), type);
+  result |= EtchDateSerializer::Init(runtime, type, class2type);
+
+  result |= types->get(ETCH_AUTH_EXCEPTION_TYPE_NAME(), type);
+  result |= EtchAuthenticationExceptionSerializer::Init(runtime, type, class2type);
 
   {
-    result = types->get(ETCH_EXCEPTION_MESSAGE_NAME(), type);
+    result |= types->get(ETCH_EXCEPTION_MESSAGE_NAME(), type);
     capu::SmartPointer<EtchValidator> val;
-    EtchValidatorRuntimeException::Get(val);
-    result = type->putValidator(_mf_result(), val);
-    EtchValidatorLong::Get(0, val);
-    result = type->putValidator(_mf__messageId(), val);
-    result = type->putValidator(_mf__inReplyTo(), val);
+    EtchValidatorRuntimeException::Get(runtime, val);
+    result |= type->putValidator(_mf_result(), val);
+    EtchValidatorLong::Get(runtime, 0, val);
+    result |= type->putValidator(_mf__messageId(), val);
+    result |= type->putValidator(_mf__inReplyTo(), val);
   }
 
-  return ETCH_OK;
+  return result;
 }
 
 const EtchType * EtchDefaultValueFactory::get_mt__Etch_RuntimeException() {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp Wed Oct 17 06:50:01 2012
@@ -27,10 +27,8 @@ const EtchString& EtchHashTableSerialize
   return name;
 }
 
-EtchHashTableSerializer::EtchHashTableSerializer(EtchType* type, EtchField& field)
-: mField(field), mType(type) {
-  //TODO refactoring
-  mRuntime = EtchRuntime::getRuntime();
+EtchHashTableSerializer::EtchHashTableSerializer(EtchRuntime* runtime, EtchType* type, EtchField& field)
+: mRuntime(runtime), mField(field), mType(type) {
 }
 
 EtchHashTableSerializer::~EtchHashTableSerializer() {
@@ -98,10 +96,7 @@ status_t EtchHashTableSerializer::import
   return ETCH_OK;
 }
 
-status_t EtchHashTableSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchHashTableSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {
   status_t result;
 
   EtchField field;
@@ -118,11 +113,11 @@ status_t EtchHashTableSerializer::Init(E
   type->setComponentType(EtchHashTable<capu::SmartPointer<EtchObject>, capu::SmartPointer<EtchObject> >::TYPE());
 
   //set the import export helper
-  type->setImportExportHelper(new EtchHashTableSerializer(type, field));
+  type->setImportExportHelper(new EtchHashTableSerializer(runtime, type, field));
 
   //get validator
   capu::SmartPointer<EtchValidator> tmp;
-  result = EtchValidatorObject::Get(1, tmp);
+  result = EtchValidatorObject::Get(runtime, 1, tmp);
   if (result != ETCH_OK) {
     return result;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchListSerializer.cpp Wed Oct 17 06:50:01 2012
@@ -28,10 +28,8 @@ const EtchString& EtchListSerializer::FI
 
 // TODO: check signature regarding by value copy
 
-EtchListSerializer::EtchListSerializer(EtchType* type, EtchField* field)
-: mField(*field), mType(type) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchListSerializer::EtchListSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)
+: mRuntime(runtime), mField(*field), mType(type) {
 }
 
 EtchListSerializer::~EtchListSerializer() {
@@ -92,10 +90,7 @@ status_t EtchListSerializer::importValue
   return ETCH_OK;
 }
 
-status_t EtchListSerializer::Init(EtchType* type, EtchClass2TypeMap * class2type) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-  
+status_t EtchListSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap * class2type) {
   status_t result;
 
   EtchField field;
@@ -113,11 +108,11 @@ status_t EtchListSerializer::Init(EtchTy
 
   //set the import export helper
   // TODO memory EtchField
-  type->setImportExportHelper(new EtchListSerializer(type, &field));
-  
+  type->setImportExportHelper(new EtchListSerializer(runtime, type, &field));
+
   //get validator
   capu::SmartPointer<EtchValidator> validator;
-  result = EtchValidatorObject::Get(1, validator);
+  result = EtchValidatorObject::Get(runtime, 1, validator);
   if (result != ETCH_OK) {
     return result;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchRuntimeExceptionSerializer.cpp Wed Oct 17 06:50:01 2012
@@ -28,10 +28,8 @@ const EtchString& EtchRuntimeExceptionSe
 
 // TODO: check signature regarding by value copy
 
-EtchRuntimeExceptionSerializer::EtchRuntimeExceptionSerializer(EtchType* type, EtchField* field)
-: mField(*field), mType(type) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchRuntimeExceptionSerializer::EtchRuntimeExceptionSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)
+: mRuntime(runtime), mField(*field), mType(type) {
 }
 
 EtchRuntimeExceptionSerializer::~EtchRuntimeExceptionSerializer() {
@@ -71,10 +69,7 @@ status_t EtchRuntimeExceptionSerializer:
   return ETCH_OK;
 }
 
-status_t EtchRuntimeExceptionSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchRuntimeExceptionSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {
   status_t result;
 
   EtchField field;
@@ -91,11 +86,11 @@ status_t EtchRuntimeExceptionSerializer:
   type->setComponentType(EtchRuntimeException::TYPE());
 
   //set the import export helper
-  type->setImportExportHelper(new EtchRuntimeExceptionSerializer(type, &field));
+  type->setImportExportHelper(new EtchRuntimeExceptionSerializer(runtime, type, &field));
 
   //get validator
   capu::SmartPointer<EtchValidator> tmp;
-  result = EtchValidatorString::Get(0, tmp);
+  result = EtchValidatorString::Get(runtime, 0, tmp);
   if (result != ETCH_OK) {
     return result;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchSetSerializer.cpp Wed Oct 17 06:50:01 2012
@@ -26,10 +26,8 @@ const EtchString& EtchSetSerializer::FIE
   return name;
 }
 
-EtchSetSerializer::EtchSetSerializer(EtchType* type, EtchField* field)
-: mField(*field), mType(type) {
-  // TODO refactoring
-  mRuntime = EtchRuntime::getRuntime();
+EtchSetSerializer::EtchSetSerializer(EtchRuntime* runtime, EtchType* type, EtchField* field)
+: mRuntime(runtime), mField(*field), mType(type) {
 }
 
 EtchSetSerializer::~EtchSetSerializer() {
@@ -89,10 +87,7 @@ status_t EtchSetSerializer::importValue(
   return ETCH_OK;
 }
 
-status_t EtchSetSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {
-  //TODO refactoring
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchSetSerializer::Init(EtchRuntime* runtime, EtchType* type, EtchClass2TypeMap* class2type) {
   status_t result;
 
   EtchField field;
@@ -109,11 +104,11 @@ status_t EtchSetSerializer::Init(EtchTyp
   type->setComponentType(EtchHashSet<capu::SmartPointer<EtchObject> >::TYPE());
 
   //set the import export helper
-  type->setImportExportHelper(new EtchSetSerializer(type, &field));
+  type->setImportExportHelper(new EtchSetSerializer(runtime, type, &field));
 
   //get validator
   capu::SmartPointer<EtchValidator> tmp;
-  result = EtchValidatorObject::Get(1, tmp);
+  result = EtchValidatorObject::Get(runtime, 1, tmp);
   if (result != ETCH_OK) {
     return result;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorBoolean.cpp Wed Oct 17 06:50:01 2012
@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorBoole
   return &TYPE;
 }
 
-EtchValidatorBoolean::EtchValidatorBoolean(capu::uint32_t ndim)
-: EtchTypeValidator(EtchValidatorBoolean::TYPE(), EtchBool::TYPE(), EtchBool::TYPE(), ndim) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorBoolean::EtchValidatorBoolean(EtchRuntime* runtime, capu::uint32_t ndim)
+: mRuntime(runtime), EtchTypeValidator(EtchValidatorBoolean::TYPE(), EtchBool::TYPE(), EtchBool::TYPE(), ndim) {
 }
 
 EtchValidatorBoolean::EtchValidatorBoolean(const EtchValidatorBoolean& other)
@@ -79,19 +77,16 @@ status_t EtchValidatorBoolean::validateV
   }
 }
 
-status_t EtchValidatorBoolean::Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorBoolean::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS) {
     return ETCH_EINVAL;
   }
   if (ndim >= MAX_CACHED) {
-    val = new EtchValidatorBoolean(ndim);
+    val = new EtchValidatorBoolean(runtime, ndim);
     return ETCH_OK;
   }
   if (Validators(runtime)[ndim].get() == NULL) {
-    Validators(runtime)[ndim] = new EtchValidatorBoolean(ndim);
+    Validators(runtime)[ndim] = new EtchValidatorBoolean(runtime, ndim);
     CAPU_LOG_TRACE(runtime->getLogger(), TAG, "EtchValidatorBoolean has been created");
   }
   val = Validators(runtime)[ndim];
@@ -99,6 +94,6 @@ status_t EtchValidatorBoolean::Get(capu:
 }
 
 status_t EtchValidatorBoolean::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return EtchValidatorBoolean::Get(mNDims - 1, val);
+  return EtchValidatorBoolean::Get(mRuntime, mNDims - 1, val);
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp Wed Oct 17 06:50:01 2012
@@ -31,14 +31,12 @@ const EtchObjectType* EtchValidatorByte:
   return &TYPE;
 }
 
-EtchValidatorByte::EtchValidatorByte(capu::uint32_t ndim)
-: EtchTypeValidator(EtchValidatorByte::TYPE(), EtchByte::TYPE(), EtchByte::TYPE(), ndim) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorByte::EtchValidatorByte(EtchRuntime* runtime, capu::uint32_t ndim)
+: mRuntime(runtime), EtchTypeValidator(EtchValidatorByte::TYPE(), EtchByte::TYPE(), EtchByte::TYPE(), ndim) {
 }
 
 EtchValidatorByte::EtchValidatorByte(const EtchValidatorByte& other)
-: EtchTypeValidator(other), mRuntime(other.mRuntime) {
+: mRuntime(other.mRuntime), EtchTypeValidator(other) {
 
 }
 
@@ -123,19 +121,16 @@ status_t EtchValidatorByte::validateValu
   }
 }
 
-status_t EtchValidatorByte::Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorByte::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS) {
     return ETCH_EINVAL;
   }
   if (ndim >= MAX_CACHED) {
-    val = new EtchValidatorByte(ndim);
+    val = new EtchValidatorByte(runtime, ndim);
     return ETCH_OK;
   }
   if (Validators(runtime)[ndim].get() == NULL) {
-    Validators(runtime)[ndim] = new EtchValidatorByte(ndim);
+    Validators(runtime)[ndim] = new EtchValidatorByte(runtime, ndim);
     CAPU_LOG_TRACE(runtime->getLogger(), "EtchValidatorByte", "EtchValidatorByte has been created");
 
   }
@@ -144,5 +139,5 @@ status_t EtchValidatorByte::Get(capu::ui
 }
 
 status_t EtchValidatorByte::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return EtchValidatorByte::Get(mNDims - 1, val);
+  return EtchValidatorByte::Get(mRuntime, mNDims - 1, val);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp Wed Oct 17 06:50:01 2012
@@ -116,14 +116,14 @@ const EtchObjectType* EtchValidatorCusto
   return &TYPE;
 }
 
-EtchValidatorCustom::EtchValidatorCustom(const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub)
-  : EtchTypeValidator(EtchValidatorCustom::TYPE(), type, type, ndim) {
+EtchValidatorCustom::EtchValidatorCustom(EtchRuntime* runtime, const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub)
+  : EtchTypeValidator(EtchValidatorCustom::TYPE(), type, type, ndim), mRuntime(runtime) {
   // TODO refacotor type hierarchy
   mSubclass = sub;
 }
 
 EtchValidatorCustom::EtchValidatorCustom(const EtchValidatorCustom& other)
- : EtchTypeValidator(other) {
+ : EtchTypeValidator(other), mRuntime(other.mRuntime) {
 
 }
 
@@ -155,24 +155,21 @@ status_t EtchValidatorCustom::validateVa
   }
 }
 
-status_t EtchValidatorCustom::Get(capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorCustom::Get(EtchRuntime* runtime, capu::uint32_t ndim, const EtchObjectType *type, capu::bool_t sub, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS) {
     return ETCH_EINVAL;
   }
 
   EtchValidatorCustomKey key(type, ndim, sub);
   if (Validators(runtime).get(key, &val) == ETCH_ENOT_EXIST) {
-    val = new EtchValidatorCustom(type, ndim, sub);
+    val = new EtchValidatorCustom(runtime, type, ndim, sub);
     Validators(runtime).put(key, val);
   }
   return ETCH_OK;
 }
 
 status_t EtchValidatorCustom::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return EtchValidatorCustom::Get(mNDims - 1, mExpectedType->getObjectComponentType(), mSubclass, val);
+  return EtchValidatorCustom::Get(mRuntime, mNDims - 1, mExpectedType->getObjectComponentType(), mSubclass, val);
 }
 
 EtchHashTable<EtchValidatorCustomKey, capu::SmartPointer<EtchValidator> >& EtchValidatorCustom::Validators(EtchRuntime* runtime) {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorDouble.cpp Wed Oct 17 06:50:01 2012
@@ -30,10 +30,8 @@ const EtchObjectType* EtchValidatorDoubl
   return &TYPE;
 }
 
-EtchValidatorDouble::EtchValidatorDouble(capu::uint32_t ndim)
-: EtchTypeValidator(EtchValidatorDouble::TYPE(), EtchDouble::TYPE(), EtchDouble::TYPE(), ndim) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorDouble::EtchValidatorDouble(EtchRuntime* runtime, capu::uint32_t ndim)
+: EtchTypeValidator(EtchValidatorDouble::TYPE(), EtchDouble::TYPE(), EtchDouble::TYPE(), ndim), mRuntime(runtime) {
 }
 
 EtchValidatorDouble::EtchValidatorDouble(const EtchValidatorDouble& other)
@@ -78,19 +76,16 @@ status_t EtchValidatorDouble::validateVa
   }
 }
 
-status_t EtchValidatorDouble::Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
-    //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorDouble::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS) {
     return ETCH_EINVAL;
   }
   if (ndim >= MAX_CACHED) {
-    val = new EtchValidatorDouble(ndim);
+    val = new EtchValidatorDouble(runtime, ndim);
     return ETCH_OK;
   }
   if (Validators(runtime)[ndim].get() == NULL) {
-    Validators(runtime)[ndim] = new EtchValidatorDouble(ndim);
+    Validators(runtime)[ndim] = new EtchValidatorDouble(runtime, ndim);
     CAPU_LOG_TRACE(runtime->getLogger(), TAG, "EtchValidatorDouble has been created");
   }
   val = Validators(runtime)[ndim];
@@ -98,5 +93,5 @@ status_t EtchValidatorDouble::Get(capu::
 }
 
 status_t EtchValidatorDouble::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return EtchValidatorDouble::Get(mNDims - 1, val);
+  return EtchValidatorDouble::Get(mRuntime, mNDims - 1, val);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorFloat.cpp Wed Oct 17 06:50:01 2012
@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorFloat
   return &TYPE;
 }
 
-EtchValidatorFloat::EtchValidatorFloat(capu::uint32_t ndim)
-: EtchTypeValidator(EtchValidatorFloat::TYPE(), EtchFloat::TYPE(), EtchFloat::TYPE(), ndim) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorFloat::EtchValidatorFloat(EtchRuntime* runtime, capu::uint32_t ndim)
+: EtchTypeValidator(EtchValidatorFloat::TYPE(), EtchFloat::TYPE(), EtchFloat::TYPE(), ndim), mRuntime(runtime) {
 }
 
 EtchValidatorFloat::EtchValidatorFloat(const EtchValidatorFloat& other)
@@ -78,19 +76,16 @@ status_t EtchValidatorFloat::validateVal
   }
 }
 
-status_t EtchValidatorFloat::Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorFloat::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS) {
     return ETCH_EINVAL;
   }
   if (ndim >= MAX_CACHED) {
-    val = new EtchValidatorFloat(ndim);
+    val = new EtchValidatorFloat(runtime, ndim);
     return ETCH_OK;
   }
   if (Validators(runtime)[ndim].get() == NULL) {
-    Validators(runtime)[ndim] = new EtchValidatorFloat(ndim);
+    Validators(runtime)[ndim] = new EtchValidatorFloat(runtime, ndim);
     CAPU_LOG_TRACE(runtime->getLogger(), TAG, "EtchValidatorFloat has been created");
   }
   val = Validators(runtime)[ndim];
@@ -98,5 +93,5 @@ status_t EtchValidatorFloat::Get(capu::u
 }
 
 status_t EtchValidatorFloat::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return EtchValidatorFloat::Get(mNDims - 1, val);
+  return EtchValidatorFloat::Get(mRuntime, mNDims - 1, val);
 }