Return-Path: X-Original-To: apmail-etch-commits-archive@www.apache.org Delivered-To: apmail-etch-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3D88FFCF for ; Mon, 25 Mar 2013 09:44:27 +0000 (UTC) Received: (qmail 18428 invoked by uid 500); 25 Mar 2013 09:44:27 -0000 Delivered-To: apmail-etch-commits-archive@etch.apache.org Received: (qmail 18381 invoked by uid 500); 25 Mar 2013 09:44:26 -0000 Mailing-List: contact commits-help@etch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@etch.apache.org Delivered-To: mailing list commits@etch.apache.org Received: (qmail 18367 invoked by uid 99); 25 Mar 2013 09:44:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 09:44:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,FILL_THIS_FORM X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 09:44:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D39F623888EA; Mon, 25 Mar 2013 09:43:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1460566 [1/3] - in /etch/trunk: binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/ binding-cpp/runtime/ binding-cpp/runtime/include/common/ binding-cpp/runtime/include/serialization/ binding-cpp/runtime/include/... Date: Mon, 25 Mar 2013 09:43:46 -0000 To: commits@etch.apache.org From: veithm@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130325094350.D39F623888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: veithm Date: Mon Mar 25 09:43:41 2013 New Revision: 1460566 URL: http://svn.apache.org/r1460566 Log: ETCH-263 Cleaning up external library dependency Adapting Etch to use CAPU version 0.8.1 CAPU is now included as a external dependency Change-Id: I1d81b508e129d15f78bfd0148e9367d31122d51f Added: etch/trunk/binding-cpp/runtime/FindCapu.cmake etch/trunk/binding-cpp/runtime/toolchains/MacOSX_X86_64.toolchain - copied, changed from r1460564, etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Linux_X86_64.toolchain Removed: etch/trunk/binding-cpp/runtime/lib/capu/.gitignore etch/trunk/binding-cpp/runtime/lib/capu/CMakeLists.txt etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/acme.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/internal/config.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/internal/macros.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/internal/plugins.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/plugins/GoogleMock.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Integrity1002_armv7l_Emerald-P-ES1.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Linux_X86_32.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Linux_X86_64.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Linux_armv7l.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/QNX_X86_32.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Windows_X86_32.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/acme/toolchain/Windows_X86_64.toolchain etch/trunk/binding-cpp/runtime/lib/capu/cmake/modules/FindIP4.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/modules/FindLibRt.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/modules/FindNet.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/modules/FindRes.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/modules/FindSocket.cmake etch/trunk/binding-cpp/runtime/lib/capu/cmake/modules/FindThread.cmake etch/trunk/binding-cpp/runtime/lib/capu/modules/CMakeLists.txt etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/CMakeLists.txt etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/Config.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/Error.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/Array.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/Comparator.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/Hash.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashSet.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/HashTable.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/List.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/Pair.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/Queue.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/container/RingBuffer.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/AtomicOperation.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/CondVar.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Debug.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/File.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Math.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Memory.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Mutex.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/NumericLimits.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/ServerSocket.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Socket.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/StringUtils.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Thread.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/Time.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/UdpSocket.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/CondVar.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Debug.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/File.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Integrity_ARM_V7L/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/CondVar.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Debug.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/File.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Math.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Memory.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Mutex.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/NumericLimits.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/ServerSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Socket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/StringUtils.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Thread.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/Time.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux/UdpSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux_ARM_V7L/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux_X86_32/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Linux_X86_64/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Math.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Memory.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Mutex.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/NumericLimits.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/QNX/Socket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/QNX/StringUtils.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/QNX/UdpSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/ServerSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Socket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/StringUtils.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Thread.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Time.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/UdpSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/CondVar.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Debug.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/File.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Math.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Memory.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Mutex.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/NumericLimits.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/ServerSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Socket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/StringUtils.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Thread.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/Time.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows/UdpSocket.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows_X86_32/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/os/arch/Windows_X86_64/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/Appender.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ConsoleAppender.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/Logger.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/Runnable.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/SmartPointer.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/ThreadPool.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/include/capu/util/Traits.h etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/os/Math.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/Logger.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/src/util/ThreadPool.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ArrayTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/HashSetTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/HashTableTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/ListTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/QueueTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/container/RingBufferTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/main.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/AtomicOperationTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/CondVarTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/FileTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/MemoryTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/MutexTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/NumericLimitsTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/ServerSocketTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/SocketTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/StringUtilsTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/ThreadTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/TimeTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/UdpSocketTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/arch/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/arch/X86_32/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/os/arch/X86_64/AtomicOperation.inc etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/util/LoggerTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/util/SmartPointerTest.cpp etch/trunk/binding-cpp/runtime/lib/capu/modules/capu/test/util/ThreadPoolTest.cpp Modified: etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm etch/trunk/binding-cpp/runtime/CMakeLists.txt etch/trunk/binding-cpp/runtime/build.xml etch/trunk/binding-cpp/runtime/include/common/EtchComparatorNative.h etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h etch/trunk/binding-cpp/runtime/include/common/EtchList.h etch/trunk/binding-cpp/runtime/include/common/EtchObject.h etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeMap.h etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h etch/trunk/binding-cpp/runtime/include/support/EtchFreePool.h etch/trunk/binding-cpp/runtime/include/support/EtchQueuedPool.h etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h etch/trunk/binding-cpp/runtime/include/util/EtchUtil.h etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorByte.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorCustom.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorInt.cpp etch/trunk/binding-cpp/runtime/src/main/serialization/EtchValidatorShort.cpp etch/trunk/binding-cpp/runtime/src/main/support/EtchFreePool.cpp etch/trunk/binding-cpp/runtime/src/main/support/EtchMonitor.cpp etch/trunk/binding-cpp/runtime/src/main/support/EtchQueuedPool.cpp etch/trunk/binding-cpp/runtime/src/main/support/EtchRuntime.cpp etch/trunk/binding-cpp/runtime/src/main/transport/EtchPlainMailboxManager.cpp etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpConnection.cpp etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpListener.cpp etch/trunk/binding-cpp/runtime/src/main/transport/EtchTcpTransportFactory.cpp etch/trunk/binding-cpp/runtime/src/main/util/EtchCircularQueue.cpp etch/trunk/binding-cpp/runtime/src/main/util/EtchResources.cpp etch/trunk/binding-cpp/runtime/src/main/util/EtchURL.cpp etch/trunk/binding-cpp/runtime/src/main/util/EtchUtil.cpp etch/trunk/binding-cpp/runtime/src/test/common/EtchFloatTest.cpp etch/trunk/binding-cpp/runtime/src/test/common/EtchHashSetTest.cpp etch/trunk/binding-cpp/runtime/src/test/common/EtchHashTableTest.cpp etch/trunk/binding-cpp/runtime/src/test/common/EtchListTest.cpp etch/trunk/binding-cpp/runtime/src/test/common/EtchStringTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchBinaryTaggedDataInputOutputTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchComboValidatorTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchDefaultValueFactoryTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchStructValueTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorDoubleTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorFloatTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorIntTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorLongTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorObjectTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorShortTest.cpp etch/trunk/binding-cpp/runtime/src/test/serialization/EtchValidatorStructValueTest.cpp etch/trunk/binding-cpp/runtime/src/test/support/EtchMonitorTest.cpp etch/trunk/binding-cpp/runtime/src/test/support/EtchRemoteBaseTest.cpp etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessageTest.cpp etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp etch/trunk/binding-cpp/runtime/src/test/util/EtchCircularQueueTest.cpp etch/trunk/binding-cpp/runtime/src/test/util/EtchUtilTest.cpp etch/trunk/binding-cpp/runtime/toolchains/Linux_ARMv7l.toolchain etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_32.toolchain etch/trunk/binding-cpp/runtime/toolchains/Linux_X86_64.toolchain etch/trunk/binding-cpp/runtime/toolchains/QNX_X86_32.toolchain etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_32.toolchain etch/trunk/binding-cpp/runtime/toolchains/Windows_X86_64.toolchain etch/trunk/examples/helloworld/cpp/CMakeLists.txt Modified: etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm (original) +++ etch/trunk/binding-cpp/compiler/src/main/resources/org/apache/etch/bindings/cpp/compiler/vf_cpp.vm Mon Mar 25 09:43:41 2013 @@ -39,13 +39,12 @@ using namespace $namespace; status_t $vf::Etch${intf.name()}RuntimeListener::onRuntimeChanged(EtchRuntime* runtime) { - capu::int_t index = $vf::SRuntimes.find(runtime->getId()); - if (index == -1) { + if (runtime == NULL) { return ETCH_ERROR; } if (runtime->isClosed()) { //the runtime is closed and is removed - $vf::SRuntimes.removeAt(index); + $vf::SRuntimes.remove(runtime->getId()); } return ETCH_OK; } @@ -305,6 +304,7 @@ status_t $vf::InitParams${ctr}(EtchRunti capu::SmartPointer tmpValue; #end #set( $ctr = $ctr + 1 ) + // params for $n.name() #if ($n.isStruct() || $n.isExcept()) @@ -353,7 +353,7 @@ status_t $vf::InitValueFactory(EtchRunti return ETCH_OK; } - status = SRuntimes.add(runtime->getId()); + status = SRuntimes.push_back(runtime->getId()); runtime->registerListener(&S${i}RuntimeListener); if (status != ETCH_OK) { return status; Modified: etch/trunk/binding-cpp/runtime/CMakeLists.txt URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/CMakeLists.txt?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/CMakeLists.txt (original) +++ etch/trunk/binding-cpp/runtime/CMakeLists.txt Mon Mar 25 09:43:41 2013 @@ -48,26 +48,8 @@ SET(GTEST ${ETCH_EXTERNAL_DEPENDS}/gtest SET(GMOCK ${ETCH_EXTERNAL_DEPENDS}/gmock/1.6.0) #Build external CAPU project (OS Abstraction) -SET(CAPU_PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/capu") -SET(CAPU_CMAKE_BUILD_DIR "${CAPU_PROJECT_DIR}/build") -SET(CAPU_CMAKE_TOOLCHAIN_DIR "${CAPU_PROJECT_DIR}/cmake/acme/toolchain") -SET(CAPU_DELIVERABLE_DIR "${CAPU_PROJECT_DIR}/deliverable") - - -include(ExternalProject) -ExternalProject_Add( - Capu - SOURCE_DIR "${CAPU_PROJECT_DIR}" - BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}" - DOWNLOAD_COMMAND "" - UPDATE_COMMAND "" - CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -) - -#CAPU path -SET(CAPU "${CAPU_PROJECT_DIR}/deliverable/capu") - +set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}) +find_package(Capu) # Set definitions IF (TARGET_OS STREQUAL "Linux") Added: etch/trunk/binding-cpp/runtime/FindCapu.cmake URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/FindCapu.cmake?rev=1460566&view=auto ============================================================================== --- etch/trunk/binding-cpp/runtime/FindCapu.cmake (added) +++ etch/trunk/binding-cpp/runtime/FindCapu.cmake Mon Mar 25 09:43:41 2013 @@ -0,0 +1,77 @@ +# +# 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. +# + +# Try to find or download capu +#Once done this will define +#LIBCAPU_FOUND - System has capu +#LIBCAPU_INCLUDE_DIR - The capu include directory +#LIBCAPU_LIBRARY_DIR - The library needed to use capu + +IF (NOT DEFINED CMAKE_BUILD_TYPE) + MESSAGE(FATAL_ERROR "CMAKE_BUILD_TYPE not set") +ENDIF() + +IF (NOT DEFINED CAPU_INCLUDE_DIR OR NOT DEFINED CAPU_LIBRARY_DIR) + include(ExternalProject) + + IF ("${LOCAL_CAPU_SOURCE_DIR}" STREQUAL "") + #download capu from foreign repository + SET(CAPU_PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rd/capu") + SET(CAPU_CMAKE_BUILD_DIR "${CMAKE_BINARY_DIR}/capu") + + ExternalProject_Add( + Capu + GIT_REPOSITORY git://github.com/bmwcarit/capu.git + SOURCE_DIR "${CAPU_PROJECT_DIR}" + BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}" + INSTALL_DIR "${CAPU_PROJECT_DIR}/deliverable" + CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + ) + ELSE() + SET(CAPU_PROJECT_DIR "${LOCAL_CAPU_SOURCE_DIR}") + SET(CAPU_CMAKE_BUILD_DIR "${CAPU_PROJECT_DIR}/build_${TARGET_OS}_${TARGET_ARCH}") + + ExternalProject_Add( + Capu + SOURCE_DIR "${CAPU_PROJECT_DIR}" + BINARY_DIR "${CAPU_CMAKE_BUILD_DIR}" + DOWNLOAD_COMMAND "" + UPDATE_COMMAND "" + INSTALL_COMMAND "install" + CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + ) + ENDIF() + + SET(CAPU_DELIVERABLE_DIR ${CAPU_PROJECT_DIR}/deliverable/Capu) + + SET(LIBCAPU_INCLUDE_DIR ${CAPU_DELIVERABLE_DIR}/include/Capu) + SET(LIBCAPU_LIBRARY_DIR ${CAPU_DELIVERABLE_DIR}/lib/${TARGET_OS}_${TARGET_ARCH}/${CMAKE_BUILD_TYPE}) +ELSE() + SET(LIBCAPU_INCLUDE_DIR ${CAPU_INCLUDE_DIR}) + SET(LIBCAPU_LIBRARY_DIR ${CAPU_LIBRARY_DIR}) +ENDIF() + + + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibCapu DEFAULT_MSG + LIBCAPU_LIBRARY_DIR LIBCAPU_INCLUDE_DIR) + +mark_as_advanced(LIBCAPU_INCLUDE_DIR LIBCAPU_LIBRARY_DIR ) + Modified: etch/trunk/binding-cpp/runtime/build.xml URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/build.xml?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/build.xml (original) +++ etch/trunk/binding-cpp/runtime/build.xml Mon Mar 25 09:43:41 2013 @@ -47,14 +47,6 @@ - - - - - - - - @@ -97,8 +89,6 @@ Testing platform: ${platform} - - @@ -123,6 +113,16 @@ + + + + + + + + + + @@ -130,21 +130,21 @@ Configuring CMake build Using generator: ${cmake.generator} - Using toolchain file: ${basedir}/toolchains/${platform}.toolchain + Using toolchain file: ${cmake.toolchainfile} - + Configuring CMake build Using default generator - Using toolchain file: ${basedir}/toolchains/${platform}.toolchain + Using toolchain file: ${cmake.toolchainfile} - + @@ -163,8 +163,8 @@ - - + + @@ -178,8 +178,8 @@ - - + + @@ -203,7 +203,7 @@ - + @@ -244,12 +244,12 @@ + location="3rd/capu/deliverable/Capu/bin/Windows_X86_32/${Etch.build.target}/capuTest.exe"/> - + Modified: etch/trunk/binding-cpp/runtime/include/common/EtchComparatorNative.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchComparatorNative.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchComparatorNative.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchComparatorNative.h Mon Mar 25 09:43:41 2013 @@ -26,7 +26,7 @@ class EtchComparatorNative { public: template - inline capu::bool_t operator() (const T &first, const T &second) { + inline capu::bool_t operator() (const T &first, const T &second) const { capu::Comparator c; return c(first, second); } Modified: etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h Mon Mar 25 09:43:41 2013 @@ -26,19 +26,18 @@ #include "capu/Config.h" /** - * Hash table size + * Hash table sizes */ -#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 +#define ETCH_DEFAULT_HASH_TABLE_BIT_SIZE 4 +#define ETCH_DEFAULT_TYPEMAP_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_C2TYPEMAP_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_FIELDMAP_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_STRUCTVALUE_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_TYPEVALIDATOR_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_CUSTOMVALIDATORCACHE_HASH_BIT_SIZE 8 +#define ETCH_DEFAULT_MAILBOXMANAGER_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_URL_TERMS_HASH_BIT_SIZE 4 +#define ETCH_DEFAULT_RESOURCES_HASH_BIT_SIZE 4 /** * Socket input buffer size (bytes) Modified: etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchHashNative.h Mon Mar 25 09:43:41 2013 @@ -19,23 +19,23 @@ #ifndef __ETCHHASHNATIVE_H__ #define __ETCHHASHNATIVE_H__ #include "common/EtchConfig.h" -#include "capu/container/HashTable.h" +#include "capu/container/Hash.h" #include "capu/util/Traits.h" class EtchHashNative { public: template - static capu::uint32_t Digest(T &key) { - return capu::Hash::Digest(key); + static capu::uint32_t Digest(T &key, const capu::uint8_t bitSize) { + return capu::CapuDefaultHashFunction::Digest(key, bitSize); } - static capu::uint32_t Digest(char* key) { - return capu::Hash::Digest(key); + static capu::uint32_t Digest(char* key, const capu::uint8_t bitSize) { + return capu::CapuDefaultHashFunction::Digest(key, bitSize); } - static capu::uint32_t Digest(const char* key) { - return capu::Hash::Digest(key); + static capu::uint32_t Digest(const char* key, const capu::uint8_t bitSize) { + return capu::CapuDefaultHashFunction::Digest(key, bitSize); } }; Modified: etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchHashSet.h Mon Mar 25 09:43:41 2013 @@ -23,12 +23,46 @@ #include "common/EtchComparator.h" #include "capu/container/HashSet.h" -template > +template , class H = EtchObjectHash> class EtchHashSet : public EtchObject { public: - typedef typename capu::HashSet::Iterator Iterator; + class EtchHashSetIterator { + public: + friend class EtchHashSet; + + /** + * destructor + */ + ~EtchHashSetIterator(); + + /** + * Check if iterator has next element. + * @return false if the next of current node that is pointed, is null otherwise true + */ + capu::bool_t hasNext(); + + /** + * Shifts the iterator to the next position and returns the element if next != NULL + * @param element + * @return CAPU_OK if the next element has been gotten + * + */ + status_t next(T *element = 0); + + + private: + /** + * Constructor + */ + EtchHashSetIterator(typename capu::HashSet::Iterator mBeginCapuIterator, typename capu::HashSet::Iterator mEndCapuIterator); + typename capu::HashSet::Iterator mBeginCapuIterator; + typename capu::HashSet::Iterator mEndCapuIterator; + + + }; + typedef typename EtchHashSet::EtchHashSetIterator Iterator; /** * EtchObjectType for EtchHashSet. @@ -96,7 +130,7 @@ public: * Return iterator for iterating key value tuples. * @return Iterator */ - inline Iterator begin(); + inline Iterator begin() const; private: @@ -104,57 +138,88 @@ private: }; -template -inline EtchHashSet::EtchHashSet() { - addObjectType(EtchHashSet::TYPE()); +template +inline EtchHashSet::EtchHashSet() { + addObjectType(EtchHashSet::TYPE()); } -template -inline EtchHashSet::EtchHashSet(capu::uint32_t size) +template +inline EtchHashSet::EtchHashSet(capu::uint32_t size) : mHashSet(size) { - addObjectType(EtchHashSet::TYPE()); + addObjectType(EtchHashSet::TYPE()); } -template -const EtchObjectType* EtchHashSet::TYPE() { +template +const EtchObjectType* EtchHashSet::TYPE() { const static EtchObjectType TYPE(EOTID_SET, NULL); return &TYPE; } -template -inline EtchHashSet::EtchHashSet(const EtchHashSet& other) +template +inline EtchHashSet::EtchHashSet(const EtchHashSet& other) : EtchObject(other), mHashSet(other.mHashSet) { } -template -inline EtchHashSet::~EtchHashSet() { +template +inline EtchHashSet::~EtchHashSet() { } -template -inline status_t EtchHashSet::clear() { +template +inline status_t EtchHashSet::clear() { return mHashSet.clear(); } -template -inline capu::uint32_t EtchHashSet::count() { +template +inline capu::uint32_t EtchHashSet::count() { return mHashSet.count(); } -template -inline status_t EtchHashSet::put(const T &value) { +template +inline status_t EtchHashSet::put(const T &value) { return mHashSet.put(value); } -template -inline status_t EtchHashSet::remove(const T &value) { +template +inline status_t EtchHashSet::remove(const T &value) { return mHashSet.remove(value); } -template -inline typename EtchHashSet::Iterator EtchHashSet::begin() { - return mHashSet.begin(); +template +inline typename EtchHashSet::Iterator EtchHashSet::begin() const{ + EtchHashSetIterator it(mHashSet.begin(),mHashSet.end()); + return it; +} + +template +EtchHashSet::EtchHashSetIterator::EtchHashSetIterator(typename capu::HashSet::Iterator beginCapuIterator, typename capu::HashSet::Iterator endCapuIterator) : + mBeginCapuIterator(beginCapuIterator), mEndCapuIterator(endCapuIterator) { + +} + +template +EtchHashSet::EtchHashSetIterator::~EtchHashSetIterator() { + +} + +template +capu::bool_t EtchHashSet::EtchHashSetIterator::hasNext() { + return mBeginCapuIterator != mEndCapuIterator; +} + +template +status_t EtchHashSet::EtchHashSetIterator::next(T *element) { + if (!hasNext()) { + return ETCH_ERANGE; + } + + if (element != NULL) { + *element = *mBeginCapuIterator; + } + mBeginCapuIterator++; + + return ETCH_OK; } typedef capu::SmartPointer > EtchHashSetPtr; Modified: etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchHashTable.h Mon Mar 25 09:43:41 2013 @@ -23,14 +23,48 @@ #include "common/EtchComparator.h" #include "capu/container/HashTable.h" -template > +template , class H = EtchObjectHash > class EtchHashTable : public EtchObject { private: capu::HashTable mHashTable; public: - typedef typename capu::Pair Pair; - typedef typename capu::HashTable::Iterator Iterator; + typedef typename capu::HashTable::HashTableEntry HashTableEntry; + class EtchHashTableIterator { + public: + friend class EtchHashTable; + + /** + * destructor + */ + ~EtchHashTableIterator(); + + /** + * Check if iterator has next element. + * @return false if the next of current node that is pointed, is null otherwise true + */ + capu::bool_t hasNext(); + + /** + * Shifts the iterator to the next position and returns the element if next != NULL + * @param element + * @return CAPU_OK if the next element has been gotten + * + */ + status_t next(HashTableEntry *element = 0); + + private: + /** + * Constructor + */ + EtchHashTableIterator(typename capu::HashTable::Iterator mBeginCapuIterator, typename capu::HashTable::Iterator mEndCapuIterator); + typename capu::HashTable::Iterator mBeginCapuIterator; + typename capu::HashTable::Iterator mEndCapuIterator; + + + }; + typedef typename EtchHashTable::EtchHashTableIterator Iterator; + /** * EtchObjectType for EtchHashTable. @@ -113,64 +147,101 @@ public: */ inline Iterator begin() const; + }; -template -const EtchObjectType* EtchHashTable::TYPE() { +template +const EtchObjectType* EtchHashTable::TYPE() { const static EtchObjectType TYPE(EOTID_HASHTABLE, NULL); return &TYPE; } -template -inline EtchHashTable::EtchHashTable() -: mHashTable(ETCH_DEFAULT_HASH_TABLE_SIZE) { - addObjectType(EtchHashTable::TYPE()); +template +inline EtchHashTable::EtchHashTable() +: mHashTable(ETCH_DEFAULT_HASH_TABLE_BIT_SIZE) { + addObjectType(EtchHashTable::TYPE()); } -template -inline EtchHashTable::EtchHashTable(capu::uint32_t size) +template +inline EtchHashTable::EtchHashTable(capu::uint32_t size) : mHashTable(size) { - addObjectType(EtchHashTable::TYPE()); + addObjectType(EtchHashTable::TYPE()); } -template -inline EtchHashTable::EtchHashTable(const EtchHashTable& other) +template +inline EtchHashTable::EtchHashTable(const EtchHashTable& other) : EtchObject(other), mHashTable(other.mHashTable) { } -template -inline EtchHashTable::~EtchHashTable() { +template +inline EtchHashTable::~EtchHashTable() { } -template -inline status_t EtchHashTable::put(const Key &key, T value, T* value_old) { +template +inline status_t EtchHashTable::put(const Key &key, T value, T* value_old) { return mHashTable.put(key, value, value_old); } -template -inline status_t EtchHashTable::get(const Key &key, T* value) { - return mHashTable.get(key, value); +template +inline status_t EtchHashTable::get(const Key &key, T* value) { + status_t status = ETCH_EINVAL; + if (value != NULL) { + *value = mHashTable.at(key,&status); + } + return status; } -template -inline status_t EtchHashTable::remove(const Key &key, T* value_old) { +template +inline status_t EtchHashTable::remove(const Key &key, T* value_old) { return mHashTable.remove(key, value_old); } -template -inline capu::uint32_t EtchHashTable::count() { +template +inline capu::uint32_t EtchHashTable::count() { return mHashTable.count(); } -template -inline status_t EtchHashTable::clear() { - return mHashTable.clear(); +template +inline status_t EtchHashTable::clear() { + mHashTable.clear(); + return ETCH_OK; +} + +template +inline typename EtchHashTable::Iterator EtchHashTable::begin() const { + EtchHashTableIterator it(mHashTable.begin(),mHashTable.end()); + return it; +} + +template +EtchHashTable::EtchHashTableIterator::EtchHashTableIterator(typename capu::HashTable::Iterator beginCapuIterator, typename capu::HashTable::Iterator endCapuIterator) : + mBeginCapuIterator(beginCapuIterator), mEndCapuIterator(endCapuIterator) { + +} + +template +EtchHashTable::EtchHashTableIterator::~EtchHashTableIterator() { + +} + +template +capu::bool_t EtchHashTable::EtchHashTableIterator::hasNext() { + return mBeginCapuIterator != mEndCapuIterator; } -template -inline typename EtchHashTable::Iterator EtchHashTable::begin() const { - return mHashTable.begin(); +template +status_t EtchHashTable::EtchHashTableIterator::next(HashTableEntry *element) { + if (!hasNext()) { + return ETCH_ERANGE; + } + + if (element != NULL) { + *element = *mBeginCapuIterator; + } + mBeginCapuIterator++; + + return ETCH_OK; } typedef capu::SmartPointer > EtchHashTablePtr; Modified: etch/trunk/binding-cpp/runtime/include/common/EtchList.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchList.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchList.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchList.h Mon Mar 25 09:43:41 2013 @@ -22,14 +22,60 @@ #include "capu/container/List.h" #include "common/EtchComparator.h" -template > +template >, class C = EtchComparator > class EtchList : public EtchObject { private: - capu::List mList; + capu::List mList; public: - typedef typename capu::List::Iterator Iterator; + class EtchListIterator { + public: + friend class EtchList; + + /** + * destructor + */ + ~EtchListIterator(); + + /** + * Check if iterator has next element. + * @return false if the next of current node that is pointed, is null otherwise true + */ + capu::bool_t hasNext(); + + /** + * Shifts the iterator to the next position and returns the element if next != NULL + * @param element + * @return CAPU_OK if the next element has been gotten + * + */ + status_t next(T* element = 0); + + /** + * Get current iterator element. + * @param element + * @return ETCH_OK if the current element has been gotten + */ + status_t current(T& element); + + /** + * Returns the index of the current element. + * @return The index of the current element. If there is no current element, the return value is undefined. + */ + capu::uint32_t currentIndex(); + + private: + /** + * Constructor + */ + EtchListIterator(typename capu::List::Iterator mBeginCapuListIterator, typename capu::List::Iterator mEndCapuListIterator); + typename capu::List::Iterator mBeginCapuListIterator; + typename capu::List::Iterator mEndCapuListIterator; + + + }; + typedef typename EtchList::EtchListIterator Iterator; /** * EtchObjectType for EtchList. @@ -80,7 +126,7 @@ public: * @return ETCH_EINVAL invalid index * ETCH_OK if the element is successfully removed */ - status_t removeAt(capu::int32_t index, T* elementOld = NULL); + status_t removeAt(Iterator& it, T* elementOld = NULL); /** * get a single element on specified index @@ -149,83 +195,132 @@ public: }; -template -const EtchObjectType* EtchList::TYPE() { +template +const EtchObjectType* EtchList::TYPE() { const static EtchObjectType TYPE(EOTID_LIST, NULL); return &TYPE; } -template -EtchList::EtchList() { - addObjectType(EtchList::TYPE()); +template +EtchList::EtchList() { + addObjectType(EtchList::TYPE()); } -template -EtchList::EtchList(const EtchList& other) +template +EtchList::EtchList(const EtchList& other) : EtchObject(other), mList(other.mList) { } -template -EtchList::~EtchList() { +template +EtchList::~EtchList() { } -template -status_t EtchList::add(const T &element) { - return mList.add(element); +template +status_t EtchList::add(const T &element) { + return mList.insert(element); } -template -status_t EtchList::add(capu::int32_t index, const T &element) { - return mList.add(index, element); +template +status_t EtchList::add(capu::int32_t index, const T &element) { + return mList.insert(index, element); } -template -typename EtchList::Iterator EtchList::begin() const { - return mList.begin(); +template +typename EtchList::Iterator EtchList::begin() const { + return EtchListIterator(mList.begin(), mList.end()); } -template -status_t EtchList::clear() { - return mList.clear(); +template +status_t EtchList::clear() { + mList.clear(); + return ETCH_OK; } -template -capu::bool_t EtchList::contains(const T &element) { +template +capu::bool_t EtchList::contains(const T &element) { return mList.contains(element); } -template -capu::int32_t EtchList::find(const T &element) const { +template +capu::int32_t EtchList::find(const T &element) const { return mList.find(element); } -template -status_t EtchList::get(capu::int32_t index, T* result) { - return mList.get(index, result); +template +status_t EtchList::get(capu::int32_t index, T* result) { + status_t status = ETCH_EINVAL; + if (result != NULL) { + *result = mList.get(index, &status); + } + return status; } -template -capu::bool_t EtchList::isEmpty() const { +template +capu::bool_t EtchList::isEmpty() const { return mList.isEmpty(); } -template -status_t EtchList::removeAt(capu::int32_t index, T* elementOld) { - return mList.removeAt(index, elementOld); +template +status_t EtchList::removeAt(typename EtchList::Iterator& it, T* elementOld) { + status_t status = mList.erase(it.mBeginCapuListIterator, elementOld); + return status; } -template -capu::int32_t EtchList::size() { +template +capu::int32_t EtchList::size() { return mList.size(); } -template -capu::int32_t EtchList::set(capu::int32_t index, const T &element, T* elementOld) { +template +capu::int32_t EtchList::set(capu::int32_t index, const T &element, T* elementOld) { return mList.set(index, element, elementOld); } + +template +EtchList::EtchListIterator::EtchListIterator(typename capu::List::Iterator beginCapuListIterator, typename capu::List::Iterator mEndCapuListIterator) : + mBeginCapuListIterator(beginCapuListIterator), mEndCapuListIterator(mEndCapuListIterator) { + +} + +template +EtchList::EtchListIterator::~EtchListIterator() { + +} + +template +capu::bool_t EtchList::EtchListIterator::hasNext() { + return mBeginCapuListIterator != mEndCapuListIterator; +} + +template +status_t EtchList::EtchListIterator::next(T *element) { + if (mBeginCapuListIterator == mEndCapuListIterator) { + return ETCH_ERROR; + } + if (element != NULL) { + *element = *mBeginCapuListIterator; + } + mBeginCapuListIterator++; + return ETCH_OK; +} + +template +status_t EtchList::EtchListIterator::current(T& element) { + if (mBeginCapuListIterator != mEndCapuListIterator) { + element = *mBeginCapuListIterator; + return ETCH_OK; + } + return ETCH_ERROR; +} + +template +capu::uint32_t EtchList::EtchListIterator::currentIndex() { + return mBeginCapuListIterator.currentIndex(); +} + typedef capu::SmartPointer > EtchListPtr; #endif /* ETCHDOUBLELINKEDLIST_H */ Modified: etch/trunk/binding-cpp/runtime/include/common/EtchObject.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchObject.h Mon Mar 25 09:43:41 2013 @@ -20,6 +20,7 @@ #define __ETCHOBJECT_H__ #include "capu/container/List.h" +#include "capu/container/Hash.h" #include "common/EtchError.h" #include "common/EtchObjectType.h" @@ -79,6 +80,7 @@ protected: private: capu::List mTypes; + }; typedef capu::SmartPointer EtchObjectPtr; Modified: etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchObjectHash.h Mon Mar 25 09:43:41 2013 @@ -24,16 +24,17 @@ class EtchObjectHash { public: - static capu::uint32_t Digest(const EtchObject &key) { - return key.getHashCode(); + static capu::uint32_t Digest(const EtchObject &key, const capu::uint8_t bitCount) { + + return capu::Resizer::Resize(key.getHashCode(),bitCount); } - static capu::uint32_t Digest(const EtchObject* key) { - return key->getHashCode(); + static capu::uint32_t Digest(const EtchObject* key, const capu::uint8_t bitCount) { + return capu::Resizer::Resize(key->getHashCode(),bitCount); } - static capu::uint32_t Digest(const capu::SmartPointer& key) { - return key->getHashCode(); + static capu::uint32_t Digest(const capu::SmartPointer& key, const capu::uint8_t bitCount) { + return capu::Resizer::Resize(key->getHashCode(),bitCount); } }; #endif Modified: etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchServerSocket.h Mon Mar 25 09:43:41 2013 @@ -19,8 +19,8 @@ #ifndef __ETCHSERVERSOCKET_H__ #define __ETCHSERVERSOCKET_H__ -#include "capu/os/ServerSocket.h" -#include "capu/os/Socket.h" +#include "capu/os/TcpServerSocket.h" +#include "capu/os/TcpSocket.h" #include "common/EtchSocket.h" class EtchServerSocket : public EtchObject { @@ -83,7 +83,7 @@ public: status_t listen(capu::uint8_t backlog); private: - capu::ServerSocket mServerSocket; + capu::TcpServerSocket mServerSocket; }; Modified: etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h (original) +++ etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h Mon Mar 25 09:43:41 2013 @@ -19,7 +19,7 @@ #ifndef __ETCHSOCKET_H__ #define __ETCHSOCKET_H__ -#include "capu/os/Socket.h" +#include "capu/os/TcpSocket.h" #include "common/EtchObject.h" class EtchSocket : public EtchObject { @@ -55,7 +55,7 @@ public: * ETCH_SOCKET_ESOCKET if the socket is not created * ETCH_ERROR otherwise */ - status_t send(unsigned char * buffer, capu::int32_t length); + status_t send(const char * buffer, capu::int32_t length); /** * Receive message @@ -67,7 +67,7 @@ public: * ETCH_SOCKET_ESOCKET if the socket is not created * ETCH_ERROR otherwise */ - status_t receive(unsigned char * buffer, capu::int32_t length, capu::int32_t& numBytes); + status_t receive(char * buffer, capu::int32_t length, capu::int32_t& numBytes); /** * close the socket @@ -87,7 +87,7 @@ public: * ETCH_EINVAL if the dest_addr is NULL * ETCH_SOCKET_ESOCKET if the socket is not created */ - status_t connect(unsigned char * dest_addr, capu::uint16_t port); + status_t connect(const char * dest_addr, capu::uint16_t port); /** * Sets the maximum socket buffer in bytes. The kernel doubles this value (to allow space for bookkeeping overhead) @@ -181,12 +181,12 @@ public: friend class EtchServerSocket; private: - capu::Socket *mSocket; + capu::TcpSocket *mSocket; /** * Constructor */ - EtchSocket(capu::Socket* soc); + EtchSocket(capu::TcpSocket* soc); }; Modified: etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h (original) +++ etch/trunk/binding-cpp/runtime/include/serialization/EtchClass2TypeMap.h Mon Mar 25 09:43:41 2013 @@ -21,6 +21,7 @@ #define __ETCHCLASS2TYPEMAP_H__ #include "common/EtchInt32.h" +#include "common/EtchHashNative.h" #include "serialization/EtchType.h" /** @@ -107,7 +108,7 @@ public: } }; private: - EtchHashTable > mC2T; + EtchHashTable,EtchHashNative > mC2T; capu::bool_t mLocked; Modified: etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h (original) +++ etch/trunk/binding-cpp/runtime/include/serialization/EtchFieldMap.h Mon Mar 25 09:43:41 2013 @@ -21,6 +21,8 @@ #include "common/EtchString.h" #include "common/EtchHashTable.h" +#include "common/EtchComparatorNative.h" +#include "common/EtchHashNative.h" #include "serialization/EtchField.h" /** @@ -92,7 +94,7 @@ public: private: - EtchHashTable mById; + EtchHashTable mById; EtchHashTable mByName; Modified: etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h (original) +++ etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h Mon Mar 25 09:43:41 2013 @@ -84,13 +84,12 @@ public: * Puts an object to EtchStructValue by validating it * @param field field of custom type * @param object value of field that will be added. If object is set to NULL, the field is removed. - * @param result the removed field is put to result (optional) * * @return ETCH_OK if successfully added * ETCH_EINVAL if the level of type is not LEVEL_NONE and the object is NULL * ETCH_ERROR if the level of type is not LEVEL_NONE and the object is not validated and is not NULL */ - status_t put(const EtchField &field, capu::SmartPointer object, capu::SmartPointer *value_old = NULL); + status_t put(const EtchField &field, capu::SmartPointer object); /** * Get value associated with key in the EtchStructValue. @@ -143,7 +142,7 @@ public: EtchLevel getLevel(); typedef EtchHashTable >::Iterator Iterator; - typedef EtchHashTable >::Pair Pair; + typedef EtchHashTable >::HashTableEntry HashTableEntry; /** * @return an iterator which is pointing the beginning of collection @@ -166,7 +165,7 @@ private: static const capu::int64_t serialVersionUID = 1L; //Default size of mTable - static const capu::int32_t DEFAULT_SIZE = ETCH_DEFAULT_STRUCTVALUE_HASH_SIZE; + static const capu::int32_t DEFAULT_SIZE = ETCH_DEFAULT_STRUCTVALUE_HASH_BIT_SIZE; }; Modified: etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeMap.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeMap.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeMap.h (original) +++ etch/trunk/binding-cpp/runtime/include/serialization/EtchTypeMap.h Mon Mar 25 09:43:41 2013 @@ -22,6 +22,8 @@ #include "common/EtchString.h" #include "common/EtchHashTable.h" #include "common/EtchHashSet.h" +#include "common/EtchComparatorNative.h" +#include "common/EtchHashNative.h" #include "serialization/EtchType.h" class EtchTypeMap { @@ -96,7 +98,7 @@ public: private: - EtchHashTable mById; + EtchHashTable mById; EtchHashTable mByName; Modified: etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h (original) +++ etch/trunk/binding-cpp/runtime/include/serialization/EtchValidator.h Mon Mar 25 09:43:41 2013 @@ -103,9 +103,9 @@ public: */ virtual ~EtchValidatorCaches() { capu::List::Iterator iter = mValidatorsCache.begin(); - while(iter.hasNext()) { - ValidatorCache* entry = NULL; - iter.next(&entry); + while(iter != mValidatorsCache.end()) { + ValidatorCache* entry = *iter; + iter++; delete entry; } mValidatorsCache.clear(); @@ -117,16 +117,16 @@ public: capu::SmartPointer* get(EtchRuntime* runtime) { capu::List::Iterator iter = mValidatorsCache.begin(); - while(iter.hasNext()) { - ValidatorCache* entry = NULL; - iter.next(&entry); + while(iter != mValidatorsCache.end()) { + ValidatorCache* entry = *iter; + iter++; if(entry->id == runtime->getId()) { return entry->validators; } } ValidatorCache* entry = new ValidatorCache(); entry->id = runtime->getId(); - mValidatorsCache.add(entry); + mValidatorsCache.insert(entry); return entry->validators; } Modified: etch/trunk/binding-cpp/runtime/include/support/EtchFreePool.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/support/EtchFreePool.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/support/EtchFreePool.h (original) +++ etch/trunk/binding-cpp/runtime/include/support/EtchFreePool.h Mon Mar 25 09:43:41 2013 @@ -29,6 +29,7 @@ namespace capu { class Thread; } +class EtchFreePoolRunnable; /** * A implementation of the free pool. */ @@ -88,11 +89,14 @@ private: capu::bool_t mIsOpen; capu::Mutex mMutex; capu::Thread** mThreads; + EtchFreePoolRunnable** mRunnables; /** * Checks thread list and clean up + */ status_t check(); }; #endif /* __ETCHFREEPOOL_H__ */ + Modified: etch/trunk/binding-cpp/runtime/include/support/EtchQueuedPool.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/support/EtchQueuedPool.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/support/EtchQueuedPool.h (original) +++ etch/trunk/binding-cpp/runtime/include/support/EtchQueuedPool.h Mon Mar 25 09:43:41 2013 @@ -70,7 +70,7 @@ public: status_t add(capu::SmartPointer runnable); private: - capu::int32_t mSizeMax; + capu::uint32_t mSizeMax; capu::bool_t mIsOpen; capu::ThreadPool* mPool; }; Modified: etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h (original) +++ etch/trunk/binding-cpp/runtime/include/transport/EtchTcpListener.h Mon Mar 25 09:43:41 2013 @@ -20,8 +20,8 @@ #ifndef __ETCHTCPLISTENER_H__ #define __ETCHTCPLISTENER_H__ -#include "capu/os/ServerSocket.h" -#include "capu/os/Socket.h" +#include "capu/os/TcpServerSocket.h" +#include "capu/os/TcpSocket.h" #include "capu/util/Runnable.h" #include "common/EtchError.h" Modified: etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h (original) +++ etch/trunk/binding-cpp/runtime/include/transport/EtchTcpTransportFactory.h Mon Mar 25 09:43:41 2013 @@ -143,7 +143,7 @@ private: EtchResources* mResources; capu::bool_t mIsSecure; EtchServerFactory* mSession; - capu::List* mConnectionStacks; + EtchList* mConnectionStacks; }; }; Modified: etch/trunk/binding-cpp/runtime/include/util/EtchUtil.h URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/util/EtchUtil.h?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/include/util/EtchUtil.h (original) +++ etch/trunk/binding-cpp/runtime/include/util/EtchUtil.h Mon Mar 25 09:43:41 2013 @@ -37,6 +37,6 @@ status_t etch_strcpy_s(char *dst, size_t * ETCH_ERROR if length calculation has failed * ETCH_EINVAL if src == NULL */ -status_t etch_strlen_utf8(const char *src, capu::int32_t &length); +status_t etch_strlen_utf8(const char *src, capu::uint32_t &length); #endif Modified: etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt (original) +++ etch/trunk/binding-cpp/runtime/src/main/CMakeLists.txt Mon Mar 25 09:43:41 2013 @@ -17,7 +17,7 @@ # set include dirs include_directories (${PROJECT_SOURCE_DIR}/include) -include_directories (${CAPU}/include/capu) +include_directories (${LIBCAPU_INCLUDE_DIR}) #Add header files SET(MAIN_INCLUDES @@ -240,7 +240,7 @@ add_library (etch-cpp STATIC ) -IF (TARGET_OS STREQUAL "Linux") +IF (TARGET_OS STREQUAL "Linux" AND TARGET_ARCH STREQUAL "X86_64") #build only 32 bit set_target_properties (etch-cpp PROPERTIES COMPILE_FLAGS "-m32 -g" LINK_FLAGS "-m32") ENDIF () Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchObject.cpp Mon Mar 25 09:43:41 2013 @@ -32,8 +32,7 @@ EtchObject::EtchObject(const EtchObject& } const EtchObjectType* EtchObject::getObjectType() const { - const EtchObjectType* ret; - this->mTypes.get(mTypes.size()-1, &ret); + const EtchObjectType* ret = this->mTypes.get(mTypes.size()-1); return ret; } @@ -42,9 +41,9 @@ EtchObject::~EtchObject() { capu::bool_t EtchObject::isInstanceOf(const EtchObjectType* type) const { capu::List::Iterator iter = mTypes.begin(); - while(iter.hasNext()) { - const EtchObjectType* t = NULL; - iter.next(&t); + while(iter != mTypes.end()) { + const EtchObjectType* t = *iter; + iter++; if(t->equals(type)) { return true; } @@ -61,6 +60,6 @@ capu::bool_t EtchObject::equals(const Et } status_t EtchObject::addObjectType(const EtchObjectType* type) { - mTypes.add(type); + mTypes.insert(type); return ETCH_OK; } Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchServerSocket.cpp Mon Mar 25 09:43:41 2013 @@ -46,7 +46,7 @@ status_t EtchServerSocket::close() { } EtchSocket* EtchServerSocket::accept() { - capu::Socket *capu_soc = mServerSocket.accept(); + capu::TcpSocket *capu_soc = mServerSocket.accept(); if(capu_soc == NULL) return NULL; EtchSocket *sock = new EtchSocket(capu_soc); Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp Mon Mar 25 09:43:41 2013 @@ -25,13 +25,13 @@ const EtchObjectType* EtchSocket::TYPE() EtchSocket::EtchSocket() { addObjectType(TYPE()); - mSocket = new capu::Socket(); + mSocket = new capu::TcpSocket(); } -EtchSocket::EtchSocket(capu::Socket* soc) { +EtchSocket::EtchSocket(capu::TcpSocket* soc) { addObjectType(TYPE()); if (soc == NULL) - mSocket = new capu::Socket(); + mSocket = new capu::TcpSocket(); else mSocket = soc; } @@ -48,16 +48,17 @@ status_t EtchSocket::close() { return mSocket->close(); } -status_t EtchSocket::connect(unsigned char* dest_addr, capu::uint16_t port) { +status_t EtchSocket::connect(const char* dest_addr, capu::uint16_t port) { return mSocket->connect(dest_addr, port); } -status_t EtchSocket::receive(unsigned char * buffer, capu::int32_t length, capu::int32_t& numBytes) { +status_t EtchSocket::receive(char * buffer, capu::int32_t length, capu::int32_t& numBytes) { return mSocket->receive(buffer, length, numBytes); } -status_t EtchSocket::send(unsigned char* buffer, capu::int32_t length) { - return mSocket->send(buffer, length); +status_t EtchSocket::send(const char* buffer, capu::int32_t length) { + capu::int32_t numBytes = 0; + return mSocket->send(buffer, length, numBytes); } status_t EtchSocket::setBufferSize(capu::int32_t bufferSize) { Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/common/EtchString.cpp Mon Mar 25 09:43:41 2013 @@ -17,6 +17,7 @@ */ #include "capu/os/StringUtils.h" +#include "capu/os/Memory.h" #include "common/EtchString.h" #include "util/EtchUtil.h" @@ -57,7 +58,7 @@ EtchString::EtchString(const capu::int8_ //utf8 // TODO: refactor this an use a utf-8 strncpy function from capu mData = new char[bufferSize + 1]; - capu::StringUtils::Strncpy(mData, bufferSize, (const char*)buffer); + capu::Memory::Copy(mData, (const char*)buffer, bufferSize); mData [bufferSize] = 0x0; } } else { @@ -172,7 +173,7 @@ capu::int32_t EtchString::length() const if (mEncoding != ENCODING_UTF8) { return capu::StringUtils::Strlen(mData); } else { - capu::int32_t result = 0; + capu::uint32_t result = 0; etch_strlen_utf8(mData, result); return result; } Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedData.cpp Mon Mar 25 09:43:41 2013 @@ -106,21 +106,21 @@ capu::int8_t EtchBinaryTaggedData::check } capu::int8_t EtchBinaryTaggedData::checkShort(capu::int16_t v) { - if ((v >= capu::NumericLimitMin()) && (v <= capu::NumericLimitMax())) + if ((v >= capu::NumericLimits::Min()) && (v <= capu::NumericLimits::Max())) return checkByte((capu::int8_t) v); return EtchTypeCode::SHORT; } capu::int8_t EtchBinaryTaggedData::checkInteger(capu::int32_t v) { - if ((v >= capu::NumericLimitMin()) && (v <= capu::NumericLimitMax())) + if ((v >= capu::NumericLimits::Min()) && (v <= capu::NumericLimits::Max())) return checkShort((capu::int16_t) v); return EtchTypeCode::INT; } capu::int8_t EtchBinaryTaggedData::checkLong(capu::int64_t v) { - if (v >= capu::NumericLimitMin() && v <= capu::NumericLimitMax()) + if (v >= capu::NumericLimits::Min() && v <= capu::NumericLimits::Max()) return checkInteger((capu::int32_t) v); return EtchTypeCode::LONG; Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchBinaryTaggedDataOutput.cpp Mon Mar 25 09:43:41 2013 @@ -127,13 +127,13 @@ status_t EtchBinaryTaggedDataOutput::wri status_t ret; EtchType* t = sv->getType(); EtchStructValue::Iterator it = sv->begin(); - EtchStructValue::Pair pair; + EtchStructValue::HashTableEntry entry; capu::SmartPointer tmp; while (it.hasNext()) { - if (it.next(&pair) == ETCH_OK) { + if (it.next(&entry) == ETCH_OK) { - EtchField f = pair.first; + EtchField f = entry.key; ret = writeField(&f); if (ret != ETCH_OK) { @@ -145,13 +145,14 @@ status_t EtchBinaryTaggedDataOutput::wri return ETCH_ERROR; } - ret = writeValue(tmp, pair.second); + ret = writeValue(tmp, entry.value); if (ret != ETCH_OK) { return ETCH_ERROR; } } else { return ETCH_ERROR; } + } return ETCH_OK; } Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchClass2TypeMap.cpp Mon Mar 25 09:43:41 2013 @@ -22,7 +22,7 @@ #include "serialization/EtchClass2TypeMap.h" EtchClass2TypeMap::EtchClass2TypeMap() -: mC2T(ETCH_DEFAULT_C2TYPEMAP_HASH_SIZE), mLocked(false) { +: mC2T(ETCH_DEFAULT_C2TYPEMAP_HASH_BIT_SIZE), mLocked(false) { } EtchClass2TypeMap::~EtchClass2TypeMap() { Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchFieldMap.cpp Mon Mar 25 09:43:41 2013 @@ -20,7 +20,7 @@ #include "serialization/EtchFieldMap.h" EtchFieldMap::EtchFieldMap() -: mById(ETCH_DEFAULT_FIELDMAP_HASH_SIZE), mByName(ETCH_DEFAULT_FIELDMAP_HASH_SIZE), mLocked(false) { +: mById(ETCH_DEFAULT_FIELDMAP_HASH_BIT_SIZE), mByName(ETCH_DEFAULT_FIELDMAP_HASH_BIT_SIZE), mLocked(false) { } Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchHashTableSerializer.cpp Mon Mar 25 09:43:41 2013 @@ -45,13 +45,13 @@ status_t EtchHashTableSerializer::export EtchHashTable, capu::SmartPointer >::Iterator it = table->begin(); capu::SmartPointer > > keysAndValuesArray = new EtchNativeArray > (table->count()*2); capu::int32_t i = 0; - EtchHashTable, capu::SmartPointer >::Pair ptr; + EtchHashTable, capu::SmartPointer >::HashTableEntry entry; while (it.hasNext()) { - it.next(&ptr); - keysAndValuesArray->set(i, ptr.first); + it.next(&entry); + keysAndValuesArray->set(i, entry.key); i++; - keysAndValuesArray->set(i, ptr.second); + keysAndValuesArray->set(i, entry.value); i++; } Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp Mon Mar 25 09:43:41 2013 @@ -41,12 +41,10 @@ EtchStructValue::~EtchStructValue() { } -status_t EtchStructValue::put(const EtchField &field, capu::SmartPointer object, capu::SmartPointer *old_value) { +status_t EtchStructValue::put(const EtchField &field, capu::SmartPointer object) { if (object.get() == NULL) { capu::SmartPointer tmp; status_t result = remove(field, &tmp); - if (old_value != NULL) - *old_value = tmp; return result; } if (mLevel != LEVEL_NONE) { @@ -60,7 +58,7 @@ status_t EtchStructValue::put(const Etch if ((v.get() != NULL) && (!v->validate(object))) return ETCH_EINVAL; } - return mTable.put(field, object, old_value); + return mTable.put(field, object); } EtchType* EtchStructValue::getType() { @@ -84,12 +82,7 @@ capu::uint32_t EtchStructValue::count() } status_t EtchStructValue::clear() { - EtchHashTable >::Iterator it = mTable.begin(); - EtchHashTable >::Pair pair; - while (it.hasNext()) { - it.next(&pair); - pair.second = NULL; - } + mTable.clear(); return ETCH_OK; } @@ -102,7 +95,6 @@ EtchStructValue::Iterator EtchStructValu return mTable.begin(); } - capu::bool_t EtchStructValue::isEmpty() { if(mTable.count() == 0) { Modified: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp Mon Mar 25 09:43:41 2013 @@ -24,26 +24,26 @@ const EtchObjectType* EtchType::TYPE() { return &TYPE; } EtchType::EtchType() -: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(0), mTimeout(0), mName(""), mSuperType(NULL), mResultType(NULL), +: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_BIT_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) -: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mTimeout(0), mName(name), mSuperType(NULL), +: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_BIT_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) -: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(id), mTimeout(0), mName(name), mSuperType(NULL), +: mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_BIT_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), mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_SIZE), mId(other.mId), mTimeout(other.mTimeout), mName(other.mName), mSuperType(other.mSuperType), + : EtchObject(other), mValidatorMap(ETCH_DEFAULT_TYPEVALIDATOR_HASH_BIT_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: etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp?rev=1460566&r1=1460565&r2=1460566&view=diff ============================================================================== --- etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp (original) +++ etch/trunk/binding-cpp/runtime/src/main/serialization/EtchTypeMap.cpp Mon Mar 25 09:43:41 2013 @@ -22,16 +22,16 @@ // TODO: Check memory handling EtchTypeMap::EtchTypeMap() -: mById(ETCH_DEFAULT_TYPEMAP_HASH_SIZE), mByName(ETCH_DEFAULT_TYPEMAP_HASH_SIZE), mLocked(false) { +: mById(ETCH_DEFAULT_TYPEMAP_HASH_BIT_SIZE), mByName(ETCH_DEFAULT_TYPEMAP_HASH_BIT_SIZE), mLocked(false) { } EtchTypeMap::~EtchTypeMap() { - EtchHashTable::Iterator it = mById.begin(); + EtchHashTable::Iterator it = mById.begin(); while (it.hasNext()) { - capu::Pair pair; - it.next(&pair); - if (pair.second != NULL) { - delete pair.second; + EtchHashTable::HashTableEntry entry; + it.next(&entry); + if (entry.value != NULL) { + delete entry.value; } } mById.clear(); @@ -89,20 +89,20 @@ status_t EtchTypeMap::getAll(EtchHashSet if (set == NULL) return ETCH_EINVAL; EtchHashTable::Iterator it = mByName.begin(); - EtchHashTable::Pair pair; + EtchHashTable::HashTableEntry entry; while (it.hasNext()) { - it.next(&pair); - set->put(pair.second); + it.next(&entry); + set->put(entry.value); } return ETCH_OK; } void EtchTypeMap::clear() { EtchHashTable::Iterator it = mByName.begin(); - EtchHashTable::Pair pair; + EtchHashTable::HashTableEntry entry; while (it.hasNext()) { - it.next(&pair); - delete pair.second; + it.next(&entry); + delete entry.value; } mByName.clear(); mById.clear();