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:37 UTC

svn commit: r1399116 - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ include/serialization/ include/support/ include/util/ lib/capu/modules/capu/include/capu/util/ src/main/serialization/ src/main/transport/ src/main/util/

Author: veithm
Date: Wed Oct 17 06:50:36 2012
New Revision: 1399116

URL: http://svn.apache.org/viewvc?rev=1399116&view=rev
Log:
ETCH-243 Small Fixes

Added virtual destructors
Added custom HashTable sizes inside of EtchConfig.h
Added some logging

Change-Id: I97cc1778909d9882c2b42cf7833b02bd29dd2f0d

Modified:
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h
    incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h
    incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h
    incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h
    incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h
    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/EtchClass2TypeMap.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchDefaultDeliveryService.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp
    incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h Wed Oct 17 06:50:36 2012
@@ -1,19 +1,19 @@
-/* $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, 
+/* $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. 
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef __ETCHCONFIG_H__
@@ -25,10 +25,24 @@
 
 #include "capu/Config.h"
 
-//Hash table size
-#define ETCH_DEFAULT_HASH_TABLE_SIZE 1000
+/**
+ * Hash table size
+ */
+#define ETCH_DEFAULT_HASH_TABLE_SIZE                      1000
+
+#define ETCH_DEFAULT_TYPEMAP_HASH_SIZE                    50
+#define ETCH_DEFAULT_C2TYPEMAP_HASH_SIZE                  50
+#define ETCH_DEFAULT_FIELDMAP_HASH_SIZE                   10
+#define ETCH_DEFAULT_STRUCTVALUE_HASH_SIZE                8
+#define ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE              5
+#define ETCH_DEFAULT_CUSTOMVALIDATORCACHE_HASH_SIZE       100
+#define ETCH_DEFAULT_MAILBOXMANAGER_HASH_SIZE             300
+#define ETCH_DEFAULT_RESOURCES_HASH_SIZE                  300
+#define ETCH_DEFAULT_URL_TERMS_HASH_SIZE                  10
 
-//Socket input buffer size (bytes)
+/**
+ * Socket input buffer size (bytes)
+ */
 #define ETCH_DEFAULT_SOCKET_INPUT_BUFFER_SIZE 8192
 
 #endif

Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h Wed Oct 17 06:50:36 2012
@@ -22,6 +22,7 @@
 #include "capu/util/SmartPointer.h"
 #include "common/EtchHashTable.h"
 #include "common/EtchObject.h"
+#include "common/EtchConfig.h"
 #include "serialization/EtchType.h"
 #include "serialization/EtchLevel.h"
 
@@ -165,7 +166,7 @@ private:
   static const capu::int64_t serialVersionUID = 1L;
 
   //Default size of mTable
-  static const capu::int32_t DEFAULT_SIZE = 8;
+  static const capu::int32_t DEFAULT_SIZE = ETCH_DEFAULT_STRUCTVALUE_HASH_SIZE;
 
 };
 

Modified: incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/support/EtchObjectSession.h Wed Oct 17 06:50:36 2012
@@ -32,6 +32,9 @@
 class EtchObjectSession
 {
 public:
+
+  virtual ~EtchObjectSession() {}
+
   /**
   * Gets a configuration or operational value from the handler. The
   * request is passed up the chain of sessions until some session

Modified: incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/util/EtchResources.h Wed Oct 17 06:50:36 2012
@@ -83,7 +83,7 @@ public:
 private:
 
   EtchResources *mRelated;
-  EtchHashTable <EtchString, EtchObject*> res;
+  EtchHashTable <EtchString, EtchObject*> mRes;
 
 };
 

Modified: incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h Wed Oct 17 06:50:36 2012
@@ -114,8 +114,8 @@ namespace capu
 
       class PoolWorker {
       public:
-        PoolWorker() {
-          mPool = NULL;
+        PoolWorker()
+        : mPool(NULL), mPoolRunnable(NULL), mThread(NULL) {
         }
 
         PoolWorker(ThreadPool *pool, int32_t id)
@@ -144,7 +144,7 @@ namespace capu
         ThreadPool *mPool;
         PoolRunnable *mPoolRunnable;
         Thread *mThread;
-        
+
       };
 
       status_t init();
@@ -159,7 +159,7 @@ namespace capu
 
       bool_t isClosed();
 
-      
+
   };
 
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataInput.cpp Wed Oct 17 06:50:36 2012
@@ -278,7 +278,6 @@ status_t EtchBinaryTaggedDataInput::read
       capu::StringUtils::Sprintf(num, 100, "%d", id->get());
       EtchString str(num);
       type = new EtchType(id->get(), str);
-      //TODO: Enhance memory management. We need smartpointers here because we create new object sometimes
     }
     return ETCH_OK;
   }
@@ -287,7 +286,6 @@ status_t EtchBinaryTaggedDataInput::read
     EtchString* name = (EtchString*) obj.get();
     if (mVf->getType(*name, type) != ETCH_OK) {
       type = new EtchType(*name);
-      //TODO: Enhance memory management. We need smartpointers here because we create new object sometimes
     }
     return ETCH_OK;
   }
@@ -436,7 +434,7 @@ status_t EtchBinaryTaggedDataInput::read
       if (validateValue(v, boolean, result) != ETCH_OK) {
         return ETCH_ERROR;
       } else {
-        CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Boolean false value has been received");
+        CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Boolean true value has been received");
 
         return ETCH_OK;
       }
@@ -580,7 +578,7 @@ status_t EtchBinaryTaggedDataInput::read
         return ETCH_ERROR;
       } else {
         result = array;
-        CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Array hhas been received");
+        CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Array has been received");
         return ETCH_OK;
       }
     }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp Wed Oct 17 06:50:36 2012
@@ -293,9 +293,15 @@ status_t EtchBinaryTaggedDataOutput::wri
   switch (typeCode) {
     case EtchTypeCode::Null:
     case EtchTypeCode::NONE:
+      return ETCH_OK;
     case EtchTypeCode::BOOLEAN_FALSE:
+      CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Boolean False has been serialized. (No Data send - encoded via TypeId)");
+      return ETCH_OK;
     case EtchTypeCode::BOOLEAN_TRUE:
+      CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Boolean True has been serialized. (No Data send - encoded via TypeId)");
+      return ETCH_OK;
     case EtchTypeCode::EMPTY_STRING:
+      CAPU_LOG_TRACE(mRuntime->getLogger(), TAG, "Empty String has been serialized. (No Data send - encoded via TypeId)");
       return ETCH_OK;
 
     case EtchTypeCode::BYTE:

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp Wed Oct 17 06:50:36 2012
@@ -17,11 +17,12 @@
  */
 
 #include "common/EtchHashTable.h"
+#include "common/EtchConfig.h"
 #include "serialization/EtchType.h"
 #include "serialization/EtchClass2TypeMap.h"
 
 EtchClass2TypeMap::EtchClass2TypeMap()
-: mLocked(false) {
+: mC2T(ETCH_DEFAULT_C2TYPEMAP_HASH_SIZE), mLocked(false) {
 }
 
 EtchClass2TypeMap::~EtchClass2TypeMap() {
@@ -47,4 +48,4 @@ status_t EtchClass2TypeMap::put(const Et
 
 void EtchClass2TypeMap::lock() {
   mLocked = true;
-}
\ No newline at end of file
+}

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp Wed Oct 17 06:50:36 2012
@@ -15,10 +15,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include "common/EtchConfig.h"
 #include "serialization/EtchFieldMap.h"
 
 EtchFieldMap::EtchFieldMap()
-: mLocked(false) {
+: mById(ETCH_DEFAULT_FIELDMAP_HASH_SIZE), mByName(ETCH_DEFAULT_FIELDMAP_HASH_SIZE), mLocked(false) {
 
 }
 

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp Wed Oct 17 06:50:36 2012
@@ -24,26 +24,26 @@ const EtchObjectType* EtchType::TYPE() {
   return &TYPE;
 }
 EtchType::EtchType()
-: mId(0), mTimeout(0), mName(""), mSuperType(NULL), mResultType(NULL),
+: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(0), mTimeout(0), mName(""), mSuperType(NULL), mResultType(NULL),
   mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {
   addObjectType(TYPE());
 }
 
 EtchType::EtchType(EtchString name)
-: mTimeout(0), mName(name), mSuperType(NULL),
+: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mTimeout(0), mName(name), mSuperType(NULL),
 mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {
   mId = EtchHashEx::Digest(mName);
   addObjectType(TYPE());
 }
 
 EtchType::EtchType(capu::uint32_t id, EtchString name)
-: mId(id), mTimeout(0), mName(name), mSuperType(NULL),
+: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(id), mTimeout(0), mName(name), mSuperType(NULL),
 mResultType(NULL), mDirection(BOTH), mAsyncMode(NONE), mLocked(false), mComponentType(NULL), mHelper(NULL), mStubHelper(NULL) {
   addObjectType(TYPE());
 }
 
 EtchType::EtchType(const EtchType& other)
- : EtchObject(other), mId(other.mId), mTimeout(other.mTimeout), mName(other.mName), mSuperType(other.mSuperType),
+ : EtchObject(other), mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(other.mId), mTimeout(other.mTimeout), mName(other.mName), mSuperType(other.mSuperType),
    mResultType(other.mResultType), mDirection(other.mDirection), mAsyncMode(other.mAsyncMode), mLocked(other.mLocked),
    mComponentType(other.mComponentType), mHelper(other.mHelper), mStubHelper(other.mStubHelper) {
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp Wed Oct 17 06:50:36 2012
@@ -15,12 +15,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include "common/EtchConfig.h"
 #include "serialization/EtchTypeMap.h"
 
 // TODO: Check memory handling
 
 EtchTypeMap::EtchTypeMap()
-: mLocked(false) {
+: mById(ETCH_DEFAULT_TYPEMAP_HASH_SIZE), mByName(ETCH_DEFAULT_TYPEMAP_HASH_SIZE), mLocked(false) {
 }
 
 EtchTypeMap::~EtchTypeMap() {
@@ -28,7 +30,9 @@ EtchTypeMap::~EtchTypeMap() {
   while (it.hasNext()) {
     capu::Pair<capu::int32_t, EtchType*> pair;
     it.next(&pair);
-    delete pair.second;
+    if (pair.second != NULL) {
+      delete pair.second;
+    }
   }
   mById.clear();
   mByName.clear();
@@ -102,4 +106,4 @@ void EtchTypeMap::clear() {
   }
   mByName.clear();
   mById.clear();
-}
\ No newline at end of file
+}

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp Wed Oct 17 06:50:36 2012
@@ -27,7 +27,7 @@ public:
    * Validator cache
    */
   struct ValidatorCache {
-    ValidatorCache() : id(0), validators(100) {}
+    ValidatorCache() : id(0), validators(ETCH_DEFAULT_CUSTOMVALIDATORCACHE_HASH_SIZE) {}
     capu::uint64_t id;
     EtchHashTable<EtchValidatorCustomKey, capu::SmartPointer<EtchValidator> > validators;
   };

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=1399116&r1=1399115&r2=1399116&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:36 2012
@@ -30,7 +30,7 @@ const EtchString& EtchDefaultDeliverySer
 }
 
 EtchDefaultDeliveryService::EtchDefaultDeliveryService(EtchRuntime* runtime, EtchMailboxManager* transport, const EtchString& uri)
-: mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {
+: mRuntime(runtime), mTransport(transport), mStatus(EtchString("session status"), EtchString("")) {
   EtchURL url(uri);
   init(&url);
 }

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=1399116&r1=1399115&r2=1399116&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:36 2012
@@ -20,7 +20,7 @@
 #include "capu/os/Debug.h"
 
 EtchPlainMailboxManager::EtchPlainMailboxManager(EtchRuntime* runtime, EtchTransportMessage* transport, const EtchString& uri, EtchResources* resources)
-: mRuntime(runtime), mSession(NULL), mTransport(transport), mUp(false) {
+: mRuntime(runtime), mSession(NULL), mTransport(transport), mUp(false), mMailboxes(ETCH_DEFAULT_MAILBOXMANAGER_HASH_SIZE) {
   capu::Debug::Assert(mRuntime != NULL);
   mTransport->setSession(this);
 }

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp Wed Oct 17 06:50:36 2012
@@ -19,7 +19,7 @@
 #include "util/EtchResources.h"
 
 EtchResources::EtchResources()
-: mRelated(NULL) {
+: mRelated(NULL), mRes(ETCH_DEFAULT_RESOURCES_HASH_SIZE) {
 
 }
 
@@ -32,7 +32,7 @@ EtchResources::~EtchResources() {
 
 capu::bool_t EtchResources::containsKey(const EtchString& key) {
   EtchObject* ptr = NULL;
-  if (res.get(key, &ptr) == ETCH_OK)
+  if (mRes.get(key, &ptr) == ETCH_OK)
     return true;
   else {
     if (mRelated == NULL)
@@ -46,7 +46,7 @@ capu::bool_t EtchResources::containsKey(
 }
 
 status_t EtchResources::get(const EtchString& key, EtchObject*& result) {
-  if (res.get(key, &result) != ETCH_OK) {
+  if (mRes.get(key, &result) != ETCH_OK) {
 
     if (mRelated == NULL)
       return ETCH_ENOT_EXIST;
@@ -58,12 +58,12 @@ status_t EtchResources::get(const EtchSt
 }
 
 status_t EtchResources::put(const EtchString& key, EtchObject* value, EtchObject*& result) {
-  return res.put(key, value, &result);
+  return mRes.put(key, value, &result);
 }
 
 status_t EtchResources::remove(const EtchString& key, EtchObject*& result) {
 
-  return res.remove(key, &result);
+  return mRes.remove(key, &result);
 }
 
 EtchResources* EtchResources::getRelated() {

Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp?rev=1399116&r1=1399115&r2=1399116&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp Wed Oct 17 06:50:36 2012
@@ -18,7 +18,8 @@
 #include "util/EtchURL.h"
 #include "capu/os/StringUtils.h"
 
-EtchURL::EtchURL() {
+EtchURL::EtchURL()
+ : terms(ETCH_DEFAULT_URL_TERMS_HASH_SIZE) {
 
 }
 
@@ -418,4 +419,4 @@ EtchList<EtchString>& EtchURL::getParams
 
 EtchHashTable<EtchString, EtchString>& EtchURL::getTerms() {
   return terms;
-}
\ No newline at end of file
+}