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/08/02 17:36:58 UTC

svn commit: r1368546 [1/3] - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ include/serialization/ include/support/ include/transport/ src/main/common/ src/main/serialization/ src/main/support/ src/main/transport/ src/main/util/ src/test...

Author: veithm
Date: Thu Aug  2 15:36:55 2012
New Revision: 1368546

URL: http://svn.apache.org/viewvc?rev=1368546&view=rev
Log:
ETCH-240 Changing Static Initialization

replaced static fields with methods in order to have a deterministic static initialization order

Change-Id: I14dab27ee3ac9f04f9f1ba3eda45a2955d6a84b9

Modified:
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.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/EtchField.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/EtchType.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/support/EtchMonitor.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchFormat.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.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/EtchSession.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h
    incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h
    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchAuthenticationExceptionSerializer.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.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/EtchField.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.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/EtchType.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/support/EtchMonitor.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/support/EtchRemoteBase.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/EtchFormat.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/EtchSession.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpOption.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchTransportFactory.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.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

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchArrayValue.h Thu Aug  2 15:36:55 2012
@@ -40,7 +40,7 @@ public:
   /**
    * TypeId for ArrayValue.
    */
-  static const EtchObjectType TYPE;
+  static const EtchObjectType* TYPE();
 
   /**
    * Constructs the ArrayValue.
@@ -91,7 +91,7 @@ public:
    * @return the number of elements in the array.
    */
   capu::int32_t getIndex();
-  
+
   /**
    * @return the number of elements in the array.
    */

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchInt32.h Thu Aug  2 15:36:55 2012
@@ -52,7 +52,7 @@ public:
   /**
    * Returns int32 value.
    */
-  capu::int32_t get();
+  capu::int32_t get() const;
 
   /**
    * Returns hash code

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h Thu Aug  2 15:36:55 2012
@@ -47,9 +47,9 @@ public:
    */
   virtual ~EtchObject();
 
-/**
-   * Returns object type id of this type.
-   */
+  /**
+  * Returns object type id of this type.
+  */
   const EtchObjectType* GetObjectType() const;
 
   /**

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObjectType.h Thu Aug  2 15:36:55 2012
@@ -78,13 +78,13 @@ public:
   /**
    * TypeIds for native types
    */
-  static const EtchObjectType NATIVE_INT8;
-  static const EtchObjectType NATIVE_INT16;
-  static const EtchObjectType NATIVE_INT32;
-  static const EtchObjectType NATIVE_INT64;
-  static const EtchObjectType NATIVE_DOUBLE;
-  static const EtchObjectType NATIVE_FLOAT;
-  static const EtchObjectType NATIVE_BOOL;
+  static const EtchObjectType& NATIVE_INT8();
+  static const EtchObjectType& NATIVE_INT16();
+  static const EtchObjectType& NATIVE_INT32();
+  static const EtchObjectType& NATIVE_INT64();
+  static const EtchObjectType& NATIVE_DOUBLE();
+  static const EtchObjectType& NATIVE_FLOAT();
+  static const EtchObjectType& NATIVE_BOOL();
 
   /**
    * TypeTraits
@@ -106,7 +106,7 @@ public:
    * @return
    */
   template<class T>
-  static const EtchObjectType * getType() {
+  static const EtchObjectType* getType() {
     return __Wrapper__<T>::getType();
   }
 
@@ -159,7 +159,7 @@ private:
   template <class T>
   struct __Wrapper__ {
 
-    static const EtchObjectType * getType() {
+    static const EtchObjectType* getType() {
       return T::TYPE();
     }
 
@@ -172,7 +172,7 @@ private:
   template <class T>
   struct __Wrapper__<T*> {
 
-    static const EtchObjectType * getType() {
+    static const EtchObjectType* getType() {
       return T::TYPE();
     }
 
@@ -180,7 +180,7 @@ private:
       return EtchObjectType::POINTER;
     }
   };
-  
+
   template <class T>
   struct __Wrapper__<capu::SmartPointer<T> > {
 
@@ -198,8 +198,8 @@ private:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int32_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT32;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT32();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -210,8 +210,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int16_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT16;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT16();
   }
   
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -223,8 +223,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int8_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT8;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT8();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -235,8 +235,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int64_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT64;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT64();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -247,8 +247,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::float_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_FLOAT;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_FLOAT();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -260,8 +260,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::double_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_DOUBLE;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_DOUBLE();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -273,8 +273,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::bool_t> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_BOOL;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_BOOL();
   }
   
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -286,8 +286,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int32_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT32;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT32();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -299,8 +299,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int16_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT16;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT16();
   }
   
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -312,8 +312,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int8_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT8;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT8();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -325,8 +325,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::int64_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT64;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_INT64();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -338,8 +338,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::float_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_FLOAT;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_FLOAT();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -351,8 +351,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::double_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_DOUBLE;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_DOUBLE();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -364,8 +364,8 @@ struct EtchObjectType::__Wrapper__<capu:
 template <>
 struct EtchObjectType::__Wrapper__<capu::bool_t*> {
 
-  static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_BOOL;
+  static const EtchObjectType* getType() {
+    return &EtchObjectType::NATIVE_BOOL();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -378,7 +378,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::int32_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT32;
+    return &EtchObjectType::NATIVE_INT32();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -390,7 +390,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::int16_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT16;
+    return &EtchObjectType::NATIVE_INT16();
   }
   
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -403,7 +403,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::int8_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT8;
+    return &EtchObjectType::NATIVE_INT8();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -415,7 +415,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::int64_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_INT64;
+    return &EtchObjectType::NATIVE_INT64();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -427,7 +427,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::float_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_FLOAT;
+    return &EtchObjectType::NATIVE_FLOAT();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -440,7 +440,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::double_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_DOUBLE;
+    return &EtchObjectType::NATIVE_DOUBLE();
   }
 
   static const EtchObjectTypeTrait getTypeTrait() {
@@ -453,7 +453,7 @@ template <>
 struct EtchObjectType::__Wrapper__<capu::SmartPointer<capu::bool_t> > {
 
   static const EtchObjectType * getType() {
-    return &EtchObjectType::NATIVE_BOOL;
+    return &EtchObjectType::NATIVE_BOOL();
   }
   
   static const EtchObjectTypeTrait getTypeTrait() {

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchAuthenticationExceptionSerializer.h Thu Aug  2 15:36:55 2012
@@ -58,7 +58,7 @@ private:
 
   EtchField mField;
   EtchType* mType;
-  const static EtchString FIELD_NAME;
+  const static EtchString& FIELD_NAME();
 
 };
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedData.h Thu Aug  2 15:36:55 2012
@@ -39,12 +39,16 @@ public:
   /**
    * This is the current version of the protocol.
    */
-  const static capu::int8_t VERSION = 3;
+  const static capu::int8_t& VERSION()
+  {
+    static const capu::int8_t version(3);
+    return version;
+  }
 
   /**
    * sentinel that marks the end of array or struct element
    */
-  static capu::SmartPointer<EtchObject> NONE;
+  static capu::SmartPointer<EtchObject>& NONE();
 
   /**
    * Constructs the BinaryTaggedData.
@@ -79,7 +83,7 @@ public:
 
   /**
    * @param c           typeid
-   * @param result      out buffet 
+   * @param result      out buffet
    */
   status_t getCustomStructType(const EtchObjectType* c, EtchType*& result);
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchBinaryTaggedDataOutput.h Thu Aug  2 15:36:55 2012
@@ -1,91 +1,91 @@
-/* $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __ETCHBINARYTAGGEDDATAOUTPUT_H__
-#define __ETCHBINARYTAGGEDDATAOUTPUT_H__
-
-#include "util/EtchURL.h"
-#include "serialization/EtchTaggedDataOutput.h"
-#include "serialization/EtchBinaryTaggedData.h"
-#include "serialization/EtchValidatorInt.h"
-#include "serialization/EtchValidatorString.h"
-#include "serialization/EtchValidatorNone.h"
-
-class EtchBinaryTaggedDataOutput : public EtchTaggedDataOutput, public EtchBinaryTaggedData {
-public:
-
-  /**
-   * Name of uri parameter which controls whether we write ints or strings
-   * for types and fields.
-   */
-  static const EtchString STRING_TYPE_AND_FIELD;
-
-
-  /**
-   * Constructs the BinaryTaggedDataInput with a null buffer.
-   * 
-   * @param vf the value factory for the service.
-   * @param uri.
-   */
-  EtchBinaryTaggedDataOutput(EtchValueFactory *vf, EtchURL* uri);
-
-  /**
-   * Destructor
-   */
-  virtual ~EtchBinaryTaggedDataOutput();
-
-  //////////////////////////////
-  // TaggedDataOutput methods //
-  //////////////////////////////
-  //overriden method
-  status_t writeMessage(capu::SmartPointer<EtchMessage> msg, capu::SmartPointer<EtchFlexBuffer> buf);
-
-private:
-  capu::SmartPointer<EtchFlexBuffer> mBuffer;
-  EtchLevel mLevel;
-  capu::bool_t mStringTypeAndField;
-  capu::SmartPointer<EtchValidator> mIntValidator;
-  capu::SmartPointer<EtchValidator> mStringValidator;
-  capu::SmartPointer<EtchValidator> mNoneValidator;
-
-  status_t writeStruct(capu::SmartPointer<EtchStructValue> sv);
-  status_t writeArray(EtchArrayValue* av, EtchValidator* v);
-  status_t writeKeysAndValues(capu::SmartPointer<EtchStructValue> sv);
-  status_t writeValues(EtchArrayValue* av, EtchValidator* v);
-
-  /////////////////////////
-  // Main output methods //
-  /////////////////////////
-
-  status_t startMessage(capu::SmartPointer<EtchMessage> msg);
-  status_t endMessage(capu::SmartPointer<EtchMessage> msg);
-  status_t startStruct(capu::SmartPointer<EtchStructValue> _struct);
-  status_t endStruct(capu::SmartPointer<EtchStructValue> _struct);
-  status_t startArray(EtchArrayValue* array);
-  status_t endArray(EtchArrayValue* array);
-  status_t writeType(EtchType* type);
-  status_t writeField(EtchField* field);
-  status_t writeIntValue(capu::int32_t value);
-  status_t writeStringValue(capu::SmartPointer<EtchString> value);
-  status_t writeNoneValue();
-  status_t writeValue(capu::SmartPointer<EtchValidator> v, capu::SmartPointer<EtchObject> value);
-  status_t writeBytes( capu::int8_t* value, capu::int32_t size);
-};
-
-#endif /* ETCHBINARYTAGGEDDATAOUTPUT_H */
-
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __ETCHBINARYTAGGEDDATAOUTPUT_H__
+#define __ETCHBINARYTAGGEDDATAOUTPUT_H__
+
+#include "util/EtchURL.h"
+#include "serialization/EtchTaggedDataOutput.h"
+#include "serialization/EtchBinaryTaggedData.h"
+#include "serialization/EtchValidatorInt.h"
+#include "serialization/EtchValidatorString.h"
+#include "serialization/EtchValidatorNone.h"
+
+class EtchBinaryTaggedDataOutput : public EtchTaggedDataOutput, public EtchBinaryTaggedData {
+public:
+
+  /**
+   * Name of uri parameter which controls whether we write ints or strings
+   * for types and fields.
+   */
+  static const EtchString& STRING_TYPE_AND_FIELD();
+
+
+  /**
+   * Constructs the BinaryTaggedDataInput with a null buffer.
+   *
+   * @param vf the value factory for the service.
+   * @param uri.
+   */
+  EtchBinaryTaggedDataOutput(EtchValueFactory *vf, EtchURL* uri);
+
+  /**
+   * Destructor
+   */
+  virtual ~EtchBinaryTaggedDataOutput();
+
+  //////////////////////////////
+  // TaggedDataOutput methods //
+  //////////////////////////////
+  //overriden method
+  status_t writeMessage(capu::SmartPointer<EtchMessage> msg, capu::SmartPointer<EtchFlexBuffer> buf);
+
+private:
+  capu::SmartPointer<EtchFlexBuffer> mBuffer;
+  EtchLevel mLevel;
+  capu::bool_t mStringTypeAndField;
+  capu::SmartPointer<EtchValidator> mIntValidator;
+  capu::SmartPointer<EtchValidator> mStringValidator;
+  capu::SmartPointer<EtchValidator> mNoneValidator;
+
+  status_t writeStruct(capu::SmartPointer<EtchStructValue> sv);
+  status_t writeArray(EtchArrayValue* av, EtchValidator* v);
+  status_t writeKeysAndValues(capu::SmartPointer<EtchStructValue> sv);
+  status_t writeValues(EtchArrayValue* av, EtchValidator* v);
+
+  /////////////////////////
+  // Main output methods //
+  /////////////////////////
+
+  status_t startMessage(capu::SmartPointer<EtchMessage> msg);
+  status_t endMessage(capu::SmartPointer<EtchMessage> msg);
+  status_t startStruct(capu::SmartPointer<EtchStructValue> _struct);
+  status_t endStruct(capu::SmartPointer<EtchStructValue> _struct);
+  status_t startArray(EtchArrayValue* array);
+  status_t endArray(EtchArrayValue* array);
+  status_t writeType(EtchType* type);
+  status_t writeField(EtchField* field);
+  status_t writeIntValue(capu::int32_t value);
+  status_t writeStringValue(capu::SmartPointer<EtchString> value);
+  status_t writeNoneValue();
+  status_t writeValue(capu::SmartPointer<EtchValidator> v, capu::SmartPointer<EtchObject> value);
+  status_t writeBytes( capu::int8_t* value, capu::int32_t size);
+};
+
+#endif /* ETCHBINARYTAGGEDDATAOUTPUT_H */
+

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDateSerializer.h Thu Aug  2 15:36:55 2012
@@ -62,7 +62,7 @@ private:
 
   EtchField mField;
   EtchType* mType;
-  const static EtchString FIELD_NAME;
+  const static EtchString& FIELD_NAME();
 };
 
 #endif /* ETCHDATESERIALIZER_H */

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchDefaultValueFactory.h Thu Aug  2 15:36:55 2012
@@ -39,27 +39,27 @@
 class EtchDefaultValueFactory : public EtchValueFactory {
 private:
 
-  static const EtchString ETCH_RUNTIME_EXCEPTION_TYPE_NAME;
+  static const EtchString& ETCH_RUNTIME_EXCEPTION_TYPE_NAME();
 
-  static const EtchString ETCH_LIST_TYPE_NAME;
+  static const EtchString& ETCH_LIST_TYPE_NAME();
 
-  static const EtchString ETCH_MAP_TYPE_NAME;
+  static const EtchString& ETCH_MAP_TYPE_NAME();
 
-  static const EtchString ETCH_SET_TYPE_NAME;
+  static const EtchString& ETCH_SET_TYPE_NAME();
 
-  static const EtchString ETCH_DATETIME_TYPE_NAME;
+  static const EtchString& ETCH_DATETIME_TYPE_NAME();
 
-  static const EtchString ETCH_AUTH_EXCEPTION_TYPE_NAME;
+  static const EtchString& ETCH_AUTH_EXCEPTION_TYPE_NAME();
 
-  static const EtchString ETCH_EXCEPTION_MESSAGE_NAME;
+  static const EtchString& ETCH_EXCEPTION_MESSAGE_NAME();
 
-  static const EtchString MSG_FIELD_NAME;
+  static const EtchString& MSG_FIELD_NAME();
 
-  static const EtchString MESSAGE_ID_FIELD_NAME;
+  static const EtchString& MESSAGE_ID_FIELD_NAME();
 
-  static const EtchString IN_REPLY_TO_FIELD_NAME;
+  static const EtchString& IN_REPLY_TO_FIELD_NAME();
 
-  static const EtchString RESULT_FIELD_NAME;
+  static const EtchString& RESULT_FIELD_NAME();
 
   static capu::Mutex Mutex;
 
@@ -103,22 +103,22 @@ public:
   /**
    * The msg field of the standard unchecked exception.
    */
-  static const EtchField _mf_msg;
+  static const EtchField& _mf_msg();
 
   /**
    *  The well-known _messageId field.
    */
-  static const EtchField _mf__messageId;
+  static const EtchField& _mf__messageId();
 
   /**
    * The well-known _inReplyTo field.
    */
-  static const EtchField _mf__inReplyTo;
+  static const EtchField& _mf__inReplyTo();
 
   /**
    * The well-known result field.
    */
-  static const EtchField _mf_result;
+  static const EtchField& _mf_result();
 
   ///////////////////////
   // ValueFactory impl //

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchField.h Thu Aug  2 15:36:55 2012
@@ -65,12 +65,12 @@ public:
   /**
    * @return id of the field
    */
-  capu::uint32_t getId();
+  capu::uint32_t getId() const;
 
   /**
    * @return name of the field
    */
-  EtchString getName();
+  EtchString getName() const;
 
 private:
   EtchInt32 mId;

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchHashTableSerializer.h Thu Aug  2 15:36:55 2012
@@ -63,7 +63,7 @@ private:
 
   EtchField mField;
   EtchType* mType;
-  const static EtchString FIELD_NAME;
+  const static EtchString& FIELD_NAME();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchListSerializer.h Thu Aug  2 15:36:55 2012
@@ -62,7 +62,7 @@ private:
 
   EtchType* mType;
   EtchField mField;
-  const static EtchString FIELD_NAME;
+  const static EtchString& FIELD_NAME();
 };
 
 #endif /* ETCHLISTSERIALIZER_H */

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchRuntimeExceptionSerializer.h Thu Aug  2 15:36:55 2012
@@ -63,7 +63,7 @@ private:
 
   EtchType* mType;
   EtchField mField;
-  const static EtchString FIELD_NAME;
+  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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchSetSerializer.h Thu Aug  2 15:36:55 2012
@@ -58,7 +58,7 @@ private:
 
   EtchField mField;
   EtchType* mType;
-  const static EtchString FIELD_NAME;
+  const static EtchString& FIELD_NAME();
 };
 
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h Thu Aug  2 15:36:55 2012
@@ -80,7 +80,7 @@ public:
    *         ETCH_ERROR  if there is an error
    *         ETCH_OK otherwise
    */
-  status_t addField(EtchField &field);
+  status_t addField(const EtchField &field);
 
   /**
    * Translates a field id into the appropriate Field object.
@@ -165,7 +165,7 @@ public:
    * @return ETCH_OK if remove is successful
    *         ETCH_EINVAL if value is NULL or locked
    */
-  status_t putValidator(EtchField key, capu::SmartPointer<EtchValidator> validator);
+  status_t putValidator(const EtchField key, capu::SmartPointer<EtchValidator> validator);
 
   /**
    * Removes the validator chain for this key.

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorBoolean.h Thu Aug  2 15:36:55 2012
@@ -56,7 +56,7 @@ protected:
   EtchValidatorBoolean(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidators[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 };
 
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorByte.h Thu Aug  2 15:36:55 2012
@@ -61,7 +61,7 @@ protected:
   EtchValidatorByte(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorCustom.h Thu Aug  2 15:36:55 2012
@@ -116,7 +116,8 @@ protected:
   EtchValidatorCustom(const EtchObjectType *type, capu::uint32_t ndim, capu::bool_t sub);
 
 private:
-  static EtchHashTable<EtchValidatorCustomKey, capu::SmartPointer<EtchValidator> > mValidators;
+
+  static EtchHashTable<EtchValidatorCustomKey, capu::SmartPointer<EtchValidator> >& Validators();
 };
 
 #endif /* ETCHVALIDATORCUSTOM_H */

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorDouble.h Thu Aug  2 15:36:55 2012
@@ -59,7 +59,7 @@ protected:
   EtchValidatorDouble(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorFloat.h Thu Aug  2 15:36:55 2012
@@ -58,7 +58,7 @@ protected:
   EtchValidatorFloat(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorInt.h Thu Aug  2 15:36:55 2012
@@ -62,7 +62,7 @@ protected:
   EtchValidatorInt(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorLong.h Thu Aug  2 15:36:55 2012
@@ -62,7 +62,7 @@ protected:
   EtchValidatorLong(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorNone.h Thu Aug  2 15:36:55 2012
@@ -46,13 +46,13 @@ public:
    */
   static status_t Get(capu::SmartPointer<EtchValidator> &val);
 
-  static const EtchObjectType TYPE;
+  static const EtchObjectType* TYPE();
 
 protected:
   EtchValidatorNone();
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator;
+  static capu::SmartPointer<EtchValidator>& Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorObject.h Thu Aug  2 15:36:55 2012
@@ -56,7 +56,7 @@ protected:
   EtchValidatorObject(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorRuntimeException.h Thu Aug  2 15:36:55 2012
@@ -55,7 +55,7 @@ protected:
   EtchValidatorRuntimeException();
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator;
+  static capu::SmartPointer<EtchValidator>& Validators();
 };
 
 #endif

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorShort.h Thu Aug  2 15:36:55 2012
@@ -64,7 +64,7 @@ protected:
 
 private:
 
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidatorString.h Thu Aug  2 15:36:55 2012
@@ -57,7 +57,7 @@ protected:
   EtchValidatorString(capu::uint32_t ndim);
 
 private:
-  static capu::SmartPointer<EtchValidator> mValidator[MAX_CACHED];
+  static capu::SmartPointer<EtchValidator>* Validators();
 
 };
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchMonitor.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchMonitor.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchMonitor.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchMonitor.h Thu Aug  2 15:36:55 2012
@@ -70,7 +70,7 @@ public:
    * @param the old value
    * @return ETCH_OK if it was successfully
    */
-  status_t waitUntilEqAndSet(EtchString& desiredValue, EtchString& newValue, EtchString &old);
+  status_t waitUntilEqAndSet(const EtchString& desiredValue, EtchString& newValue, EtchString &old);
 
   /**
    * Waits until value equals the desired value and
@@ -83,7 +83,7 @@ public:
    * @param the old value
    * @return ETCH_OK if it was successfully
    */
-  status_t waitUntilEqAndSet(EtchString& desiredValue, capu::int32_t maxDelay, EtchString& newValue, EtchString &old);
+  status_t waitUntilEqAndSet(const EtchString& desiredValue, capu::int32_t maxDelay, EtchString& newValue, EtchString &old);
 
   /**
    * Waits until value equals the desired value. Will wait forever.
@@ -91,7 +91,7 @@ public:
    * @param desiredValue the value we want.
    * @return ETCH_OK if it was successfully
    */
-  status_t waitUntilEq(EtchString& desiredValue);
+  status_t waitUntilEq(const EtchString& desiredValue);
 
   /**
    * Waits until value equals the desired value.
@@ -102,7 +102,8 @@ public:
    * If 0 is specified, we will wait forever.
    * @return ETCH_OK if it was successfully
    */
-  status_t waitUntilEq(EtchString& desiredValue, capu::int32_t maxDelay);
+
+  status_t waitUntilEq(const EtchString& desiredValue, capu::int32_t maxDelay);
 
   /**
    * Waits until value does not equal the undesired value and then
@@ -113,8 +114,8 @@ public:
    * @param the old value
    * @return ETCH_OK if it was successfully
    */
-  status_t waitUntilNotEqAndSet(EtchString& undesiredValue, EtchString& newValue, EtchString& old);
 
+  status_t waitUntilNotEqAndSet(const EtchString& undesiredValue, EtchString& newValue, EtchString& old);
   /**
    * Waits until value does not equal the undesired value and then
    * sets the value.
@@ -126,7 +127,8 @@ public:
    * @param the old value
    * @return ETCH_OK if it was successfully, ETCH_TIMEOUT if a timeout occurs
    */
-  status_t waitUntilNotEqAndSet(EtchString& undesiredValue, capu::int32_t maxDelay, EtchString& newValue, EtchString& old);
+
+  status_t waitUntilNotEqAndSet(const EtchString& undesiredValue, capu::int32_t maxDelay, EtchString& newValue, EtchString& old);
 
   /**
    * Waits until value does not equal the undesired value. Will
@@ -137,7 +139,7 @@ public:
    * @return ETCH_OK if it was successfully
    */
 
-  status_t waitUntilNotEq(EtchString& undesiredValue, EtchString& current);
+  status_t waitUntilNotEq(const EtchString& undesiredValue, EtchString& current);
 
   /**
    * Waits until value does not equal the undesired value.
@@ -148,7 +150,7 @@ public:
    * @param the current value.
    * @return ETCH_OK if it was successfully, ETCH_TIMEOUT if a timeout occurs
    */
-  status_t waitUntilNotEq(EtchString& undesiredValue, capu::uint32_t maxDelay, EtchString& current);
+  status_t waitUntilNotEq(const EtchString& undesiredValue, capu::uint32_t maxDelay, EtchString& current);
 
 private:
   /////////////////////
@@ -158,12 +160,12 @@ private:
   /**
    * waitUntilEq internal
    */
-  status_t waitUntilEqIntern(EtchString& desiredValue, capu::int32_t maxDelay);
+  status_t waitUntilEqIntern(const EtchString& desiredValue, capu::int32_t maxDelay);
 
   /**
    * waitUntilNotEq internal
    */
-  status_t waitUntilNotEqIntern(EtchString& undesiredValue, capu::uint32_t maxDelay, EtchString& current);
+  status_t waitUntilNotEqIntern(const EtchString& undesiredValue, capu::uint32_t maxDelay, EtchString& current);
 
   /**
    * Compares the specified values.
@@ -172,7 +174,7 @@ private:
    * @param v2 another value to compare, which may be null.
    * @return true if the values are equal, false otherwise.
    */
-  capu::bool_t eq(EtchString& v1, EtchString& v2);
+  capu::bool_t eq(const EtchString& v1, const EtchString& v2);
 
   EtchString mDescription;
   EtchString mValue;

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchTransportHelper.h Thu Aug  2 15:36:55 2012
@@ -38,16 +38,16 @@ public:
   virtual ~EtchTransportHelper();
 
   /** The Pool to use to execute queued async receiver messages. */
-  static EtchString QUEUED_POOL;
+  const static EtchString& QUEUED_POOL();
 
   /** The Pool to use to execute free async receiver messages. */
-  static EtchString FREE_POOL;
+  const static EtchString& FREE_POOL();
 
   /** Binary transport format */
-  static EtchString BINARY;
+  const static EtchString& BINARY();
 
   /** Xml transport format */
-  static EtchString XML;
+  const static EtchString& XML();
 
   ///////////////
   // UTILITIES //
@@ -61,11 +61,15 @@ public:
    * @param copy of resources initialized with default values for standard
    * items.
    * @return an error if there is a problem
+   *         ETCH_OK otherwise
    */
   static status_t initResources( EtchResources* resources, EtchResources*& result );
-  
+
   /**
-   * Dealloc resources 
+   * Destroyes the given standard resources
+   * @param resources the resources which should be destroyed
+   * @return an error if there is a problem
+   *         ETCH_OK otherwise
    */
   static status_t destroyResources(EtchResources* resources);
 };

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchConnection.h Thu Aug  2 15:36:55 2012
@@ -142,27 +142,27 @@ capu::Mutex EtchConnection<S>::mMutexCon
 
 template <class S>
 EtchConnection<S>::EtchConnection()
-: mStatus(EtchString("status"), (EtchString&) EtchSession::DOWN) {
+: mStatus(EtchString("status"), EtchSession::DOWN()) {
 }
 
 template <class S>
 status_t EtchConnection<S>::waitUp(capu::int32_t maxDelay) {
-  return mStatus.waitUntilEq((EtchString&) EtchSession::UP, maxDelay);
+  return mStatus.waitUntilEq(EtchSession::UP(), maxDelay);
 }
 
 template <class S>
 status_t EtchConnection<S>::waitDown(capu::int32_t maxDelay) {
-  return mStatus.waitUntilEq((EtchString&) EtchSession::DOWN, maxDelay);
+  return mStatus.waitUntilEq(EtchSession::DOWN(), maxDelay);
 }
 
 template <class S>
 status_t EtchConnection<S>::fireUp() {
   EtchString tmp;
-  mStatus.set((EtchString &) EtchSession::UP, tmp);
+  mStatus.set(EtchSession::UP(), tmp);
 
   if (mSession != NULL) {
     //TODO: run this in seperate thread
-    mSession->sessionNotify(new EtchString(EtchSession::UP));
+    mSession->sessionNotify(new EtchString(EtchSession::UP()));
   }
   return ETCH_ERROR;
 }
@@ -170,11 +170,11 @@ status_t EtchConnection<S>::fireUp() {
 template <class S>
 status_t EtchConnection<S>::fireDown() {
   EtchString tmp;
-  mStatus.set((EtchString &) EtchSession::DOWN, tmp);
+  mStatus.set((EtchString &) EtchSession::DOWN(), tmp);
 
   if (mSession != NULL) {
     //TODO: run this in seperate thread
-    return mSession->sessionNotify(new EtchString(EtchSession::DOWN));
+    return mSession->sessionNotify(new EtchString(EtchSession::DOWN()));
   }
   return ETCH_ERROR;
 }

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchDefaultDeliveryService.h Thu Aug  2 15:36:55 2012
@@ -41,7 +41,7 @@ public:
   /**
    * Parameter to Globally Disable Timeout.
    */
-  static const EtchString DISABLE_TIMEOUT;
+  static const EtchString& DISABLE_TIMEOUT();
 
   /**
    * Constructor

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchFormat.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchFormat.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchFormat.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchFormat.h Thu Aug  2 15:36:55 2012
@@ -1,31 +1,31 @@
-/* $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __ETCHFORMAT_H__
-#define __ETCHFORMAT_H__
-#include "common/EtchString.h"
-
-class EtchFormat
-{
-public:
-  const static EtchString BINARY;
-  const static EtchString XML;
-};
-
-#endif	/* ETCHFORMAT_H */
-
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __ETCHFORMAT_H__
+#define __ETCHFORMAT_H__
+#include "common/EtchString.h"
+
+class EtchFormat
+{
+public:
+  const static EtchString& BINARY();
+  const static EtchString& XML();
+};
+
+#endif	/* ETCHFORMAT_H */
+

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessage.h Thu Aug  2 15:36:55 2012
@@ -62,7 +62,7 @@ public:
   status_t createReplyMessage(EtchType* rType, capu::SmartPointer<EtchMessage> &message);
 
   /**
-   * 
+   *
    * @param a reply message.
    * @return ETCH_OK if reply is created
    *         ETCH_ERROR otherwise
@@ -101,5 +101,7 @@ private:
   EtchValueFactory* mVf;
 };
 
+typedef capu::SmartPointer<EtchMessage> EtchMessagePtr;
+
 #endif /* ETCHMESSAGE_H */
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchMessagizer.h Thu Aug  2 15:36:55 2012
@@ -42,10 +42,10 @@ public:
   /**
    * Name of format name in uri or resources. The value is "Messagizer.format".
    * The result of looking up this name should be a String.
-   * 
+   *
    * @see #Messagizer(TransportPacket, String, Resources)
    */
-  static const EtchString FORMAT;
+  const static EtchString& FORMAT();
 
   /**
    * Constructs the Messagizer with null handler and tagged data format

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchPacketizer.h Thu Aug  2 15:36:55 2012
@@ -43,13 +43,13 @@ public:
   /**
    * The default maximum packet size that will be accepted, 16376 bytes.
    */
-  const static capu::int32_t DEFAULT_MAX_PKT_SIZE;
+  const static capu::int32_t& DEFAULT_MAX_PKT_SIZE();
 
-  const static EtchString MAX_PKT_SIZE_TERM;
+  const static EtchString& MAX_PKT_SIZE_TERM();
 
-  const static capu::int32_t SIG;
+  const static capu::int32_t& SIG();
 
-  const static capu::uint32_t HEADER_SIZE;
+  const static capu::uint32_t& HEADER_SIZE();
 
   /**
    * Constructs the Packetizer with null packet handler and uri specified

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchSession.h Thu Aug  2 15:36:55 2012
@@ -1,96 +1,96 @@
-/* $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __ETCHSESSION_H__
-#define __ETCHSESSION_H__
-
-#include "capu/util/SmartPointer.h"
-#include "common/EtchObject.h"
-#include "common/EtchString.h"
-#include "common/EtchError.h"
-
-class EtchSession {
-public:
-
-  virtual ~EtchSession() {
-  }
-
-  /**
-   * Gets a configuration or operational value from the handler. The
-   * request is passed up the chain of sessions until some session
-   * recognizes the query, whereupon it returns the requested value.
-   *
-   * @param query an object representing a query, which could be as
-   * simple as a string, integer, or enum, or more complex such as
-   * a class with instance variables for query terms.
-   *
-   * @param result contains the result of given query
-   * @return ETCH_OK if requested operational value is successfully get
-   *         ETCH_ERROR otherwise
-   */
-  virtual status_t sessionQuery(capu::SmartPointer<EtchObject> query, capu::SmartPointer<EtchObject> &result) = 0;
-
-  /**
-   * Sets a configuration or operational value in the session. The
-   * request is passed up the chain of sessions until some session
-   * recognizes the control, whereupon it stores the specified value
-   * and returns.
-   *
-   * @param control an object representing a control, which could be as
-   * simple as a string, integer, or enum, or more complex such as
-   * a class with instance variables for control terms.
-   *
-   * @param value the value to set.
-   * @return ETCH_OK if requested operational value is successfully set
-   *         ETCH_ERROR otherwise
-   */
-  virtual status_t sessionControl(capu::SmartPointer<EtchObject> control, capu::SmartPointer<EtchObject> value) = 0;
-
-  /**
-   * Notifies the chain of sessions of the specified event. Unlike query
-   * and control operations above, events are always passed up to the
-   * top to allow all sessions to notice them.
-   *
-   * @param event a class which represents the event, possibly with
-   * parameters. The simplest event could be a string, integer,
-   * or enum, but any class instance will do (as long as some session
-   * in the chain expects it).
-   * @return ETCH_OK if event is notified successfully
-   *         ETCH_ERROR otherwise
-   *
-   */
-  virtual status_t sessionNotify(capu::SmartPointer<EtchObject> event) = 0;
-
-  ///////////////////////
-  // Well-known events //
-  ///////////////////////
-
-  /**
-   * Session event reporting the transport is up.
-   */
-  const static EtchString UP;
-
-  /**
-   * Session event reporting the transport is down.
-   */
-  const static EtchString DOWN;
-
-};
-
-#endif /* ETCHSESSION_H */
-
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __ETCHSESSION_H__
+#define __ETCHSESSION_H__
+
+#include "capu/util/SmartPointer.h"
+#include "common/EtchObject.h"
+#include "common/EtchString.h"
+#include "common/EtchError.h"
+
+class EtchSession {
+public:
+
+  virtual ~EtchSession() {
+  }
+
+  /**
+   * Gets a configuration or operational value from the handler. The
+   * request is passed up the chain of sessions until some session
+   * recognizes the query, whereupon it returns the requested value.
+   *
+   * @param query an object representing a query, which could be as
+   * simple as a string, integer, or enum, or more complex such as
+   * a class with instance variables for query terms.
+   *
+   * @param result contains the result of given query
+   * @return ETCH_OK if requested operational value is successfully get
+   *         ETCH_ERROR otherwise
+   */
+  virtual status_t sessionQuery(capu::SmartPointer<EtchObject> query, capu::SmartPointer<EtchObject> &result) = 0;
+
+  /**
+   * Sets a configuration or operational value in the session. The
+   * request is passed up the chain of sessions until some session
+   * recognizes the control, whereupon it stores the specified value
+   * and returns.
+   *
+   * @param control an object representing a control, which could be as
+   * simple as a string, integer, or enum, or more complex such as
+   * a class with instance variables for control terms.
+   *
+   * @param value the value to set.
+   * @return ETCH_OK if requested operational value is successfully set
+   *         ETCH_ERROR otherwise
+   */
+  virtual status_t sessionControl(capu::SmartPointer<EtchObject> control, capu::SmartPointer<EtchObject> value) = 0;
+
+  /**
+   * Notifies the chain of sessions of the specified event. Unlike query
+   * and control operations above, events are always passed up to the
+   * top to allow all sessions to notice them.
+   *
+   * @param event a class which represents the event, possibly with
+   * parameters. The simplest event could be a string, integer,
+   * or enum, but any class instance will do (as long as some session
+   * in the chain expects it).
+   * @return ETCH_OK if event is notified successfully
+   *         ETCH_ERROR otherwise
+   *
+   */
+  virtual status_t sessionNotify(capu::SmartPointer<EtchObject> event) = 0;
+
+  ///////////////////////
+  // Well-known events //
+  ///////////////////////
+
+  /**
+   * Session event reporting the transport is up.
+   */
+  const static EtchString& UP();
+
+  /**
+   * Session event reporting the transport is down.
+   */
+  const static EtchString& DOWN();
+
+};
+
+#endif /* ETCHSESSION_H */
+

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Thu Aug  2 15:36:55 2012
@@ -112,12 +112,12 @@ public:
    * is "TcpListener.backlog". The backlog must be >= 0 and somewhat
    * reasonable. The value 0 specifies the system default, the same as if you
    * leave the term off altogether.
-   * 
+   *
    * Example: tcp://host:port?TcpListener.backlog=250
-   * 
+   *
    * @see #TcpListener(String, Resources)
    */
-  const static EtchString BACKLOG;
+  const static EtchString& BACKLOG();
 };
 
 #endif /* ETCHTCPLISTENER_H */

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpOption.h Thu Aug  2 15:36:55 2012
@@ -34,7 +34,7 @@ public:
    * string is "TcpTransport.bufferSize". The value is an integer between 0
    * and 65536. The default is 0, which means no output buffering.
    */
-  const static EtchString BUFFER_SIZE;
+  const static EtchString& BUFFER_SIZE();
 
   /**
    * Term on the uri which specifies the keep alive flag. The term string is
@@ -42,7 +42,7 @@ public:
    * "false". Here keep alive refers to TCP specified keep alive, which is not
    * the same as any application level keep alive.
    */
-  const static EtchString KEEP_ALIVE;
+  const static EtchString& KEEP_ALIVE();
 
   /**
    * Term on the uri which specifies the linger on close time in seconds. The
@@ -57,7 +57,7 @@ public:
    * close if there is buffered data. A forceful close is send RST, while a
    * graceful close means send FIN and wait for FINACK.)
    */
-  const static EtchString LINGER_TIME;
+  const static EtchString& LINGER_TIME();
 
   /**
    * Term on the uri which specifies the no delay flag. The term string is
@@ -67,7 +67,7 @@ public:
    * to allow for more efficient transmission by combining packets (see
    * Nagle's Algorithm).
    */
-  const static EtchString NO_DELAY;
+  const static EtchString& NO_DELAY();
 
   /**
    * Term on the uri which specifies the reconnect delay in milliseconds. The
@@ -75,7 +75,7 @@ public:
    * 0. The default is 0. The value 0 means no automatic reconnection is
    * desired.
    */
-  const static EtchString RECONNECT_DELAY;
+  const static EtchString& RECONNECT_DELAY();
 
 private:
 

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=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h Thu Aug  2 15:36:55 2012
@@ -23,7 +23,6 @@
 #include "common/EtchString.h"
 #include "common/EtchConfig.h"
 #include "support/EtchServerFactory.h"
-#include "util/EtchResources.h"
 #include "transport/EtchTransportMessage.h"
 #include "transport/EtchTransportData.h"
 #include "transport/EtchTcpConnection.h"
@@ -33,6 +32,7 @@
 #include "transport/EtchTcpListener.h"
 #include "transport/EtchMessagizer.h"
 #include "transport/EtchTransportFactory.h"
+#include "util/EtchResources.h"
 
 class EtchTcpTransportFactory
  : public EtchTransportFactory {
@@ -67,7 +67,7 @@ public:
   status_t newListener(EtchString uri, EtchResources* resources, EtchTransport<EtchServerFactory>*& result);
 
 private:
-  static const EtchString SOCKET;
+  static const EtchString& SOCKET();
   const capu::bool_t mIsSecure;
   EtchRuntime* mRuntime;
 
@@ -141,6 +141,7 @@ private:
     EtchServerFactory* mSession;
     EtchRuntime* mRuntime;
     capu::bool_t mIsSecure;
+
   };
 
 };

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransport.h Thu Aug  2 15:36:55 2012
@@ -96,7 +96,7 @@ public:
   /**
    * Name of value factory in resources.
    */
-  const static EtchString VALUE_FACTORY;
+  const static EtchString& VALUE_FACTORY();
 
   ///////////////////////////////////////////////
   // Well-known queries, controls, and events. //
@@ -106,28 +106,28 @@ public:
    * Transport control which starts the transport stack. The argument
    * should be null.
    */
-  const static EtchString START;
+  const static EtchString& START();
 
   /**
    * Transport control which starts the transport stack and waits
    * for it to come up. The argument should be the integer number of
    * milliseconds to wait before giving up.
    */
-  const static EtchString START_AND_WAIT_UP;
+  const static EtchString& START_AND_WAIT_UP();
 
   /**
    * Transport control which stops the transport stack. The argument
    * should be null, or a Boolean reset (true for instant close,
    * false for a nicer, gentler close).
    */
-  const static EtchString STOP;
+  const static EtchString& STOP();
 
   /**
    * Transport control which stops the transport stack and waits
    * for it to go down. The argument should be the integer number of
    * milliseconds to wait before giving up.
    */
-  const static EtchString STOP_AND_WAIT_DOWN;
+  const static EtchString& STOP_AND_WAIT_DOWN();
 
   /**
    * Transport control which resets the transport stack (e.g., closes the
@@ -135,13 +135,13 @@ public:
    * that. Only meaningful for connection oriented transports. Others types
    * will ignore this.
    */
-  static const EtchString RESET;
+  static const EtchString& RESET();
 
   /**
    * Transport query which asks is this a listener initiated connection or
    * is this a client initiated connection.
    */
-  static const EtchString IS_SERVER;
+  static const EtchString& IS_SERVER();
 };
 
 /**
@@ -199,24 +199,45 @@ public:
 };
 
 template <class S>
-const EtchString EtchTransport<S>::VALUE_FACTORY("Transport.valueFactory");
+const EtchString& EtchTransport<S>::VALUE_FACTORY() {
+  static const EtchString vf("Transport.valueFactory");
+  return vf;
+}
 
 template <class S>
-const EtchString EtchTransport<S>::IS_SERVER("IS_SERVER");
+const EtchString& EtchTransport<S>::IS_SERVER() {
+  static const EtchString isServer("IS_SERVER");
+  return isServer;
+}
 
 template <class S>
-const EtchString EtchTransport<S>::RESET("RESET");
+const EtchString& EtchTransport<S>::RESET() {
+  static const EtchString cmd("RESET");
+  return cmd;
+}
 
 template <class S>
-const EtchString EtchTransport<S>::STOP_AND_WAIT_DOWN("STOP_AND_WAIT_DOWN");
+const EtchString& EtchTransport<S>::STOP_AND_WAIT_DOWN() {
+  static const EtchString cmd("STOP_AND_WAIT_DOWN");
+  return cmd;
+}
 
 template <class S>
-const EtchString EtchTransport<S>::STOP("STOP");
+const EtchString& EtchTransport<S>::STOP() {
+  static const EtchString cmd("STOP");
+  return cmd;
+}
 
 template <class S>
-const EtchString EtchTransport<S>::START("START");
+const EtchString& EtchTransport<S>::START() {
+  static const EtchString cmd("START");
+  return cmd;
+}
 
 template <class S>
-const EtchString EtchTransport<S>::START_AND_WAIT_UP("START_AND_WAIT_UP");
+const EtchString& EtchTransport<S>::START_AND_WAIT_UP() {
+  static const EtchString cmd("START_AND_WAIT_UP");
+  return cmd;
+}
 
 #endif

Modified: incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/transport/EtchTransportFactory.h Thu Aug  2 15:36:55 2012
@@ -40,7 +40,7 @@ public:
    * process messages as they move up and down the transport stack. Filter
    * names are separated by one or more of these characters: ",:;| \t\r\n".
    */
-  const static EtchString FILTER;
+  const static EtchString& FILTER();
 
   /**
    * Constructs a new Transport stack topped by a TransportMessage

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchArrayValue.cpp Thu Aug  2 15:36:55 2012
@@ -33,15 +33,18 @@
 #include "common/EtchHashTable.h"
 #include "common/EtchHashSet.h"
 
-const EtchObjectType EtchArrayValue::TYPE(EOTID_ARRAY_VALUE, NULL);
+const EtchObjectType* EtchArrayValue::TYPE() {
+  static const EtchObjectType TYPE(EOTID_ARRAY_VALUE, NULL);
+  return &TYPE;
+}
 
 EtchArrayValue::EtchArrayValue(capu::SmartPointer<EtchNativeArrayBase> array, capu::int32_t size, capu::int8_t typeCode, EtchType* customStructType, capu::int32_t dim)
-: EtchObject(&EtchArrayValue::TYPE), mArray(array), mTypeCode(typeCode),
+: EtchObject(EtchArrayValue::TYPE()), mArray(array), mTypeCode(typeCode),
 mCustomStructType(customStructType), mDim(dim), mAddIndex(size), mSize(size) {
 }
 
 EtchArrayValue::EtchArrayValue(capu::SmartPointer<EtchNativeArrayBase> array, capu::int32_t size)
-: EtchObject(&EtchArrayValue::TYPE), mArray(array), mTypeCode(0),
+: EtchObject(EtchArrayValue::TYPE()), mArray(array), mTypeCode(0),
 mCustomStructType(NULL), mDim(1), mAddIndex(size), mSize(size) {
 }
 
@@ -81,14 +84,14 @@ status_t EtchArrayValue::get(capu::uint3
   if ((index >= getSize()) || (mArray.get() == NULL)) {
     return ETCH_EINVAL;
   }
-  return mArray->getBase(index,result);
+  return mArray->getBase(index, result);
 }
 
 status_t EtchArrayValue::add(capu::SmartPointer<EtchObject> value) {
   if (value.get() == NULL) {
     return ETCH_EINVAL;
   }
-  
+
   //check if we have to resize the array
   capu::int32_t n = mSize;
   if (mAddIndex >= n) {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchInt32.cpp Thu Aug  2 15:36:55 2012
@@ -37,7 +37,7 @@ void EtchInt32::set(capu::int32_t value)
   mValue = value;
 }
 
-capu::int32_t EtchInt32::get(){
+capu::int32_t EtchInt32::get() const{
   return mValue;
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/common/EtchObjectType.cpp Thu Aug  2 15:36:55 2012
@@ -20,14 +20,35 @@
 #include "common/EtchObjectType.h"
 #include "common/EtchObject.h"
 
-// TODO change to correct EOTID
-const EtchObjectType EtchObjectType::NATIVE_INT8(EOTID_BYTE, NULL);
-const EtchObjectType EtchObjectType::NATIVE_INT16(EOTID_SHORT, NULL);
-const EtchObjectType EtchObjectType::NATIVE_INT32(EOTID_INT32, NULL);
-const EtchObjectType EtchObjectType::NATIVE_INT64(EOTID_LONG, NULL);
-const EtchObjectType EtchObjectType::NATIVE_DOUBLE(EOTID_DOUBLE, NULL);
-const EtchObjectType EtchObjectType::NATIVE_FLOAT(EOTID_FLOAT, NULL);
-const EtchObjectType EtchObjectType::NATIVE_BOOL(EOTID_BOOL, NULL);
+
+const EtchObjectType& EtchObjectType::NATIVE_INT8() {
+  static const EtchObjectType type(EOTID_BYTE, NULL);
+  return type;
+}
+const EtchObjectType& EtchObjectType::NATIVE_INT16() {
+  static const EtchObjectType type(EOTID_SHORT, NULL);
+  return type;
+}
+const EtchObjectType& EtchObjectType::NATIVE_INT32() {
+  static const EtchObjectType type(EOTID_INT32, NULL);
+  return type;
+}
+const EtchObjectType& EtchObjectType::NATIVE_INT64() {
+  static const EtchObjectType type(EOTID_LONG, NULL);
+  return type;
+}
+const EtchObjectType& EtchObjectType::NATIVE_DOUBLE() {
+  static const EtchObjectType type(EOTID_DOUBLE, NULL);
+  return type;
+}
+const EtchObjectType& EtchObjectType::NATIVE_FLOAT() {
+  static const EtchObjectType type(EOTID_FLOAT, NULL);
+  return type;
+}
+const EtchObjectType& EtchObjectType::NATIVE_BOOL() {
+  static const EtchObjectType type(EOTID_BOOL, NULL);
+  return type;
+}
 
 const EtchObjectType* EtchObjectType::TYPE() {
   const static EtchObjectType TYPE(EOTID_OBJECT_TYPE, NULL);
@@ -67,4 +88,4 @@ capu::bool_t EtchObjectType::equals(cons
   } else {
     return false;
   }
-}
\ No newline at end of file
+}

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=1368546&r1=1368545&r2=1368546&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 Thu Aug  2 15:36:55 2012
@@ -18,7 +18,10 @@
 
 #include "serialization/EtchAuthenticationExceptionSerializer.h"
 
-const EtchString EtchAuthenticationExceptionSerializer::FIELD_NAME("msg");
+const EtchString& EtchAuthenticationExceptionSerializer::FIELD_NAME() {
+  static const EtchString name("msg");
+  return name;
+}
 
 EtchAuthenticationExceptionSerializer::EtchAuthenticationExceptionSerializer(EtchType* type, EtchField* field)
 : mField(*field), mType(type) {
@@ -61,7 +64,7 @@ status_t EtchAuthenticationExceptionSeri
 status_t EtchAuthenticationExceptionSerializer::Init(EtchType* type, EtchClass2TypeMap* class2type) {
   status_t result;
   EtchField field_ptr;
-  result = type->getField(FIELD_NAME, &field_ptr);
+  result = type->getField(FIELD_NAME(), &field_ptr);
   if (result != ETCH_OK)
     return result;
   class2type->put(EtchAuthenticationException::TYPE(), type);
@@ -77,4 +80,4 @@ status_t EtchAuthenticationExceptionSeri
     return result;
   type->lock();
   return ETCH_OK;
-}
\ No newline at end of file
+}

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp Thu Aug  2 15:36:55 2012
@@ -19,7 +19,11 @@
 #include "capu/os/NumericLimits.h"
 #include "serialization/EtchBinaryTaggedData.h"
 
-capu::SmartPointer<EtchObject> EtchBinaryTaggedData::NONE = new EtchString("NONE");
+capu::SmartPointer<EtchObject>& EtchBinaryTaggedData::NONE()
+{
+  static capu::SmartPointer<EtchObject> ret = new EtchString("NONE");
+  return ret;
+}
 
 EtchBinaryTaggedData::EtchBinaryTaggedData(EtchValueFactory* vf)
 : EtchTaggedData(vf) {
@@ -34,8 +38,8 @@ capu::int8_t EtchBinaryTaggedData::check
   if (value.get() == NULL) {
     return EtchTypeCode::Null;
   }
-  
-  if (value.get() == NONE.get()) {
+
+  if (value.get() == NONE().get()) {
     return EtchTypeCode::NONE;
   }
 
@@ -61,34 +65,34 @@ capu::int8_t EtchBinaryTaggedData::check
     capu::SmartPointer<EtchInt32> _int = capu::smartpointer_cast<EtchInt32> (value);
     return checkInteger(_int->get());
   }
-  
+
   if (value->getObjectType()->equals(EtchLong::TYPE())) {
     capu::SmartPointer<EtchLong> _long = capu::smartpointer_cast<EtchLong> (value);
     return checkLong(_long->get());
   }
-  
+
   if (value->getObjectType()->equals(EtchFloat::TYPE())) {
     return EtchTypeCode::FLOAT;
   }
-  
+
   if (value->getObjectType()->equals(EtchDouble::TYPE())) {
     return EtchTypeCode::DOUBLE;
   }
-  
+
   if (value->getObjectType()->equals(EtchString::TYPE())) {
     capu::SmartPointer<EtchString> _string = capu::smartpointer_cast<EtchString> (value);
     if (_string->length() == 0)
       return EtchTypeCode::EMPTY_STRING;
     return EtchTypeCode::STRING;
-  } 
-  
+  }
+
   if (value->getObjectType()->isArray()) {
     capu::SmartPointer<EtchNativeArrayBase> array = capu::smartpointer_cast<EtchNativeArrayBase> (value);
-    if (array->getObjectType()->getObjectComponentType()->equals(&EtchObjectType::NATIVE_INT8) && array->getDim() == 1) {
+    if (array->getObjectType()->getObjectComponentType()->equals(&EtchObjectType::NATIVE_INT8()) && array->getDim() == 1) {
       return EtchTypeCode::BYTES;
     }
     return EtchTypeCode::ARRAY;
-  } 
+  }
 
   return EtchTypeCode::CUSTOM;
 }
@@ -123,31 +127,31 @@ capu::int8_t EtchBinaryTaggedData::check
 }
 
 capu::int8_t EtchBinaryTaggedData::getNativeTypeCode(const EtchObjectType *c) {
-  if ((c->equals(&EtchObjectType::NATIVE_BOOL))|| (c->equals(EtchBool::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_BOOL()))|| (c->equals(EtchBool::TYPE())))
     return EtchTypeCode::BOOLEAN_TRUE;
 
-  if ((c->equals(&EtchObjectType::NATIVE_INT8)) || (c->equals(EtchByte::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_INT8())) || (c->equals(EtchByte::TYPE())))
     return EtchTypeCode::BYTE;
 
-  if ((c->equals(&EtchObjectType::NATIVE_INT16)) || (c->equals(EtchShort::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_INT16())) || (c->equals(EtchShort::TYPE())))
     return EtchTypeCode::SHORT;
 
-  if ((c->equals(&EtchObjectType::NATIVE_INT32)) || (c->equals(EtchInt32::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_INT32())) || (c->equals(EtchInt32::TYPE())))
     return EtchTypeCode::INT;
 
-  if ((c->equals(&EtchObjectType::NATIVE_INT64)) || (c->equals(EtchLong::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_INT64())) || (c->equals(EtchLong::TYPE())))
     return EtchTypeCode::LONG;
 
-  if ((c->equals(&EtchObjectType::NATIVE_FLOAT)) || (c->equals(EtchFloat::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_FLOAT())) || (c->equals(EtchFloat::TYPE())))
     return EtchTypeCode::FLOAT;
 
-  if ((c->equals(&EtchObjectType::NATIVE_DOUBLE)) || (c->equals(EtchDouble::TYPE())))
+  if ((c->equals(&EtchObjectType::NATIVE_DOUBLE())) || (c->equals(EtchDouble::TYPE())))
     return EtchTypeCode::DOUBLE;
 
   if (c->equals(EtchString::TYPE()))
     return EtchTypeCode::STRING;
 
-  if (c->equals(EtchObject::TYPE())) 
+  if (c->equals(EtchObject::TYPE()))
     return EtchTypeCode::ANY;
 
   return EtchTypeCode::CUSTOM;
@@ -191,4 +195,4 @@ const EtchObjectType* EtchBinaryTaggedDa
     default:
       return NULL;
   }
-}
\ No newline at end of file
+}