[hydra-commits] kpfleming: branch techdemo/kpfleming/slicing r566 - in /techdemo/team/kpflemi...

SVN commits to the Hydra project hydra-commits at lists.digium.com
Thu Apr 8 17:35:39 CDT 2010


Author: kpfleming
Date: Thu Apr  8 17:35:39 2010
New Revision: 566

URL: https://origsvn.digium.com/svn-view/hydra?view=rev&rev=566
Log:
massive work in progress commit

Added:
    techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt   (with props)
    techdemo/team/kpfleming/slicing/exceptions/TestCommon.h   (with props)
Removed:
    techdemo/team/kpfleming/slicing/exceptions/Makefile
    techdemo/team/kpfleming/slicing/objects/Makefile
Modified:
    techdemo/team/kpfleming/slicing/CMakeLists.txt
    techdemo/team/kpfleming/slicing/build/   (props changed)
    techdemo/team/kpfleming/slicing/objects/CMakeLists.txt
    techdemo/team/kpfleming/slicing/objects/ClientPrivate.ice
    techdemo/team/kpfleming/slicing/objects/Server.cpp
    techdemo/team/kpfleming/slicing/objects/TestI.cpp
    techdemo/team/kpfleming/slicing/objects/TestI.h

Modified: techdemo/team/kpfleming/slicing/CMakeLists.txt
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/CMakeLists.txt?view=diff&rev=566&r1=565&r2=566
==============================================================================
--- techdemo/team/kpfleming/slicing/CMakeLists.txt (original)
+++ techdemo/team/kpfleming/slicing/CMakeLists.txt Thu Apr  8 17:35:39 2010
@@ -2,3 +2,4 @@
 include(cmake/Hydra_v3.cmake)
 hydra_project(slicing 3.4 CXX)
 add_subdirectory(objects)
+add_subdirectory(exceptions)

Propchange: techdemo/team/kpfleming/slicing/build/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Apr  8 17:35:39 2010
@@ -1,0 +1,1 @@
+*

Added: techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt?view=auto&rev=566
==============================================================================
--- techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt (added)
+++ techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt Thu Apr  8 17:35:39 2010
@@ -1,0 +1,27 @@
+hydra_slice_include_directories(.)
+hydra_compile_slice(exc_Test SOURCES Test.ice)
+hydra_compile_slice(exc_TestAMD SOURCES TestAMD.ice)
+hydra_compile_slice(exc_ServerPrivate SOURCES ServerPrivate.ice)
+hydra_compile_slice(exc_ServerPrivateAMD SOURCES ServerPrivateAMD.ice)
+
+include_directories(.)
+
+hydra_component_init(exc_client CXX)
+hydra_component_add_file(exc_client Client.cpp)
+hydra_component_add_file(exc_client AllTests.cpp)
+hydra_component_add_slice(exc_client exc_Test)
+hydra_component_build_standalone(exc_client)
+
+hydra_component_init(exc_server CXX)
+hydra_component_add_file(exc_server Server.cpp)
+hydra_component_add_file(exc_server TestI.cpp)
+hydra_component_add_slice(exc_server exc_Test)
+hydra_component_add_slice(exc_server exc_ServerPrivate)
+hydra_component_build_standalone(exc_server)
+
+hydra_component_init(exc_serveramd CXX)
+hydra_component_add_file(exc_serveramd ServerAMD.cpp)
+hydra_component_add_file(exc_serveramd TestAMDI.cpp)
+hydra_component_add_slice(exc_serveramd exc_TestAMD)
+hydra_component_add_slice(exc_serveramd exc_ServerPrivateAMD)
+hydra_component_build_standalone(exc_serveramd)

Propchange: techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: techdemo/team/kpfleming/slicing/exceptions/CMakeLists.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: techdemo/team/kpfleming/slicing/exceptions/TestCommon.h
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/exceptions/TestCommon.h?view=auto&rev=566
==============================================================================
--- techdemo/team/kpfleming/slicing/exceptions/TestCommon.h (added)
+++ techdemo/team/kpfleming/slicing/exceptions/TestCommon.h Thu Apr  8 17:35:39 2010
@@ -1,0 +1,30 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_COMMON_H
+#define TEST_COMMON_H
+
+#include <IceUtil/Config.h>
+#include <cstdlib>
+
+#ifdef __BCPLUSPLUS__
+#include <stdlib.h>
+#endif
+
+void
+inline testFailed(const char* expr, const char* file, unsigned int line)
+{
+    std::cout << "failed!" << std::endl;
+    std::cout << file << ':' << line << ": assertion `" << expr << "' failed" << std::endl;
+    abort();
+}
+
+#define test(ex) ((ex) ? ((void)0) : testFailed(#ex, __FILE__, __LINE__))
+
+#endif

Propchange: techdemo/team/kpfleming/slicing/exceptions/TestCommon.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: techdemo/team/kpfleming/slicing/exceptions/TestCommon.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: techdemo/team/kpfleming/slicing/exceptions/TestCommon.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: techdemo/team/kpfleming/slicing/objects/CMakeLists.txt
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/objects/CMakeLists.txt?view=diff&rev=566&r1=565&r2=566
==============================================================================
--- techdemo/team/kpfleming/slicing/objects/CMakeLists.txt (original)
+++ techdemo/team/kpfleming/slicing/objects/CMakeLists.txt Thu Apr  8 17:35:39 2010
@@ -1,33 +1,33 @@
 hydra_slice_include_directories(.)
-hydra_compile_slice(Test.ice)
-hydra_compile_slice(TestAMD.ice)
-hydra_compile_slice(ClientPrivate.ice)
-hydra_compile_slice(Forward.ice)
-hydra_compile_slice(ServerPrivate.ice)
-hydra_compile_slice(ServerPrivateAMD.ice)
+hydra_compile_slice(obj_Test SOURCES Test.ice)
+hydra_compile_slice(obj_TestAMD SOURCES TestAMD.ice)
+hydra_compile_slice(obj_ClientPrivate SOURCES ClientPrivate.ice)
+hydra_compile_slice(obj_Forward SOURCES Forward.ice)
+hydra_compile_slice(obj_ServerPrivate SOURCES ServerPrivate.ice)
+hydra_compile_slice(obj_ServerPrivateAMD SOURCES ServerPrivateAMD.ice)
 
 include_directories(.)
 
-hydra_component_init(client CXX)
-hydra_component_add_file(client Client.cpp)
-hydra_component_add_file(client AllTests.cpp)
-hydra_component_add_slice(client Test)
-hydra_component_add_slice(client Forward)
-hydra_component_add_slice(client ClientPrivate)
-hydra_component_build_standalone(client)
+hydra_component_init(obj_client CXX)
+hydra_component_add_file(obj_client Client.cpp)
+hydra_component_add_file(obj_client AllTests.cpp)
+hydra_component_add_slice(obj_client obj_Test)
+hydra_component_add_slice(obj_client obj_Forward)
+hydra_component_add_slice(obj_client obj_ClientPrivate)
+hydra_component_build_standalone(obj_client)
 
-hydra_component_init(server CXX)
-hydra_component_add_file(server Server.cpp)
-hydra_component_add_file(server TestI.cpp)
-hydra_component_add_slice(server Test)
-hydra_component_add_slice(server Forward)
-hydra_component_add_slice(server ServerPrivate)
-hydra_component_build_standalone(server)
+hydra_component_init(obj_server CXX)
+hydra_component_add_file(obj_server Server.cpp)
+hydra_component_add_file(obj_server TestI.cpp)
+hydra_component_add_slice(obj_server obj_Test)
+hydra_component_add_slice(obj_server obj_Forward)
+hydra_component_add_slice(obj_server obj_ServerPrivate)
+hydra_component_build_standalone(obj_server)
 
-hydra_component_init(serveramd CXX)
-hydra_component_add_file(serveramd ServerAMD.cpp)
-hydra_component_add_file(serveramd TestAMDI.cpp)
-hydra_component_add_slice(serveramd TestAMD)
-hydra_component_add_slice(serveramd Forward)
-hydra_component_add_slice(serveramd ServerPrivateAMD)
-hydra_component_build_standalone(serveramd)
+hydra_component_init(obj_serveramd CXX)
+hydra_component_add_file(obj_serveramd ServerAMD.cpp)
+hydra_component_add_file(obj_serveramd TestAMDI.cpp)
+hydra_component_add_slice(obj_serveramd obj_TestAMD)
+hydra_component_add_slice(obj_serveramd obj_Forward)
+hydra_component_add_slice(obj_serveramd obj_ServerPrivateAMD)
+hydra_component_build_standalone(obj_serveramd)

Modified: techdemo/team/kpfleming/slicing/objects/ClientPrivate.ice
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/objects/ClientPrivate.ice?view=diff&rev=566&r1=565&r2=566
==============================================================================
--- techdemo/team/kpfleming/slicing/objects/ClientPrivate.ice (original)
+++ techdemo/team/kpfleming/slicing/objects/ClientPrivate.ice Thu Apr  8 17:35:39 2010
@@ -21,6 +21,12 @@
     B pd3;
 };
 
+class D5 extends B
+{
+    string sd3;
+    B pd3;
+};
+
 };
 
 #endif

Modified: techdemo/team/kpfleming/slicing/objects/Server.cpp
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/objects/Server.cpp?view=diff&rev=566&r1=565&r2=566
==============================================================================
--- techdemo/team/kpfleming/slicing/objects/Server.cpp (original)
+++ techdemo/team/kpfleming/slicing/objects/Server.cpp Thu Apr  8 17:35:39 2010
@@ -15,11 +15,11 @@
 int
 run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
 {
-    Ice::PropertiesPtr properties = communicator->getProperties();
+    Ice::PropertiesPtr properties(communicator->getProperties());
     properties->setProperty("Ice.Warn.Dispatch", "0");
     communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
-    Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
-    Ice::ObjectPtr object = new TestI();
+    Ice::ObjectAdapterPtr adapter(communicator->createObjectAdapter("TestAdapter"));
+    Ice::ObjectPtr object(new TestI(communicator));
     adapter->add(object, communicator->stringToIdentity("Test"));
     adapter->activate();
     communicator->waitForShutdown();

Modified: techdemo/team/kpfleming/slicing/objects/TestI.cpp
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/objects/TestI.cpp?view=diff&rev=566&r1=565&r2=566
==============================================================================
--- techdemo/team/kpfleming/slicing/objects/TestI.cpp (original)
+++ techdemo/team/kpfleming/slicing/objects/TestI.cpp Thu Apr  8 17:35:39 2010
@@ -13,8 +13,19 @@
 
 using namespace Test;
 
-TestI::TestI()
-{
+class BPreserverFactory : public Ice::ObjectFactory
+{
+public:
+	virtual Ice::ObjectPtr create(const std::string& type) {
+		std::cout << __FUNCTION__ << " returning object requested for type " << type << std::endl << std::flush;
+		return new B();
+	}
+	virtual void destroy() {}
+};
+
+TestI::TestI(const Ice::CommunicatorPtr& communicator)
+{
+	communicator->addObjectFactory(new BPreserverFactory, "::Test::B");
 }
 
 Ice::ObjectPtr
@@ -342,3 +353,18 @@
 {
     current.adapter->getCommunicator()->shutdown();
 }
+
+void
+BPreserver::__write(IceInternal::BasicStream *stream) const
+{
+	stream->writeBlob(__skippedSlices);
+	B::__write(stream);
+}
+
+void
+BPreserver::__read(IceInternal::BasicStream* stream, bool rid)
+{
+	stream->readSkippedSliceBlob(__skippedSlices);
+	std::cout << __FUNCTION__ << " got blob of length " << __skippedSlices.size() << std::endl << std::flush;
+	B::__read(stream, rid);
+}

Modified: techdemo/team/kpfleming/slicing/objects/TestI.h
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/objects/TestI.h?view=diff&rev=566&r1=565&r2=566
==============================================================================
--- techdemo/team/kpfleming/slicing/objects/TestI.h (original)
+++ techdemo/team/kpfleming/slicing/objects/TestI.h Thu Apr  8 17:35:39 2010
@@ -13,11 +13,21 @@
 #include <ServerPrivate.h>
 #include <Forward.h>
 
+#include <vector>
+
+class BPreserver : virtual public Test::B
+{
+public:
+    virtual void __write(IceInternal::BasicStream*) const;
+    virtual void __read(IceInternal::BasicStream*, bool);
+    ::std::vector< ::Ice::Byte > __skippedSlices;
+};
+
 class TestI : virtual public Test::TestIntf
 {
 public:
 
-    TestI();
+    TestI(const Ice::CommunicatorPtr&);
 
     virtual ::Ice::ObjectPtr SBaseAsObject(const ::Ice::Current&);
     virtual ::Test::SBasePtr SBaseAsSBase(const ::Ice::Current&);





More information about the asterisk-scf-commits mailing list