diff options
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/demo/Ice/session/SessionFactoryI.h | 5 | ||||
-rwxr-xr-x | cpp/demo/Ice/session/SessionI.cpp | 8 | ||||
-rwxr-xr-x | cpp/demo/Ice/session/SessionI.h | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/cpp/demo/Ice/session/SessionFactoryI.h b/cpp/demo/Ice/session/SessionFactoryI.h index 4be5f984b0c..fff5ea24578 100755 --- a/cpp/demo/Ice/session/SessionFactoryI.h +++ b/cpp/demo/Ice/session/SessionFactoryI.h @@ -11,7 +11,7 @@ #define SESSION_FACTORY_I_H #include <Session.h> -#include <ReapThread.h> +#include <ReapThread.h> // XXX Not checked in. class SessionFactoryI : public ::Demo::SessionFactory, public IceUtil::Mutex { @@ -35,6 +35,9 @@ private: // know. Since the session factory knows both, this seems like a // better solution. // + // XXX Make it a singleton, because it is a singleton. It doesn't + // belong here. + // const ReapThreadPtr _reapThread; }; diff --git a/cpp/demo/Ice/session/SessionI.cpp b/cpp/demo/Ice/session/SessionI.cpp index add61597ff2..e3dc2c4937d 100755 --- a/cpp/demo/Ice/session/SessionI.cpp +++ b/cpp/demo/Ice/session/SessionI.cpp @@ -13,9 +13,6 @@ using namespace std; using namespace Demo; -// XXX Add using namespace Ice. -// Style: the other demos do not use namespace Ice. - class HelloI : public Hello { public: @@ -25,7 +22,7 @@ public: { } - ~HelloI() + virtual ~HelloI() { cout << "Hello object #" << _id << " destroyed" << endl; } @@ -45,6 +42,7 @@ HelloPrx SessionI::createHello(const Ice::Current& c) { Lock sync(*this); + // XXX Check for destruction missing. HelloPrx hello = HelloPrx::uncheckedCast(c.adapter->addWithUUID(new HelloI(_nextId++))); _objs.push_back(hello); return hello; @@ -54,6 +52,7 @@ void SessionI::refresh(const Ice::Current& c) { Lock sync(*this); + // XXX Check for destruction missing. _timestamp = IceUtil::Time::now(); } @@ -61,6 +60,7 @@ void SessionI::destroy(const Ice::Current& c) { Lock sync(*this); + // XXX Check for destruction missing. _destroy = true; cout << "The session #" << Ice::identityToString(c.id) << " is now destroyed." << endl; diff --git a/cpp/demo/Ice/session/SessionI.h b/cpp/demo/Ice/session/SessionI.h index 512a7acc4a1..df2321460b8 100755 --- a/cpp/demo/Ice/session/SessionI.h +++ b/cpp/demo/Ice/session/SessionI.h @@ -16,6 +16,7 @@ // XXX Get rid of leading ::, i.e., use Demo::, not ::Demo:: // (everywhere). // Style: The other demos all use ::Demo:: +// XXX All other demos should be changed then. We don't use leading :: if they are not necessary. class SessionI : public ::Demo::Session, public IceUtil::Mutex { @@ -41,6 +42,7 @@ private: std::list< ::Demo::HelloPrx> _objs; // List of per-client allocated Hello objects. bool _destroy; }; + typedef IceUtil::Handle<SessionI> SessionIPtr; #endif |