diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/demo/Ice/value/.depend | 4 | ||||
-rw-r--r-- | cpp/demo/Ice/value/Client.cpp | 2 | ||||
-rw-r--r-- | cpp/demo/Ice/value/ServantFactory.cpp | 2 | ||||
-rw-r--r-- | cpp/doc/Makefile | 2 | ||||
-rw-r--r-- | cpp/slice/Ice/Logger.ice | 39 | ||||
-rw-r--r-- | cpp/slice/Ice/Pickler.ice | 42 | ||||
-rw-r--r-- | cpp/slice/Ice/ServantFactory.ice | 31 | ||||
-rw-r--r-- | cpp/test/Ice/faultTolerance/Client.cpp | 2 | ||||
-rw-r--r-- | cpp/test/Ice/locationForward/Client.cpp | 2 |
9 files changed, 117 insertions, 9 deletions
diff --git a/cpp/demo/Ice/value/.depend b/cpp/demo/Ice/value/.depend index 22dafefb219..ab3b752f4b5 100644 --- a/cpp/demo/Ice/value/.depend +++ b/cpp/demo/Ice/value/.depend @@ -1,5 +1,5 @@ Value.o: Value.cpp Value.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Shared.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h ValueI.o: ValueI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../../include/Ice/InstanceF.h ValueI.h Value.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h -Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../../include/Ice/InstanceF.h Value.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h Factory.h -Factory.o: Factory.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../../include/Ice/InstanceF.h Factory.h ValueI.h Value.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h +Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../../include/Ice/InstanceF.h Value.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ServantFactory.h +ServantFactory.o: ServantFactory.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../../include/Ice/InstanceF.h ServantFactory.h ValueI.h Value.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../../include/Ice/InstanceF.h ValueI.h Value.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h diff --git a/cpp/demo/Ice/value/Client.cpp b/cpp/demo/Ice/value/Client.cpp index c64f4aeea14..dfa25b03420 100644 --- a/cpp/demo/Ice/value/Client.cpp +++ b/cpp/demo/Ice/value/Client.cpp @@ -10,7 +10,7 @@ #include <Ice/Ice.h> #include <Value.h> -#include <Factory.h> +#include <ServantFactory.h> using namespace std; diff --git a/cpp/demo/Ice/value/ServantFactory.cpp b/cpp/demo/Ice/value/ServantFactory.cpp index a94b94dec81..4d8e3398c52 100644 --- a/cpp/demo/Ice/value/ServantFactory.cpp +++ b/cpp/demo/Ice/value/ServantFactory.cpp @@ -9,7 +9,7 @@ // ********************************************************************** #include <Ice/Ice.h> -#include <Factory.h> +#include <ServantFactory.h> #include <ValueI.h> using namespace std; diff --git a/cpp/doc/Makefile b/cpp/doc/Makefile index afacb76910d..2f63c4f482c 100644 --- a/cpp/doc/Makefile +++ b/cpp/doc/Makefile @@ -24,7 +24,7 @@ ICEFILES = ../slice/Ice/Communicator.ice \ ../slice/Ice/ObjectAdapter.ice \ ../slice/Ice/Pickler.ice \ ../slice/Ice/Properties.ice \ - ../slice/Ice/ValueFactory.ice + ../slice/Ice/ServantFactory.ice ICEPACKFILES = ../slice/IcePack/Admin.ice diff --git a/cpp/slice/Ice/Logger.ice b/cpp/slice/Ice/Logger.ice index b9d738c5439..01c527296c4 100644 --- a/cpp/slice/Ice/Logger.ice +++ b/cpp/slice/Ice/Logger.ice @@ -14,10 +14,49 @@ module Ice { +/** + * + * The Ice message logger. Applications can provide their own logger + * by implementing this interface and installing it with with a + * Communicator. + * + * @see Communicator::getLogger + * @see Communicator::setLogger + * + **/ local class Logger { + /** + * + * Log trace messages. + * + * @param category The trace category. + * + * @param message The trace message to log. + * + **/ void trace(string category, string message); + + /** + * + * Log warning messages. + * + * @param message The warning message to log. + * + * @see error + * + **/ void warning(string message); + + /** + * + * Log error messages. + * + * @param message The error message to log. + * + * @see warning + * + **/ void error(string message); }; diff --git a/cpp/slice/Ice/Pickler.ice b/cpp/slice/Ice/Pickler.ice index c3fa95083d4..334256a7400 100644 --- a/cpp/slice/Ice/Pickler.ice +++ b/cpp/slice/Ice/Pickler.ice @@ -17,9 +17,49 @@ module Ice native InputStream; native OutputStream; +/** + * + * A simple object serializer. Servants can be written to a native + * ioutput stream type, and read from a native input stream type. For + * C++, the output stream type is <literal>std::ostream</literal> and + * the input stream type is <literal>std::istream</literal>. + * + * <note><para>For more sophisticated object persistence, you should + * use the Freeze module.</para></note> + * + * @see Communicator::getPickler + * + **/ local class Pickler { - void pickle(Object object, OutputStream out); + /** + * + * Write ("pickle") a Servant to an output stream. + * + * @param servant The Servant to write. + * + * @param out The output stream. + * + * @see unpickle + * + **/ + void pickle(Object servant, OutputStream out); + + /** + * + * Read ("unpickle") a Servant from an input stream. A suitable + * Servant Factory for the Servant's type must be installed. + * + * @param type The servant's type. + * + * @param in The input stream. + * + * @return The Servant that has been read from the input stream. + * + * @see pickle + * @see ServantFactory + * + **/ Object unpickle(string type, InputStream in); }; diff --git a/cpp/slice/Ice/ServantFactory.ice b/cpp/slice/Ice/ServantFactory.ice index b277df47685..3739283bee9 100644 --- a/cpp/slice/Ice/ServantFactory.ice +++ b/cpp/slice/Ice/ServantFactory.ice @@ -14,9 +14,38 @@ module Ice { +/** + * + * A factory for Servants. Servant Factories are used in several + * places, for example, for receiving "objects by value", for + * unpickling Servants, and for the Freeze module. Servant Factories + * must be implemented by the application writer, and installed with + * the Communicator. + * + * @see Communicator::installServantFactory + * @see Pickler + * + **/ local class ServantFactory { - Object create(string id); + /** + * + * Create a new Servant for a given Servant type. The type is the + * absolute Slice type name, i.e., the the name relative to the + * unnamed top-level Slice module. For example, the absolute Slice + * type name for Servants for classes of type + * <literal>Bar</literal> in the module <literal>Foo</literal> is + * <literal>::Foo::Bar</literal>. + * + * <note><para>The leading "<literal>::</literal>" is + * required.</para></note> + * + * @param type The Servant type. + * + * @return The Servant created for the given type. + * + **/ + Object create(string type); }; }; diff --git a/cpp/test/Ice/faultTolerance/Client.cpp b/cpp/test/Ice/faultTolerance/Client.cpp index fcedc08778c..59c8c3e06e7 100644 --- a/cpp/test/Ice/faultTolerance/Client.cpp +++ b/cpp/test/Ice/faultTolerance/Client.cpp @@ -43,7 +43,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) return EXIT_FAILURE; } - void allTests(const Ice::CommunicatorPtr, const vector<int>&&); + void allTests(const Ice::CommunicatorPtr&, const vector<int>&); allTests(communicator, ports); return EXIT_SUCCESS; } diff --git a/cpp/test/Ice/locationForward/Client.cpp b/cpp/test/Ice/locationForward/Client.cpp index 15b528933fb..365b4475e57 100644 --- a/cpp/test/Ice/locationForward/Client.cpp +++ b/cpp/test/Ice/locationForward/Client.cpp @@ -57,7 +57,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) return EXIT_FAILURE; } - void allTests(const Ice::CommunicatorPtr, int, int&); + void allTests(const Ice::CommunicatorPtr&, int, int); allTests(communicator, port, lastPort); return EXIT_SUCCESS; } |