Skip to content

Commit 4df0a6d

Browse files
Fix namespace in demo servers (C++ and C#) (#284)
1 parent dc2b2d6 commit 4df0a6d

File tree

17 files changed

+18
-26
lines changed

17 files changed

+18
-26
lines changed

cpp/Ice/config/Chatbot.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
#include <sstream>
77

88
using namespace std;
9-
using namespace ConfigServer;
109

1110
string
12-
Chatbot::greet(string name, const Ice::Current&)
11+
Server::Chatbot::greet(string name, const Ice::Current&)
1312
{
1413
cout << "Dispatching greet request { name = '" << name << "' }" << endl;
1514

cpp/Ice/config/Chatbot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "Greeter.h"
77

8-
namespace ConfigServer
8+
namespace Server
99
{
1010
/// A Chatbot is an Ice servant that implements Slice interface Greeter.
1111
class Chatbot : public VisitorCenter::Greeter

cpp/Ice/config/Server.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <iostream>
77

88
using namespace std;
9-
using namespace ConfigServer;
109

1110
int
1211
main(int argc, char* argv[])
@@ -26,7 +25,7 @@ main(int argc, char* argv[])
2625
auto adapter = communicator->createObjectAdapter("GreeterAdapter");
2726

2827
// Register the Chatbot servant with the adapter.
29-
adapter->add(make_shared<Chatbot>(), Ice::stringToIdentity("greeter"));
28+
adapter->add(make_shared<Server::Chatbot>(), Ice::stringToIdentity("greeter"));
3029

3130
// Start dispatching requests.
3231
adapter->activate();

cpp/Ice/greeter/Chatbot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using namespace std;
99

1010
string
11-
GreeterServer::Chatbot::greet(string name, const Ice::Current&)
11+
Server::Chatbot::greet(string name, const Ice::Current&)
1212
{
1313
cout << "Dispatching greet request { name = '" << name << "' }" << endl;
1414

cpp/Ice/greeter/Chatbot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "Greeter.h"
77

8-
namespace GreeterServer
8+
namespace Server
99
{
1010
/// A Chatbot is an Ice servant that implements Slice interface Greeter.
1111
class Chatbot : public VisitorCenter::Greeter

cpp/Ice/greeter/ChatbotAMD.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
using namespace std;
1111

12-
GreeterServerAMD::Chatbot::~Chatbot()
12+
ServerAMD::Chatbot::~Chatbot()
1313
{
1414
// Wait for all tasks to complete.
1515
for (auto& task : _tasks)
@@ -19,7 +19,7 @@ GreeterServerAMD::Chatbot::~Chatbot()
1919
}
2020

2121
void
22-
GreeterServerAMD::Chatbot::greetAsync(
22+
ServerAMD::Chatbot::greetAsync(
2323
string name,
2424
function<void(string_view)> response,
2525
[[maybe_unused]] function<void(std::exception_ptr)> exception,

cpp/Ice/greeter/ChatbotAMD.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "GreeterAMD.h"
77

8-
namespace GreeterServerAMD
8+
namespace ServerAMD
99
{
1010
/// A Chatbot is an Ice servant that implements Slice interface Greeter.
1111
class Chatbot : public VisitorCenter::Greeter

cpp/Ice/greeter/Server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ main(int argc, char* argv[])
2222
auto adapter = communicator->createObjectAdapterWithEndpoints("GreeterAdapter", "tcp -p 4061");
2323

2424
// Register the Chatbot servant with the adapter.
25-
adapter->add(make_shared<GreeterServer::Chatbot>(), Ice::stringToIdentity("greeter"));
25+
adapter->add(make_shared<Server::Chatbot>(), Ice::stringToIdentity("greeter"));
2626

2727
// Start dispatching requests.
2828
adapter->activate();

cpp/Ice/greeter/ServerAMD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ main(int argc, char* argv[])
2222
auto adapter = communicator->createObjectAdapterWithEndpoints("GreeterAdapter", "tcp -p 4061");
2323

2424
// Register the Chatbot servant with the adapter.
25-
adapter->add(make_shared<GreeterServerAMD::Chatbot>(), Ice::stringToIdentity("greeter"));
25+
adapter->add(make_shared<ServerAMD::Chatbot>(), Ice::stringToIdentity("greeter"));
2626

2727
// Start dispatching requests.
2828
adapter->activate();

csharp/Ice/Config/Server/Chatbot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
using VisitorCenter;
44

5-
namespace ConfigServer;
5+
namespace Server;
66

77
/// <summary>A Chatbot is an Ice servant that implements Slice interface Greeter.</summary>
88
internal class Chatbot : GreeterDisp_

0 commit comments

Comments
 (0)