diff --git a/README.md b/README.md index 4161caf5c35..ddc180f28d5 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ languages. ## Building Ice from source -[C++](cpp) | [C#](csharp) | [Java](java) | [JavaScript/TypeScript](js) | [MATLAB](matlab) | [Objective-C](objective-c) | [PHP](php) | [Python](python) | [Ruby](ruby) | [Swift](swift) +[C++](cpp/BUILDING.md) | [C#](csharp/BUILDING.md) | [Java](java) | [JavaScript/TypeScript](js) | [MATLAB](matlab) | [Objective-C](objective-c) | [PHP](php) | [Python](python) | [Ruby](ruby) | [Swift](swift) ## Copyright and license diff --git a/cpp/README.md b/cpp/README.md index b99198a67cb..048641540de 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -6,10 +6,11 @@ The [Ice framework] provides everything you need to build networked applications Ice for C++ is the C++ implementation of Ice. -## Sample Code C++11 mapping +## Sample Code with the Ice C++11 Mapping ```slice // Slice definitions (Hello.ice) + #pragma once module Demo @@ -23,6 +24,7 @@ module Demo ```cpp // Client application (Client.cpp) + #include #include @@ -48,20 +50,19 @@ main(int argc, char* argv[]) ``` ```cpp -// Server application +// Server application (Server.cpp) + #include #include using namespace std; -int -main(int argc, char* argv[]) +int main(int argc, char* argv[]) { try { - // - // CtrlCHandler must be created before the communicator or any other threads are started - // + // CtrlCHandler must be created before the communicator or any other threads + // are started Ice::CtrlCHandler ctrlCHandler; const Ice::CommunicatorHolder ich(argc, argv); @@ -73,7 +74,9 @@ main(int argc, char* argv[]) communicator->shutdown(); }); - auto adapter = communicator->createObjectAdapterWithEndpoints("Hello", "default -h localhost -p 10000"); + auto adapter = communicator->createObjectAdapterWithEndpoints( + "Hello", + "default -h localhost -p 10000"); adapter->add(make_shared(), Ice::stringToIdentity("hello")); adapter->activate(); communicator->waitForShutdown(); @@ -88,7 +91,7 @@ main(int argc, char* argv[]) ``` ```cpp -// Printer.h +// Printer implementation (Printer.h) #include #include @@ -106,10 +109,11 @@ public: } ``` -## Sample Code C++98 mapping +## Sample Code with the Ice C++98 Mapping ```slice // Slice definitions (Hello.ice) + #pragma once module Demo @@ -123,19 +127,20 @@ module Demo ```cpp // Client application (Client.cpp) + #include #include using namespace std; using namespace Demo; -int -main(int argc, char* argv[]) +int main(int argc, char* argv[]) { try { Ice::CommunicatorHolder ich(argc, argv); - HelloPrx hello = HelloPrx::checkedCast(ich->stringToProxy("hello:default -h localhost -p 10000")); + HelloPrx hello = HelloPrx::checkedCast( + ich->stringToProxy("hello:default -h localhost -p 10000")); hello->sayHello(); } catch(const std::exception& ex) @@ -148,20 +153,21 @@ main(int argc, char* argv[]) ``` ```cpp -// Server application +// Server application (Server.cpp) + #include #include using namespace std; -int -main(int argc, char* argv[]) +int main(int argc, char* argv[]) { try { Ice::CommunicatorHolder ich(argc, argv); - Ice::ObjectAdapterPtr adapter = - ich->createObjectAdapterWithEndpoints("Hello", "default -h localhost -p 10000"); + Ice::ObjectAdapterPtr adapter = ich->createObjectAdapterWithEndpoints( + "Hello", + "default -h localhost -p 10000"); adapter->add(new HelloI, Ice::stringToIdentity("hello")); adapter->activate(); ich->waitForShutdown(); @@ -176,7 +182,7 @@ main(int argc, char* argv[]) ``` ```cpp -// Printer.h +// Printer implementation (Printer.h) #include #include @@ -201,4 +207,4 @@ public: [NuGet packages]: https://www.nuget.org/packages?q=zeroc.ice.v [Documentation]: https://doc.zeroc.com/ice/3.7 [Building from source]: https://github.com/zeroc-ice/ice/blob/3.7/cpp/BUILDING.md -[Ice framework]: https://github.com/zeroc-ice/ice \ No newline at end of file +[Ice framework]: https://github.com/zeroc-ice/ice diff --git a/cpp/msbuild/zeroc.ice.v100.nuspec b/cpp/msbuild/zeroc.ice.v100.nuspec index 38fd9208d50..a51a8e9f82d 100644 --- a/cpp/msbuild/zeroc.ice.v100.nuspec +++ b/cpp/msbuild/zeroc.ice.v100.nuspec @@ -10,7 +10,7 @@ https://github.com/zeroc-ice/ice logo.png false - Ice C++ SDK for Visual Studio 2010 (v100). Ice is a comprehensive RPC framework that helps you network your software with minimal effort. + Ice C++ SDK for Visual Studio 2010 (v100). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more. https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes ice native rpc v100 zeroc diff --git a/cpp/msbuild/zeroc.ice.v120.nuspec b/cpp/msbuild/zeroc.ice.v120.nuspec index 062619fd285..03509bc5b13 100644 --- a/cpp/msbuild/zeroc.ice.v120.nuspec +++ b/cpp/msbuild/zeroc.ice.v120.nuspec @@ -10,7 +10,7 @@ https://github.com/zeroc-ice/ice logo.png false - Ice C++ SDK for Visual Studio 2013 (v120). Ice is a comprehensive RPC framework that helps you network your software with minimal effort. + Ice C++ SDK for Visual Studio 2013 (v120). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more. https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes ice native rpc v120 zeroc README.md diff --git a/cpp/msbuild/zeroc.ice.v140.nuspec b/cpp/msbuild/zeroc.ice.v140.nuspec index 8ca645ebe86..750fcf9dcdb 100644 --- a/cpp/msbuild/zeroc.ice.v140.nuspec +++ b/cpp/msbuild/zeroc.ice.v140.nuspec @@ -10,7 +10,7 @@ https://github.com/zeroc-ice/ice logo.png false - Ice C++ SDK for Visual Studio 2015 (v140). Ice is a comprehensive RPC framework that helps you network your software with minimal effort. + Ice C++ SDK for Visual Studio 2015 (v140). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more. https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes ice native rpc v140 zeroc README.md diff --git a/cpp/msbuild/zeroc.ice.v141.nuspec b/cpp/msbuild/zeroc.ice.v141.nuspec index 87ea8a59eb3..c6f94ba4ced 100644 --- a/cpp/msbuild/zeroc.ice.v141.nuspec +++ b/cpp/msbuild/zeroc.ice.v141.nuspec @@ -10,7 +10,7 @@ https://github.com/zeroc-ice/ice logo.png false - Ice C++ SDK for Visual Studio 2017 (v141). Ice is a comprehensive RPC framework that helps you network your software with minimal effort. + Ice C++ SDK for Visual Studio 2017 (v141). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more. https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes ice native rpc v141 zeroc README.md diff --git a/cpp/msbuild/zeroc.ice.v142.nuspec b/cpp/msbuild/zeroc.ice.v142.nuspec index 6ac724a4c9d..a959b9d8fb3 100644 --- a/cpp/msbuild/zeroc.ice.v142.nuspec +++ b/cpp/msbuild/zeroc.ice.v142.nuspec @@ -10,7 +10,7 @@ https://github.com/zeroc-ice/ice logo.png false - Ice C++ SDK for Visual Studio 2019 (v142). Ice is a comprehensive RPC framework that helps you network your software with minimal effort. + Ice C++ SDK for Visual Studio 2019 (v142). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more. https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes ice native rpc v141 zeroc README.md diff --git a/cpp/msbuild/zeroc.ice.v143.nuspec b/cpp/msbuild/zeroc.ice.v143.nuspec index 54c7dc27ed5..2f19e9a5e9b 100644 --- a/cpp/msbuild/zeroc.ice.v143.nuspec +++ b/cpp/msbuild/zeroc.ice.v143.nuspec @@ -10,7 +10,7 @@ https://github.com/zeroc-ice/ice logo.png false - Ice C++ SDK for Visual Studio 2022 (v143). Ice is a comprehensive RPC framework that helps you network your software with minimal effort. + Ice C++ SDK for Visual Studio 2022 (v143). The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more. https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes ice native rpc v141 zeroc README.md