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

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

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

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorNone.cpp Wed Oct 17 06:50:01 2012
@@ -29,10 +29,8 @@ const EtchObjectType* EtchValidatorNone:
   return &TYPE;
 }
 
-EtchValidatorNone::EtchValidatorNone()
-: EtchValidator(EtchValidatorNone::TYPE()) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorNone::EtchValidatorNone(EtchRuntime* runtime)
+: EtchValidator(EtchValidatorNone::TYPE()), mRuntime(runtime) {
 }
 
 EtchValidatorNone::EtchValidatorNone(const EtchValidatorNone& other)
@@ -58,12 +56,9 @@ status_t EtchValidatorNone::validateValu
   }
 }
 
-status_t EtchValidatorNone::Get(capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorNone::Get(EtchRuntime* runtime, capu::SmartPointer<EtchValidator> &val) {
   if (Validators(runtime)[0].get() == NULL) {
-    Validators(runtime)[0] = new EtchValidatorNone();
+    Validators(runtime)[0] = new EtchValidatorNone(runtime);
     CAPU_LOG_TRACE(runtime->getLogger(), "EtchValidatorNone", "EtchValidatorNone has been created");
   }
   val = Validators(runtime)[0];

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorObject.cpp Wed Oct 17 06:50:01 2012
@@ -29,10 +29,8 @@ const EtchObjectType* EtchValidatorObjec
   return &TYPE;
 }
 
-EtchValidatorObject::EtchValidatorObject(capu::uint32_t ndim)
-: EtchTypeValidator(EtchValidatorObject::TYPE(), EtchObject::TYPE(), EtchObject::TYPE(), ndim) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorObject::EtchValidatorObject(EtchRuntime* runtime, capu::uint32_t ndim)
+: EtchTypeValidator(EtchValidatorObject::TYPE(), EtchObject::TYPE(), EtchObject::TYPE(), ndim), mRuntime(runtime) {
   mSubclass = true;
 }
 
@@ -65,25 +63,22 @@ status_t EtchValidatorObject::validateVa
   }
 }
 
-status_t EtchValidatorObject::Get(capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorObject::Get(EtchRuntime* runtime, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS)
     return ETCH_EINVAL;
   if (ndim >= MAX_CACHED) {
-    val = new EtchValidatorObject(ndim);
+    val = new EtchValidatorObject(runtime, ndim);
     return ETCH_OK;
   }
   //TODO thread safety
   if (Validators(runtime)[ndim].get() == NULL) {
     CAPU_LOG_TRACE(runtime->getLogger(), "EtchValidatorObject", "EtchValidatorObject has been created");
-    Validators(runtime)[ndim] = new EtchValidatorObject(ndim);
+    Validators(runtime)[ndim] = new EtchValidatorObject(runtime, ndim);
   }
   val = Validators(runtime)[ndim];
   return ETCH_OK;
 }
 
 status_t EtchValidatorObject::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return EtchValidatorObject::Get(mNDims - 1, val);
+  return EtchValidatorObject::Get(mRuntime, mNDims - 1, val);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorRuntimeException.cpp Wed Oct 17 06:50:01 2012
@@ -31,10 +31,8 @@ const EtchObjectType* EtchValidatorRunti
   return &TYPE;
 }
 
-EtchValidatorRuntimeException::EtchValidatorRuntimeException()
-: EtchValidator(EtchValidatorRuntimeException::TYPE()) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorRuntimeException::EtchValidatorRuntimeException(EtchRuntime* runtime)
+: EtchValidator(EtchValidatorRuntimeException::TYPE()), mRuntime(runtime) {
 }
 
 EtchValidatorRuntimeException::EtchValidatorRuntimeException(const EtchValidatorRuntimeException& other)
@@ -62,12 +60,9 @@ status_t EtchValidatorRuntimeException::
   }
 }
 
-status_t EtchValidatorRuntimeException::Get(capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorRuntimeException::Get(EtchRuntime* runtime, capu::SmartPointer<EtchValidator> &val) {
   if (Validators(runtime)[0].get() == NULL) {
-    Validators(runtime)[0] = new EtchValidatorRuntimeException();
+    Validators(runtime)[0] = new EtchValidatorRuntimeException(runtime);
     CAPU_LOG_TRACE(runtime->getLogger(), "EtchValidatorRuntimeException", "EtchValidatorRuntimeException has been created");
   }
   val = Validators(runtime)[0];

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

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

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorStructValue.cpp Wed Oct 17 06:50:01 2012
@@ -26,14 +26,13 @@ const EtchObjectType* EtchValidatorStruc
   return &TYPE;
 }
 
-EtchValidatorStructValue::EtchValidatorStructValue(EtchType* type, capu::uint32_t ndim)
-: EtchTypeValidator(EtchValidatorStructValue::TYPE(), EtchStructValue::TYPE(), EtchStructValue::TYPE(), ndim), mType(type) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchValidatorStructValue::EtchValidatorStructValue(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim)
+: EtchTypeValidator(EtchValidatorStructValue::TYPE(), EtchStructValue::TYPE(), EtchStructValue::TYPE(), ndim)
+, mRuntime(runtime), mType(type) {
 }
 
 EtchValidatorStructValue::EtchValidatorStructValue(const EtchValidatorStructValue& other)
-: EtchTypeValidator(other), mType(other.mType), mRuntime(other.mRuntime) {
+: EtchTypeValidator(other), mRuntime(other.mRuntime), mType(other.mType) {
 
 }
 
@@ -73,18 +72,15 @@ capu::bool_t EtchValidatorStructValue::v
 }
 
 status_t EtchValidatorStructValue::getElementValidator(capu::SmartPointer<EtchValidator> &val) {
-  return Get(mType, mNDims - 1, val);
+  return Get(mRuntime, mType, mNDims - 1, val);
 }
 
-status_t EtchValidatorStructValue::Get(EtchType* type, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
+status_t EtchValidatorStructValue::Get(EtchRuntime* runtime, EtchType* type, capu::uint32_t ndim, capu::SmartPointer<EtchValidator> &val) {
   if (ndim > MAX_NDIMS) {
     return ETCH_EINVAL;
   }
   CAPU_LOG_TRACE(runtime->getLogger(), TAG, "EtchValidatorShort has been created");
-  val = capu::SmartPointer <EtchValidator > (new EtchValidatorStructValue(type, ndim));
+  val = capu::SmartPointer <EtchValidator > (new EtchValidatorStructValue(runtime, type, ndim));
   return ETCH_OK;
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchDefaultServerFactory.cpp Wed Oct 17 06:50:01 2012
@@ -78,7 +78,7 @@ status_t EtchDefaultServerFactory::trans
   if(mListener == NULL) {
     return ETCH_ERANGE;
   }
-  return mListener->transportControl(control, value);;
+  return mListener->transportControl(control, value);
 }
 
 status_t EtchDefaultServerFactory::transportNotify( capu::SmartPointer<EtchObject> event ) {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.cpp Wed Oct 17 06:50:01 2012
@@ -24,10 +24,8 @@
 
 static char* TAG = "EtchRemoteBase";
 
-EtchRemoteBase::EtchRemoteBase(EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack) 
-  : mSvc(svc), mVf(vf), mStack(stack) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchRemoteBase::EtchRemoteBase(EtchRuntime* runtime, EtchDeliveryService* svc, EtchValueFactory* vf, EtchStack* stack)
+  : mRuntime(runtime), mSvc(svc), mVf(vf), mStack(stack) {
 }
 
 EtchRemoteBase::~EtchRemoteBase() {
@@ -51,7 +49,7 @@ status_t EtchRemoteBase::send(capu::Smar
 }
 
 status_t EtchRemoteBase::begincall(capu::SmartPointer<EtchMessage> msg, EtchMailbox *&result) {
-  CAPU_LOG_DEBUG(mRuntime->getLogger(), TAG, "Begin call for the message is initiated");  
+  CAPU_LOG_DEBUG(mRuntime->getLogger(), TAG, "Begin call for the message is initiated");
   return mSvc->begincall(msg, result);
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp Wed Oct 17 06:50:01 2012
@@ -21,21 +21,15 @@
 #include "support/EtchTransportHelper.h"
 #include "util/EtchLogger.h"
 
-//TODO remove this after refactoring
-EtchRuntime* EtchRuntime::sRuntime = NULL;
-
 EtchRuntime::EtchRuntime()
-  : mIsClosed(false)
-  , mLogger(NULL) {
+  : mIsClosed(false) {
   mMutex.lock();
   mId = getNextId();
   mMutex.unlock();
-
-  //TODO remove this after refactoring
-  sRuntime = this;
 }
 
 EtchRuntime::~EtchRuntime() {
+  //do nothing
 }
 
 capu::uint64_t EtchRuntime::getId() {
@@ -101,19 +95,6 @@ capu::uint64_t EtchRuntime::getNextId() 
   return sId++;
 }
 
-status_t EtchRuntime::setLogger(EtchLogger* logger) {
-  if(logger == NULL) {
-    return ETCH_EINVAL;
-  }
-  mLogger = logger;
-  return ETCH_OK;
-}
-
-EtchLogger* EtchRuntime::getLogger() {
+EtchLogger& EtchRuntime::getLogger() {
   return mLogger;
 }
-
-EtchRuntime* EtchRuntime::getRuntime() {
-  return sRuntime;
-}
-

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchStackClient.cpp Wed Oct 17 06:50:01 2012
@@ -23,19 +23,19 @@ const EtchObjectType* EtchStackClient::T
    return &TYPE;
 }
 
-EtchStackClient::EtchStackClient() : EtchStack(), mStaticResources(NULL) {
+EtchStackClient::EtchStackClient(EtchRuntime* runtime) : EtchStack(), mRuntime(runtime), mStaticResources(NULL) {
   addObjectType(EtchStackClient::TYPE());
 }
 
 EtchStackClient::EtchStackClient(const EtchStackClient& other)
- : EtchStack(other), mStaticResources(other.mStaticResources)
+ : EtchStack(other), mRuntime(other.mRuntime), mStaticResources(other.mStaticResources)
 {
 
 }
 
 EtchStackClient::~EtchStackClient() {
   if (mStaticResources != NULL) {
-    EtchTransportHelper::DestroyResources(mStaticResources);
+    EtchTransportHelper::DestroyResources(mRuntime, mStaticResources);
   }
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchTransportHelper.cpp Wed Oct 17 06:50:01 2012
@@ -42,16 +42,13 @@ const EtchString& EtchTransportHelper::X
   return type;
 }
 
-status_t EtchTransportHelper::InitResources(EtchResources* resources, EtchResources*& result) {
+status_t EtchTransportHelper::InitResources(EtchRuntime* runtime, EtchResources* resources, EtchResources*& result) {
   if(resources == NULL) {
     resources = new EtchResources();
   } else {
     resources = new EtchResources(*resources);
   }
 
-  //TODO rafactor this
-  EtchRuntime* runtime = EtchRuntime::getRuntime();
-
   EtchObject* obj = NULL;
   EtchObject* objOld = NULL;
   // Queued Pool
@@ -72,16 +69,14 @@ status_t EtchTransportHelper::InitResour
   return ETCH_OK;
 }
 
-status_t EtchTransportHelper::DestroyResources(EtchResources* resources) {
-  status_t result; 
+status_t EtchTransportHelper::DestroyResources(EtchRuntime* runtime, EtchResources* resources) {
+  status_t result;
   if (resources == NULL) {
     return ETCH_EINVAL;
   } else {
-    //TODO rafactor this
-    EtchRuntime* runtime = EtchRuntime::getRuntime();
 
     EtchObject* returnValue = NULL;
-    
+
     //get queued pool and delete it
     result = resources->get(EtchTransportHelper::QUEUED_POOL(), returnValue);
     if(result == ETCH_OK && returnValue != NULL) {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp Wed Oct 17 06:50:01 2012
@@ -29,20 +29,14 @@ const EtchString& EtchDefaultDeliverySer
   return name;
 }
 
-EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchMailboxManager* transport, const EtchString& uri)
+EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, const EtchString& uri)
 : mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
-
   EtchURL url(uri);
   init(&url);
 }
 
-EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchMailboxManager* transport, EtchURL* uri)
-: mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
-
+EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, EtchURL* uri)
+: mRuntime(runtime), mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {
   init(uri);
 }
 
@@ -150,7 +144,7 @@ status_t EtchDefaultDeliveryService::tra
 }
 
 status_t EtchDefaultDeliveryService::begincall(capu::SmartPointer<EtchMessage> msg, EtchMailbox*& result) {
-  CAPU_LOG_DEBUG(mRuntime->getLogger(), TAG, "Begin call for the message has been initiated");  
+  CAPU_LOG_DEBUG(mRuntime->getLogger(), TAG, "Begin call for the message has been initiated");
   return mTransport->transportCall(NULL, msg, result);
 }
 
@@ -165,7 +159,7 @@ status_t EtchDefaultDeliveryService::end
   status_t res = mb->read(mbe, timeout);
   if (res != ETCH_OK) {
     mb->closeRead();
-    CAPU_LOG_ERROR(mRuntime->getLogger(), TAG, "Error on mailbox read, might be caused by timeout"); 
+    CAPU_LOG_ERROR(mRuntime->getLogger(), TAG, "Error on mailbox read, might be caused by timeout");
     //TODO: Add error handling
     return res;
   }
@@ -193,7 +187,7 @@ status_t EtchDefaultDeliveryService::end
   } else if (err != ETCH_OK) {
     mb->closeRead();
     rmsg->clear();
-    CAPU_LOG_ERROR(mRuntime->getLogger(), TAG, "Error on getting respective field on message structure"); 
+    CAPU_LOG_ERROR(mRuntime->getLogger(), TAG, "Error on getting respective field on message structure");
     delete mbe;
     return ETCH_ERROR;
   }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchMessagizer.cpp Wed Oct 17 06:50:01 2012
@@ -26,10 +26,8 @@ const EtchString& EtchMessagizer::FORMAT
 }
 capu::Mutex EtchMessagizer::mutex;
 
-EtchMessagizer::EtchMessagizer(EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources)
-: mTransport(transport) {
-  //TODO refactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchMessagizer::EtchMessagizer(EtchRuntime* runtime, EtchTransportPacket* transport, EtchURL* uri, EtchResources* resources)
+: mRuntime(runtime), mTransport(transport) {
 
   EtchString format;
   EtchObject * val;
@@ -38,14 +36,14 @@ EtchMessagizer::EtchMessagizer(EtchTrans
   if (uri->getTerms().get(FORMAT(), &format) == ETCH_OK) {
 
     if (format.equals(&EtchFormat::BINARY())) {
-      mTdi = new EtchBinaryTaggedDataInput((EtchValueFactory *) val);
-      mTdo = new EtchBinaryTaggedDataOutput((EtchValueFactory *) val, uri);
+      mTdi = new EtchBinaryTaggedDataInput(runtime, (EtchValueFactory *) val);
+      mTdo = new EtchBinaryTaggedDataOutput(runtime, (EtchValueFactory *) val, uri);
     } else if (format.equals(&EtchFormat::XML())) {
       //we dont need serialization via xml currently
     }
   } else {
-    mTdi = new EtchBinaryTaggedDataInput((EtchValueFactory *) val);
-    mTdo = new EtchBinaryTaggedDataOutput((EtchValueFactory *) val, uri);
+    mTdi = new EtchBinaryTaggedDataInput(runtime, (EtchValueFactory *) val);
+    mTdo = new EtchBinaryTaggedDataOutput(runtime, (EtchValueFactory *) val, uri);
   }
   transport->setSession(this);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPacketizer.cpp Wed Oct 17 06:50:01 2012
@@ -41,11 +41,8 @@ const EtchString& EtchPacketizer::MAX_PK
   return pktSize;
 }
 
-EtchPacketizer::EtchPacketizer(EtchTransportData* transport, EtchString& uri)
-: mTransport(transport), mBodyLen(0), mWantHeader(true) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
-
+EtchPacketizer::EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchString& uri)
+: mRuntime(runtime), mTransport(transport), mBodyLen(0), mWantHeader(true) {
   if (mTransport != NULL)
     mTransport->setSession(this);
 
@@ -63,11 +60,8 @@ EtchPacketizer::EtchPacketizer(EtchTrans
   mSavedBuf = new EtchFlexBuffer();
 }
 
-EtchPacketizer::EtchPacketizer(EtchTransportData* transport, EtchURL* uri)
-: mTransport(transport), mBodyLen(0), mWantHeader(true) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
-
+EtchPacketizer::EtchPacketizer(EtchRuntime* runtime, EtchTransportData* transport, EtchURL* uri)
+: mRuntime(runtime), mTransport(transport), mBodyLen(0), mWantHeader(true) {
   EtchString value("");
   if (mTransport != NULL)
     transport->setSession(this);

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp Wed Oct 17 06:50:01 2012
@@ -19,10 +19,8 @@
 #include "support/EtchRuntime.h"
 #include "capu/os/Debug.h"
 
-EtchPlainMailboxManager::EtchPlainMailboxManager(EtchTransportMessage* transport, const EtchString& uri, EtchResources* resources)
-: mSession(NULL), mTransport(transport), mUp(false) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
+EtchPlainMailboxManager::EtchPlainMailboxManager(EtchRuntime* runtime, EtchTransportMessage* transport, const EtchString& uri, EtchResources* resources)
+: mRuntime(runtime), mSession(NULL), mTransport(transport), mUp(false) {
   capu::Debug::Assert(mRuntime != NULL);
   mTransport->setSession(this);
 }
@@ -58,7 +56,7 @@ status_t EtchPlainMailboxManager::regist
     mMutex.unlock();
     return ETCH_EINVAL;
   }
-  
+
   EtchMailbox* tmp = NULL;
   if (mMailboxes.get(msgid, &tmp) != ETCH_ENOT_EXIST) {
     mMutex.unlock();

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp Wed Oct 17 06:50:01 2012
@@ -48,11 +48,8 @@ const EtchString& EtchTcpListener::CONNE
   return name;
 }
 
-EtchTcpListener::EtchTcpListener(EtchURL *url)
-: mPort(url->getPort()) {
-  //TODO rafactor this
-  mRuntime = EtchRuntime::getRuntime();
-
+EtchTcpListener::EtchTcpListener(EtchRuntime* runtime, EtchURL *url)
+: mRuntime(runtime), mPort(url->getPort()) {
   EtchString str;
   if (url->getTerms().get(BACKLOG(), &str) != ETCH_OK) {
     mBackLog = 0;

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp Wed Oct 17 06:50:01 2012
@@ -69,10 +69,10 @@ status_t EtchTcpTransportFactory::newTra
   }
   stack->setTransportData(c);
 
-  EtchTransportPacket* p = new EtchPacketizer(c, &u);
+  EtchTransportPacket* p = new EtchPacketizer(mRuntime, c, &u);
   stack->setTransportPacket(p);
 
-  EtchTransportMessage* m = new EtchMessagizer(p, &u, resources);
+  EtchTransportMessage* m = new EtchMessagizer(mRuntime, p, &u, resources);
   stack->setTransportMessage(m);
 
   //TODO: ADD FILTERS HERE
@@ -98,7 +98,7 @@ status_t EtchTcpTransportFactory::newLis
     //TODO secure communication
     return ETCH_EUNIMPL;
   } else {
-    l = new EtchTcpListener(&u);
+    l = new EtchTcpListener(mRuntime, &u);
   }
 
   result = new MySessionListener(mRuntime, this, l, uri, resources, mIsSecure);
@@ -128,7 +128,7 @@ EtchTcpTransportFactory::MySessionListen
     delete mFactory;
   }
   if (mResources != NULL) {
-    EtchTransportHelper::DestroyResources(mResources);
+    EtchTransportHelper::DestroyResources(mRuntime, mResources);
   }
 
   capu::List<EtchStack*>::Iterator it = mConnectionStacks->begin();
@@ -168,7 +168,7 @@ status_t EtchTcpTransportFactory::MySess
 
 status_t EtchTcpTransportFactory::MySessionListener::sessionNotify(capu::SmartPointer<EtchObject> event) {
   if (event->equals(&EtchTcpListener::CONNECTION_CHECK())) {
-    //go through the list of connection and check if the connection is still dead and we have to clean the stack up 
+    //go through the list of connection and check if the connection is still dead and we have to clean the stack up
     capu::List<EtchStack*>::Iterator it = mConnectionStacks->begin();
     while (it.hasNext()) {
       EtchStack* stack = NULL;
@@ -190,7 +190,7 @@ status_t EtchTcpTransportFactory::MySess
   }
 
   return mSession->sessionNotify(event);
-  
+
 }
 
 status_t EtchTcpTransportFactory::MySessionListener::sessionAccepted(EtchSocket* connection) {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp Wed Oct 17 06:50:01 2012
@@ -21,13 +21,13 @@
 #include "util/EtchCircularQueue.h"
 
 EtchCircularQueue::EtchCircularQueue()
-: mSize(10), mItems(NULL), mClosed(false), mCount(0), mHead(0), mTail(0) {
+: mItems(NULL), mClosed(false), mCount(0), mSize(10), mHead(0), mTail(0) {
   mItems = new EtchMailbox::EtchElement*[mSize];
   capu::Memory::Set(mItems, 0, sizeof(EtchMailbox::EtchElement*) * mSize);
 }
 
 EtchCircularQueue::EtchCircularQueue(capu::uint32_t size)
-: mSize(size), mItems(NULL), mClosed(false), mCount(0), mHead(0), mTail(0) {
+: mItems(NULL), mClosed(false), mCount(0), mSize(size), mHead(0), mTail(0) {
   mItems = new EtchMailbox::EtchElement*[mSize];
   capu::Memory::Set(mItems, 0, sizeof(EtchMailbox::EtchElement*) * mSize);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchArrayValueTest.cpp Wed Oct 17 06:50:01 2012
@@ -76,7 +76,7 @@ TEST(EtchArrayValueTest, getTest) {
   capu::SmartPointer<EtchObject> result;
   EtchArrayValue *av = new EtchArrayValue(array, 5);
 
-  EXPECT_EQ(5, av->getSize());
+  EXPECT_EQ(5u, av->getSize());
   capu::int32_t index = 0;
 
   EXPECT_EQ(ETCH_OK, av->get(index++, result));
@@ -106,7 +106,7 @@ TEST(EtchArrayValueTest, getTest) {
 
   EtchArrayValue *av2 = new EtchArrayValue(nativeTypeArray, 5);
 
-  EXPECT_EQ(5, av2->getSize());
+  EXPECT_EQ(5u, av2->getSize());
   index = 0;
 
   capu::SmartPointer<EtchInt32> intResult;
@@ -150,7 +150,7 @@ TEST(EtchArrayValueTest, addTest) {
   capu::SmartPointer<EtchObject> result;
   EtchArrayValue *av = new EtchArrayValue(array, 5);
 
-  EXPECT_EQ(5, av->getSize());
+  EXPECT_EQ(5u, av->getSize());
   capu::int32_t index = 0;
 
   EXPECT_EQ(ETCH_OK, av->get(index++, result));
@@ -173,10 +173,10 @@ TEST(EtchArrayValueTest, addTest) {
   EXPECT_EQ(ETCH_OK, av->get(index++, result));
   EXPECT_TRUE(result->equals(dt.get()));
   //size should be doubled
-  EXPECT_EQ(10, av->getSize());
+  EXPECT_EQ(10u, av->getSize());
 
   av->add(NULL);
-  EXPECT_EQ(10, av->getSize());
+  EXPECT_EQ(10u, av->getSize());
 
   delete av;
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/common/EtchNativeArrayTest.cpp Wed Oct 17 06:50:01 2012
@@ -118,9 +118,9 @@ TEST(EtchNativeArrayTest, Constructor_Ar
 
   EtchNativeArray<capu::int8_t> *na2 = new EtchNativeArray<capu::int8_t>(2, 1, (capu::int8_t*)nativeArray);
 
-  EXPECT_EQ(1, na2->getDim());
+  EXPECT_EQ(1u, na2->getDim());
   EXPECT_EQ(2, na2->getLength());
-  
+
   capu::int8_t nativeResult;
   EXPECT_EQ(ETCH_OK, na2->get(0,&nativeResult));
   EXPECT_EQ(1, nativeResult);
@@ -138,9 +138,9 @@ TEST(EtchNativeArrayTest, Constructor_Ar
 
   EtchNativeArray<capu::int8_t> *na3 = new EtchNativeArray<capu::int8_t>(2, 2, (capu::int8_t*)nativeArray2);
 
-  EXPECT_EQ(2, na3->getDim());
+  EXPECT_EQ(2u, na3->getDim());
   EXPECT_EQ(2, na3->getLength());
-  
+
   EXPECT_EQ(ETCH_OK, na3->get(Pos(0,0),&nativeResult));
   EXPECT_EQ(0, nativeResult);
   EXPECT_EQ(ETCH_OK, na3->get(Pos(0,1),&nativeResult));
@@ -205,7 +205,7 @@ TEST(EtchNativeArrayTest, setGetArray) {
   //data == NULL
   ret = na->set(0,NULL,0,0,0,&elementsWritten);
   EXPECT_EQ(ETCH_EINVAL, ret);
-  
+
   //data == NULL
   ret = na->get(0,NULL,0,0,0,&elementsRead);
   EXPECT_EQ(ETCH_EINVAL, ret);
@@ -230,7 +230,7 @@ TEST(EtchNativeArrayTest, setGetArray) {
   ret = na->set(0, arr1, 6, 0, 6, &elementsWritten);
   EXPECT_EQ(ret, ETCH_OK);
   EXPECT_EQ(elementsWritten, 6);
-  
+
   na->get(0,&temp);
   EXPECT_EQ(temp->get(), 1);
   na->set(0, int2);
@@ -441,11 +441,11 @@ TEST(EtchNativeArrayTest, setSubarray) {
   //fill main array
   mainArray->set(Pos(0, 0, 0), int1);
   mainArray->set(Pos(0, 0, 1), int2);
-  
+
   //fill sub array
   subArray->set(Pos(0),int3);
   subArray->set(Pos(0),int4);
-  
+
   //set sub array in data array, must return error
   ret = mainArray->set(Pos(1, 0, 0), subArray);
   EXPECT_EQ(ETCH_ERANGE, ret);
@@ -500,4 +500,4 @@ TEST(EtchNativeArrayTest, setSubarray) {
   delete na;
 
 
-}
\ No newline at end of file
+}

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchAuthenticationExceptionSerializerTest.cpp Wed Oct 17 06:50:01 2012
@@ -71,16 +71,11 @@ class EtchAuthenticationExceptionSeriali
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -93,7 +88,7 @@ TEST_F(EtchAuthenticationExceptionSerial
   EtchString typeName("type1");
   EtchType* type = new EtchType(10, typeName);
   EtchType* result;
-  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   c2type->get(EtchAuthenticationException::TYPE(), &result);
 
   //check the added type to class to type matching
@@ -109,7 +104,7 @@ TEST_F(EtchAuthenticationExceptionSerial
   //check validator
   type->getValidator(field, validator);
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorString::Get(0, val);
+  EtchValidatorString::Get(mRuntime, 0, val);
   EXPECT_TRUE(validator == val);
   delete type;
   delete c2type;
@@ -126,7 +121,7 @@ TEST_F(EtchAuthenticationExceptionSerial
   capu::SmartPointer<EtchObject> object3;
   EtchStructValue* result;
   //initialize the serializer
-  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   EtchImportExportHelper* test = type->getImportExportHelper();
   //check with invalid values
   EXPECT_TRUE(test->exportValue(NULL, NULL, result) == ETCH_EINVAL);
@@ -165,7 +160,7 @@ TEST_F(EtchAuthenticationExceptionSerial
   capu::SmartPointer<EtchObject> object = new EtchAuthenticationException(message);
   EtchStructValue* structValue;
   //initialize the serializer
-  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchAuthenticationExceptionSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   //get the serializer
   EtchImportExportHelper* test = type->getImportExportHelper();
   //export values

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp Wed Oct 17 06:50:01 2012
@@ -88,8 +88,8 @@ public:
    */
 public:
 
-  MyValueFactory(EtchString uri) {
-    EtchDefaultValueFactory::Init(&types, &class2type);
+  MyValueFactory(EtchRuntime* runtime, EtchString uri) {
+    EtchDefaultValueFactory::Init(runtime, &types, &class2type);
     factory = new EtchDefaultValueFactory(uri, &types, &class2type);
   }
 
@@ -134,8 +134,8 @@ public:
     return vals;
   }
 
-  static void test(capu::SmartPointer<EtchObject> x, capu::SmartPointer<EtchValidator> v, capu::bool_t stringTypeAndField) {
-    MyValueFactory vf("tcp:");
+  static void test(EtchRuntime* runtime, capu::SmartPointer<EtchObject> x, capu::SmartPointer<EtchValidator> v, capu::bool_t stringTypeAndField) {
+    MyValueFactory vf(runtime, "tcp:");
     EtchType *mt_foo = NULL;
     EtchField mf_x("x");
     EtchString foo("foo");
@@ -148,10 +148,10 @@ public:
     capu::uint32_t length;
     capu::int8_t * buffer;
     //SERIALIZE DATA INTO FLEX BUFFER
-    msg2bytes(msg, stringTypeAndField, length, buffer, vf);
+    msg2bytes(runtime, msg, stringTypeAndField, length, buffer, vf);
     capu::SmartPointer<EtchMessage> msg2;
     //DESERIALIZE DATA FROM FLEX BYTE ARRAY
-    bytes2msg(buffer, length, msg2, vf);
+    bytes2msg(runtime, buffer, length, msg2, vf);
     //TYPE CHECK
     EXPECT_TRUE(msg2->isType(mt_foo));
     EXPECT_TRUE(msg2->count() == 1);
@@ -191,13 +191,13 @@ public:
     }
   }
 
-  static void msg2bytes(capu::SmartPointer<EtchMessage> msg, capu::bool_t stringTypeAndField, capu::uint32_t &size, capu::int8_t *&buffer, MyValueFactory &vf) {
+  static void msg2bytes(EtchRuntime* runtime, capu::SmartPointer<EtchMessage> msg, capu::bool_t stringTypeAndField, capu::uint32_t &size, capu::int8_t *&buffer, MyValueFactory &vf) {
     capu::SmartPointer<EtchFlexBuffer> buf = new EtchFlexBuffer();
 
     EtchURL u("none:");
     //    u.addTerm(EtchBinaryTaggedDataOutput::STRING_TYPE_AND_FIELD(), stringTypeAndField);
 
-    EtchBinaryTaggedDataOutput btdo(vf.factory, &u);
+    EtchBinaryTaggedDataOutput btdo(runtime, vf.factory, &u);
     EXPECT_TRUE(btdo.writeMessage(msg, buf) == ETCH_OK);
     buf->setIndex(0);
     size = buf->getAvailableBytes();
@@ -207,23 +207,23 @@ public:
     return;
   }
 
-  static void bytes2msg(capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer<EtchMessage> &msg, MyValueFactory &vf) {
-    bytes2msg(buf, length, msg, LEVEL_FULL, vf);
+  static void bytes2msg(EtchRuntime* runtime, capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer<EtchMessage> &msg, MyValueFactory &vf) {
+    bytes2msg(runtime, buf, length, msg, LEVEL_FULL, vf);
   }
 
-  static void bytes2msg(capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer<EtchMessage> &msg, EtchLevel level, MyValueFactory &vf) {
+  static void bytes2msg(EtchRuntime* runtime, capu::int8_t* buf, capu::uint32_t length, capu::SmartPointer<EtchMessage> &msg, EtchLevel level, MyValueFactory &vf) {
     EtchLevel oldLevel = vf.factory->setLevel(level);
-    EtchBinaryTaggedDataInput btdi(vf.factory);
+    EtchBinaryTaggedDataInput btdi(runtime, vf.factory);
     capu::SmartPointer<EtchFlexBuffer> buffer = new EtchFlexBuffer(buf, length);
     buffer->setIndex(0);
     EXPECT_TRUE(btdi.readMessage(buffer, msg) == ETCH_OK);
     vf.factory->setLevel(oldLevel);
   }
 
-  static void test_bto_write(capu::SmartPointer<EtchObject> x, capu::int8_t *compare_buffer, capu::SmartPointer<EtchValidator> v) {
+  static void test_bto_write(EtchRuntime* runtime, capu::SmartPointer<EtchObject> x, capu::int8_t *compare_buffer, capu::SmartPointer<EtchValidator> v) {
     EtchString type("a");
     EtchString field("b");
-    MyValueFactory vf("tcp:");
+    MyValueFactory vf(runtime, "tcp:");
 
     EtchType t(1, type);
     EtchField f(2, field);
@@ -232,7 +232,7 @@ public:
     capu::SmartPointer<EtchMessage> msg = new EtchMessage(&t, vf.factory);
     msg->put(f, x);
     EtchURL u("none:");
-    EtchBinaryTaggedDataOutput btdo(vf.factory, &u);
+    EtchBinaryTaggedDataOutput btdo(runtime, vf.factory, &u);
     capu::SmartPointer<EtchFlexBuffer> buf = new EtchFlexBuffer();
     buf->setByteRepresentation(ETCH_BIG_ENDIAN);
     EXPECT_TRUE(btdo.writeMessage(msg, buf) == ETCH_OK);
@@ -253,16 +253,11 @@ class EtchBinaryTaggedDataInputOutputTes
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -272,14 +267,14 @@ protected:
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, createTest) {
   MockValueFactory9 *factory = new MockValueFactory9();
-  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(factory);
+  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(mRuntime, factory);
   delete dataIn;
   delete factory;
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, checkTest) {
   MockValueFactory9 *factory = new MockValueFactory9();
-  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(factory);
+  EtchBinaryTaggedDataInput* dataIn = new EtchBinaryTaggedDataInput(mRuntime, factory);
 
   // i'm testing with hard coded constants on the left hand
   // side here because this represents our external interface
@@ -421,13 +416,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorBoolean::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorBoolean::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorBoolean::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorBoolean::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 //
 
@@ -445,13 +440,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorInt::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorInt::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorInt::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorInt::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, string_serialization) {
@@ -470,13 +465,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorString::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorString::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorString::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorString::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, long_serialization) {
@@ -493,13 +488,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorLong::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorLong::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorLong::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorLong::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, byte_serialization) {
@@ -507,8 +502,8 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   capu::SmartPointer<EtchByte> content1 = new EtchByte(90);
   //array can not be tested because it is optimized as native
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorByte::Get(0, val);
-  Utility::test(content1, val, false);
+  EtchValidatorByte::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, short_serialization) {
@@ -525,13 +520,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorShort::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorShort::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorShort::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorShort::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, float_serialization) {
@@ -548,13 +543,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorFloat::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorFloat::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorFloat::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorFloat::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, double_serialization) {
@@ -571,20 +566,20 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorDouble::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorDouble::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorDouble::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorDouble::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, empty_string_serialization) {
   capu::SmartPointer<EtchString> str = new EtchString(NULL, 0, "utf-8");
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorString::Get(0, val);
-  Utility::test(str, val, false);
+  EtchValidatorString::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, str, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, date_serialization) {
@@ -605,13 +600,13 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 1), content4);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorObject::Get(2, val);
-  Utility::test(carray1, val, false);
-  EtchValidatorObject::Get(0, val);
-  Utility::test(content1, val, false);
-  Utility::test(content2, val, false);
-  Utility::test(content3, val, false);
-  Utility::test(content4, val, false);
+  EtchValidatorObject::Get(mRuntime, 2, val);
+  Utility::test(mRuntime, carray1, val, false);
+  EtchValidatorObject::Get(mRuntime, 0, val);
+  Utility::test(mRuntime, content1, val, false);
+  Utility::test(mRuntime, content2, val, false);
+  Utility::test(mRuntime, content3, val, false);
+  Utility::test(mRuntime, content4, val, false);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_object_serialization) {
@@ -624,8 +619,8 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(1, content2);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorObject::Get(1, val);
-  Utility::test_bto_write(carray1, byte_array, val);
+  EtchValidatorObject::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray1, byte_array, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_boolean_write) {
@@ -639,11 +634,11 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(0, content1);
   carray->set(1, content2);
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorBoolean::Get(0, val);
-  Utility::test_bto_write(content2, byte_false, val);
-  Utility::test_bto_write(content1, byte_true, val);
-  EtchValidatorBoolean::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorBoolean::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content2, byte_false, val);
+  Utility::test_bto_write(mRuntime, content1, byte_true, val);
+  EtchValidatorBoolean::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 
 }
 
@@ -668,14 +663,14 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(2, content5);
   capu::SmartPointer<EtchValidator> val = NULL;
 
-  EtchValidatorByte::Get(0, val);
-  Utility::test_bto_write(content1, byte_pos, val);
-  Utility::test_bto_write(content2, byte_neg, val);
-  Utility::test_bto_write(content0, byte_zero, val);
-  Utility::test_bto_write(content7, bytes, val);
+  EtchValidatorByte::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content1, byte_pos, val);
+  Utility::test_bto_write(mRuntime, content2, byte_neg, val);
+  Utility::test_bto_write(mRuntime, content0, byte_zero, val);
+  Utility::test_bto_write(mRuntime, content7, bytes, val);
 
-  EtchValidatorByte::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorByte::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 
 }
 
@@ -695,12 +690,12 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(2, content3);
   capu::SmartPointer<EtchValidator> val = NULL;
 
-  EtchValidatorShort::Get(0, val);
-  Utility::test_bto_write(content0, byte_pos, val);
-  Utility::test_bto_write(content7, byte_neg, val);
+  EtchValidatorShort::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);
+  Utility::test_bto_write(mRuntime, content7, byte_neg, val);
 
-  EtchValidatorShort::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorShort::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 
 }
 
@@ -720,12 +715,12 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(2, content3);
   capu::SmartPointer<EtchValidator> val = NULL;
 
-  EtchValidatorInt::Get(0, val);
-  Utility::test_bto_write(content0, byte_pos, val);
-  Utility::test_bto_write(content7, byte_neg, val);
+  EtchValidatorInt::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);
+  Utility::test_bto_write(mRuntime, content7, byte_neg, val);
 
-  EtchValidatorInt::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorInt::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_long_write) {
@@ -744,12 +739,12 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(2, content3);
   capu::SmartPointer<EtchValidator> val = NULL;
 
-  EtchValidatorLong::Get(0, val);
-  Utility::test_bto_write(content0, byte_pos, val);
-  Utility::test_bto_write(content7, byte_neg, val);
+  EtchValidatorLong::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);
+  Utility::test_bto_write(mRuntime, content7, byte_neg, val);
 
-  EtchValidatorLong::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorLong::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_float_write) {
@@ -765,11 +760,11 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(2, content3);
   capu::SmartPointer<EtchValidator> val = NULL;
 
-  EtchValidatorFloat::Get(0, val);
-  Utility::test_bto_write(content0, byte_pos, val);
+  EtchValidatorFloat::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);
 
-  EtchValidatorFloat::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorFloat::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_double_write) {
@@ -785,19 +780,19 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(2, content3);
   capu::SmartPointer<EtchValidator> val = NULL;
 
-  EtchValidatorDouble::Get(0, val);
-  Utility::test_bto_write(content0, byte_pos, val);
+  EtchValidatorDouble::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);
 
-  EtchValidatorDouble::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorDouble::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_empty_string_write) {
   capu::int8_t byte_pos[] = {3, 1, 1, 2, -110, -127};
   capu::SmartPointer<EtchString> content0 = new EtchString("");
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorString::Get(0, val);
-  Utility::test_bto_write(content0, byte_pos, val);
+  EtchValidatorString::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, content0, byte_pos, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_date_write) {
@@ -814,18 +809,18 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray->set(1, content2);
 
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorObject::Get(1, val);
-  Utility::test_bto_write(carray, byte_array, val);
+  EtchValidatorObject::Get(mRuntime, 1, val);
+  Utility::test_bto_write(mRuntime, carray, byte_array, val);
 
-  EtchValidatorObject::Get(0, val);
-  Utility::test_bto_write(date, byte_pos, val);
+  EtchValidatorObject::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, date, byte_pos, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, null_write) {
   capu::int8_t byte_pos[] = {3, 1, 0, -127};
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorObject::Get(0, val);
-  Utility::test_bto_write(NULL, byte_pos, val);
+  EtchValidatorObject::Get(mRuntime, 0, val);
+  Utility::test_bto_write(mRuntime, NULL, byte_pos, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, multi_dimension_test) {
@@ -842,8 +837,8 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 0), content3);
   carray1->set(Pos(1, 1), content4);
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorBoolean::Get(2, val);
-  Utility::test_bto_write(carray1, byte_pos, val);
+  EtchValidatorBoolean::Get(mRuntime, 2, val);
+  Utility::test_bto_write(mRuntime, carray1, byte_pos, val);
 }
 
 TEST_F(EtchBinaryTaggedDataInputOutputTest, btdo_multi_array_write) {
@@ -860,6 +855,6 @@ TEST_F(EtchBinaryTaggedDataInputOutputTe
   carray1->set(Pos(1, 0), content3);
   carray1->set(Pos(1, 1), content4);
   capu::SmartPointer<EtchValidator> val = NULL;
-  EtchValidatorObject::Get(2, val);
-  Utility::test_bto_write(carray1, byte_array ,val);
+  EtchValidatorObject::Get(mRuntime, 2, val);
+  Utility::test_bto_write(mRuntime, carray1, byte_array ,val);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp Wed Oct 17 06:50:01 2012
@@ -25,16 +25,11 @@ class EtchComboValidatorTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -46,8 +41,8 @@ TEST_F(EtchComboValidatorTest, createTes
   capu::SmartPointer<EtchValidator> ptr;
   capu::SmartPointer<EtchValidator> ptr2;
 
-  EtchValidatorString::Get(0, ptr);
-  EtchValidatorInt::Get(0, ptr2);
+  EtchValidatorString::Get(mRuntime, 0, ptr);
+  EtchValidatorInt::Get(mRuntime, 0, ptr2);
 
   EtchComboValidator *combo = new EtchComboValidator(ptr, ptr2);
   EXPECT_TRUE(combo != NULL);
@@ -87,8 +82,8 @@ TEST_F(EtchComboValidatorTest, validateT
   EtchComboValidator *ptr = NULL;
   capu::SmartPointer<EtchValidator> ptr1;
   capu::SmartPointer<EtchValidator> ptr2;
-  EtchValidatorInt::Get(0, ptr1);
-  EtchValidatorString::Get(0, ptr2);
+  EtchValidatorInt::Get(mRuntime, 0, ptr1);
+  EtchValidatorString::Get(mRuntime, 0, ptr2);
   ptr = new EtchComboValidator(ptr1, ptr2);
 
   EXPECT_FALSE(ptr->validate(byte));
@@ -127,8 +122,8 @@ TEST_F(EtchComboValidatorTest, validateV
   EtchComboValidator *ptr = NULL;
   capu::SmartPointer<EtchValidator> ptr1;
   capu::SmartPointer<EtchValidator> ptr2;
-  EtchValidatorInt::Get(0, ptr1);
-  EtchValidatorString::Get(0, ptr2);
+  EtchValidatorInt::Get(mRuntime, 0, ptr1);
+  EtchValidatorString::Get(mRuntime, 0, ptr2);
   ptr = new EtchComboValidator(ptr1, ptr2);
   //INT TESTS
   EXPECT_TRUE(ptr->validateValue(byte, result) == ETCH_ERROR);
@@ -154,8 +149,8 @@ TEST_F(EtchComboValidatorTest, elementVa
   EtchComboValidator *ptr = NULL;
   capu::SmartPointer<EtchValidator> ptr1;
   capu::SmartPointer<EtchValidator> ptr2;
-  EtchValidatorInt::Get(1, ptr1);
-  EtchValidatorString::Get(1, ptr2);
+  EtchValidatorInt::Get(mRuntime, 1, ptr1);
+  EtchValidatorString::Get(mRuntime, 1, ptr2);
   ptr = new EtchComboValidator(ptr1, ptr2);
   capu::SmartPointer<EtchValidator> element_validator;
   ptr->getElementValidator(element_validator);
@@ -207,4 +202,4 @@ TEST_F(EtchComboValidatorTest, elementVa
   EXPECT_FALSE(element_validator->validate(str));
   EXPECT_TRUE(element_validator->validate(str2));
   delete ptr;
-}
\ No newline at end of file
+}

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDateSerializerTest.cpp Wed Oct 17 06:50:01 2012
@@ -71,16 +71,11 @@ class EtchDateSerializationTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -93,7 +88,7 @@ TEST_F(EtchDateSerializationTest, initTe
   EtchString typeName("type1");
   EtchType* type = new EtchType(10, typeName);
   EtchType* result;
-  EXPECT_TRUE(EtchDateSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchDateSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   c2type->get(EtchDate::TYPE(), &result);
 
   //check the added type to class to type matching
@@ -109,7 +104,7 @@ TEST_F(EtchDateSerializationTest, initTe
   //check validator
   type->getValidator(field, validator);
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorLong::Get(0, val);
+  EtchValidatorLong::Get(mRuntime, 0, val);
   EXPECT_TRUE(validator == val);
   delete type;
   delete c2type;
@@ -125,7 +120,7 @@ TEST_F(EtchDateSerializationTest, export
   capu::SmartPointer<EtchObject> object3;
   EtchStructValue* result;
   //initialize the serializer
-  EXPECT_TRUE(EtchDateSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchDateSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   EtchImportExportHelper* test = type->getImportExportHelper();
   //some test values
   (capu::smartpointer_cast<EtchDate > (object))->set(5);
@@ -166,7 +161,7 @@ TEST_F(EtchDateSerializationTest, import
   capu::SmartPointer<EtchObject> object = new EtchDate();
   EtchStructValue* structValue;
   //initialize the serializer
-  EXPECT_TRUE(EtchDateSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchDateSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   //get the serializer
   EtchImportExportHelper* test = type->getImportExportHelper();
   //some test values

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp Wed Oct 17 06:50:01 2012
@@ -26,16 +26,11 @@ class EtchDefaultValueFactoryTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -56,7 +51,7 @@ TEST_F(EtchDefaultValueFactoryTest, crea
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -86,7 +81,7 @@ TEST_F(EtchDefaultValueFactoryTest, type
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -169,7 +164,7 @@ TEST_F(EtchDefaultValueFactoryTest, expo
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -188,7 +183,7 @@ TEST_F(EtchDefaultValueFactoryTest, expo
   EtchString strRuntime = "_Etch_RuntimeException";
   test->getType(strRuntime, type);
   EXPECT_TRUE(sv->isType(type));
-  EXPECT_EQ(1, sv->count());
+  EXPECT_EQ(1u, sv->count());
   EXPECT_EQ(ETCH_OK, sv->get(EtchDefaultValueFactory::_mf_msg(), &serialized));
   EXPECT_TRUE(serialized->equals(&str));
 
@@ -221,7 +216,7 @@ TEST_F(EtchDefaultValueFactoryTest, impo
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -276,7 +271,7 @@ TEST_F(EtchDefaultValueFactoryTest, lock
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -319,7 +314,7 @@ TEST_F(EtchDefaultValueFactoryTest, mess
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -331,7 +326,7 @@ TEST_F(EtchDefaultValueFactoryTest, mess
   EtchType *mt_foo = new EtchType(str);
 
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorLong::Get(0, val);
+  EtchValidatorLong::Get(mRuntime, 0, val);
   mt_foo->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
 
   EtchMessage *msg = new EtchMessage(mt_foo, test);
@@ -369,7 +364,7 @@ TEST_F(EtchDefaultValueFactoryTest, inRe
   types->get(str, _mt_x);
   str.set("y");
   types->get(str, _mt_y);
-  EtchDefaultValueFactory::Init(types, class2type);
+  EtchDefaultValueFactory::Init(mRuntime, types, class2type);
   types->lock();
   class2type->lock();
 
@@ -381,7 +376,7 @@ TEST_F(EtchDefaultValueFactoryTest, inRe
   EtchType *mt_foo = new EtchType(str);
 
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorLong::Get(0, val);
+  EtchValidatorLong::Get(mRuntime, 0, val);
   mt_foo->putValidator(EtchDefaultValueFactory::_mf__inReplyTo(), val);
 
   EtchMessage *msg = new EtchMessage(mt_foo, test);

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchHashTableSerializerTest.cpp Wed Oct 17 06:50:01 2012
@@ -71,16 +71,11 @@ class EtchHashTableSerializerTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -93,7 +88,7 @@ TEST_F(EtchHashTableSerializerTest, init
   EtchString typeName("type1");
   EtchType* type = new EtchType(10, typeName);
   EtchType* result = 0;
-  EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchHashTableSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   c2type->get(EtchNativeArray<capu::SmartPointer<EtchObject> >::TYPE(), &result);
 
   //check the added type to class to type matching
@@ -108,7 +103,7 @@ TEST_F(EtchHashTableSerializerTest, init
   type->getField(typeName, &field);
   type->getValidator(field, validator);
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorObject::Get(1, val);
+  EtchValidatorObject::Get(mRuntime, 1, val);
   EXPECT_TRUE(validator == val);
   delete type;
   delete c2type;
@@ -125,7 +120,7 @@ TEST_F(EtchHashTableSerializerTest, expo
   capu::SmartPointer<EtchObject> object3;
   EtchStructValue* result;
   //  //initialize the serializer
-  EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchHashTableSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   EtchImportExportHelper* test = type->getImportExportHelper();
   //  //check with invalid values
   EXPECT_TRUE(test->exportValue(NULL, NULL, result) == ETCH_EINVAL);
@@ -176,7 +171,7 @@ TEST_F(EtchHashTableSerializerTest, impo
   capu::SmartPointer<EtchObject> object2_value = new EtchInt32(91);
   EtchStructValue* structValue;
   //initialize the serializer
-  EXPECT_TRUE(EtchHashTableSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchHashTableSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   //get the serializer
   EtchImportExportHelper* test = type->getImportExportHelper();
   //add some test entries

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchListSerializerTest.cpp Wed Oct 17 06:50:01 2012
@@ -72,16 +72,11 @@ class EtchListSerializerTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -94,7 +89,7 @@ TEST_F(EtchListSerializerTest, initTest)
   EtchString typeName("type1");
   EtchType* type = new EtchType(10, typeName);
   EtchType* result;
-  EXPECT_TRUE(EtchListSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchListSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   c2type->get(EtchNativeArray<capu::SmartPointer<EtchObject> >::TYPE(), &result);
 
   //check the added type to class to type matching
@@ -110,7 +105,7 @@ TEST_F(EtchListSerializerTest, initTest)
   type->getValidator(field, validator);
 
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorObject::Get(1, val);
+  EtchValidatorObject::Get(mRuntime, 1, val);
   EXPECT_TRUE(validator == val);
   delete type;
   delete c2type;
@@ -126,7 +121,7 @@ TEST_F(EtchListSerializerTest, exportTes
   capu::SmartPointer<EtchObject> object3;
   EtchStructValue* result;
   //initialize the serializer
-  EXPECT_TRUE(EtchListSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchListSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   EtchImportExportHelper* test = type->getImportExportHelper();
   //check with invalid values
   EXPECT_TRUE(test->exportValue(NULL, NULL, result) == ETCH_EINVAL);
@@ -173,7 +168,7 @@ TEST_F(EtchListSerializerTest, importTes
   capu::SmartPointer<EtchObject> object2 = NULL;
   EtchStructValue* structValue;
   //initialize the serializer
-  EXPECT_TRUE(EtchListSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchListSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   //get the serializer
   EtchImportExportHelper* test = type->getImportExportHelper();
   //check with invalid values

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchRuntimeExceptionSerializerTest.cpp Wed Oct 17 06:50:01 2012
@@ -73,16 +73,11 @@ class EtchRuntimeExceptionSerializationT
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -95,7 +90,7 @@ TEST_F(EtchRuntimeExceptionSerialization
   EtchString typeName("type1");
   EtchType* type = new EtchType(10, typeName);
   EtchType* result;
-  EtchRuntimeExceptionSerializer::Init(type, c2type);
+  EtchRuntimeExceptionSerializer::Init(mRuntime, type, c2type);
   c2type->get(EtchRuntimeException::TYPE(), &result);
 
   //check the added type to class to type matching
@@ -111,7 +106,7 @@ TEST_F(EtchRuntimeExceptionSerialization
   //check validator
   type->getValidator(field, validator);
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorString::Get(0, val);
+  EtchValidatorString::Get(mRuntime, 0, val);
   EXPECT_TRUE(validator == val);
   delete type;
   delete c2type;
@@ -128,7 +123,7 @@ TEST_F(EtchRuntimeExceptionSerialization
   capu::SmartPointer<EtchObject> object3;
   EtchStructValue* result;
   //initialize the serializer
-  EtchRuntimeExceptionSerializer::Init(type, c2type);
+  EtchRuntimeExceptionSerializer::Init(mRuntime, type, c2type);
   EtchImportExportHelper* test = type->getImportExportHelper();
   //check with invalid values
   EXPECT_TRUE(test->exportValue(NULL, NULL, result) == ETCH_EINVAL);
@@ -167,7 +162,7 @@ TEST_F(EtchRuntimeExceptionSerialization
   capu::SmartPointer<EtchObject> object = new EtchRuntimeException(message, ETCH_ERROR);
   EtchStructValue* structValue;
   //initialize the serializer
-  EtchRuntimeExceptionSerializer::Init(type, c2type);
+  EtchRuntimeExceptionSerializer::Init(mRuntime, type, c2type);
   //get the serializer
   EtchImportExportHelper* test = type->getImportExportHelper();
   //export values

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchSetSerializerTest.cpp Wed Oct 17 06:50:01 2012
@@ -71,16 +71,11 @@ class EtchSetSerializerTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -93,7 +88,7 @@ TEST_F(EtchSetSerializerTest, initTest) 
   EtchString typeName("type1");
   EtchType* type = new EtchType(10, typeName);
   EtchType* result;
-  EXPECT_TRUE(EtchSetSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchSetSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   c2type->get(EtchNativeArray<capu::SmartPointer<EtchObject> >::TYPE(), &result);
 
   //check the added type to class to type matching
@@ -108,7 +103,7 @@ TEST_F(EtchSetSerializerTest, initTest) 
   type->getField(typeName, &field);
   type->getValidator(field, validator);
   capu::SmartPointer<EtchValidator> val;
-  EtchValidatorObject::Get(1, val);
+  EtchValidatorObject::Get(mRuntime, 1, val);
   EXPECT_TRUE(validator == val);
   delete type;
   delete c2type;
@@ -124,7 +119,7 @@ TEST_F(EtchSetSerializerTest, exportTest
   capu::SmartPointer<EtchObject> object3;
   EtchStructValue* result;
   //initialize the serializer
-  EXPECT_TRUE(EtchSetSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchSetSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   EtchImportExportHelper* test = type->getImportExportHelper();
   //check with invalid values
   EXPECT_TRUE(test->exportValue(NULL, NULL, result) == ETCH_EINVAL);
@@ -170,7 +165,7 @@ TEST_F(EtchSetSerializerTest, importTest
   capu::SmartPointer<EtchObject> object2;
   EtchStructValue* structValue;
   //initialize the serializer
-  EXPECT_TRUE(EtchSetSerializer::Init(type, c2type) == ETCH_OK);
+  EXPECT_TRUE(EtchSetSerializer::Init(mRuntime, type, c2type) == ETCH_OK);
   //get the serializer
   EtchImportExportHelper* test = type->getImportExportHelper();
   //check with invalid values

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp?rev=1399114&r1=1399113&r2=1399114&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp Wed Oct 17 06:50:01 2012
@@ -161,16 +161,11 @@ class EtchStructValueTest
 protected:
   virtual void SetUp() {
     mRuntime = new EtchRuntime();
-    mRuntime->setLogger(new EtchLogger());
     mRuntime->start();
   }
 
   virtual void TearDown() {
     mRuntime->shutdown();
-    EtchLogger* logger = mRuntime->getLogger();
-    if(logger != NULL) {
-      delete logger;
-    }
     delete mRuntime;
     mRuntime = NULL;
   }
@@ -189,8 +184,8 @@ TEST_F(EtchStructValueTest, createTest) 
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -216,8 +211,8 @@ TEST_F(EtchStructValueTest, getTypeTest)
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -242,8 +237,8 @@ TEST_F(EtchStructValueTest, isType) {
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -278,8 +273,8 @@ TEST_F(EtchStructValueTest, putTest_FULL
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -328,8 +323,8 @@ TEST_F(EtchStructValueTest, putTest_MISS
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -378,8 +373,8 @@ TEST_F(EtchStructValueTest, putTest_NONE
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -422,8 +417,8 @@ TEST_F(EtchStructValueTest, getTest) {
 
   capu::SmartPointer<EtchValidator> v1;
   capu::SmartPointer<EtchValidator> v2;
-  EtchValidatorBoolean::Get(0, v1);
-  EtchValidatorBoolean::Get(0, v2);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v2);
 
   comp->putValidator(field1, v1);
   comp->putValidator(field2, v2);
@@ -462,7 +457,7 @@ TEST_F(EtchStructValueTest, removeTest) 
   EtchType* comp = new EtchType(90, typeName);
 
   capu::SmartPointer<EtchValidator> v1;
-  EtchValidatorBoolean::Get(0, v1);
+  EtchValidatorBoolean::Get(mRuntime, 0, v1);
   comp->putValidator(field1, v1);
 
   EtchStructValue *sv = new EtchStructValue(comp, factory);