Skip to content

Commit

Permalink
Add packages README for C++ NuGet packages (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Oct 6, 2023
1 parent 6b2cf32 commit 42bd979
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
46 changes: 26 additions & 20 deletions cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,6 +24,7 @@ module Demo

```cpp
// Client application (Client.cpp)

#include <Ice/Ice.h>
#include <Hello.h>

Expand All @@ -48,20 +50,19 @@ main(int argc, char* argv[])
```
```cpp
// Server application
// Server application (Server.cpp)
#include <Ice/Ice.h>
#include <Printer.h>
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);
Expand All @@ -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<HelloI>(), Ice::stringToIdentity("hello"));
adapter->activate();
communicator->waitForShutdown();
Expand All @@ -88,7 +91,7 @@ main(int argc, char* argv[])
```

```cpp
// Printer.h
// Printer implementation (Printer.h)

#include <Ice/Ice.h>
#include <Hello.h>
Expand All @@ -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
Expand All @@ -123,19 +127,20 @@ module Demo

```cpp
// Client application (Client.cpp)

#include <Ice/Ice.h>
#include <Hello.h>

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)
Expand All @@ -148,20 +153,21 @@ main(int argc, char* argv[])
```
```cpp
// Server application
// Server application (Server.cpp)
#include <Ice/Ice.h>
#include <HelloI.h>
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();
Expand All @@ -176,7 +182,7 @@ main(int argc, char* argv[])
```

```cpp
// Printer.h
// Printer implementation (Printer.h)

#include <Ice/Ice.h>
#include <Hello.h>
Expand All @@ -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
[Ice framework]: https://github.com/zeroc-ice/ice
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v100.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>https://github.com/zeroc-ice/ice</projectUrl>
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2010 (v100). Ice is a comprehensive RPC framework that helps you network your software with minimal effort.</description>
<description>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.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v100 zeroc</tags>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v120.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>https://github.com/zeroc-ice/ice</projectUrl>
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2013 (v120). Ice is a comprehensive RPC framework that helps you network your software with minimal effort.</description>
<description>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.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v120 zeroc</tags>
<readme>README.md</readme>
Expand Down
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v140.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>https://github.com/zeroc-ice/ice</projectUrl>
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2015 (v140). Ice is a comprehensive RPC framework that helps you network your software with minimal effort.</description>
<description>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.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v140 zeroc</tags>
<readme>README.md</readme>
Expand Down
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v141.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>https://github.com/zeroc-ice/ice</projectUrl>
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2017 (v141). Ice is a comprehensive RPC framework that helps you network your software with minimal effort.</description>
<description>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.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v141 zeroc</tags>
<readme>README.md</readme>
Expand Down
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v142.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>https://github.com/zeroc-ice/ice</projectUrl>
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2019 (v142). Ice is a comprehensive RPC framework that helps you network your software with minimal effort.</description>
<description>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.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v141 zeroc</tags>
<readme>README.md</readme>
Expand Down
2 changes: 1 addition & 1 deletion cpp/msbuild/zeroc.ice.v143.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>https://github.com/zeroc-ice/ice</projectUrl>
<icon>logo.png</icon>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Ice C++ SDK for Visual Studio 2022 (v143). Ice is a comprehensive RPC framework that helps you network your software with minimal effort.</description>
<description>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.</description>
<releaseNotes>https://doc.zeroc.com/rel/ice-releases/ice-3-7/ice-3-7-10-release-notes</releaseNotes>
<tags>ice native rpc v141 zeroc</tags>
<readme>README.md</readme>
Expand Down

0 comments on commit 42bd979

Please sign in to comment.