diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-09-12 02:46:32 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-09-12 02:46:32 +0000 |
commit | 759f7f34281a2c3d406ce93e52e63272a9d4beba (patch) | |
tree | 491339afc3ba74316d9d9019318836ffb6621ce8 /cpp/demo/Freeze/library/Collocated.cpp | |
parent | bug fix to the icepack hello demo. (diff) | |
download | ice-759f7f34281a2c3d406ce93e52e63272a9d4beba.tar.bz2 ice-759f7f34281a2c3d406ce93e52e63272a9d4beba.tar.xz ice-759f7f34281a2c3d406ce93e52e63272a9d4beba.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=335
Diffstat (limited to 'cpp/demo/Freeze/library/Collocated.cpp')
-rw-r--r-- | cpp/demo/Freeze/library/Collocated.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cpp/demo/Freeze/library/Collocated.cpp b/cpp/demo/Freeze/library/Collocated.cpp index a4b922348fc..ad498b10f4d 100644 --- a/cpp/demo/Freeze/library/Collocated.cpp +++ b/cpp/demo/Freeze/library/Collocated.cpp @@ -13,8 +13,6 @@ #include <Freeze/Freeze.h> using namespace std; -using namespace Ice; -using namespace Freeze; class LibraryCollocated : public Ice::Application { @@ -28,6 +26,7 @@ public: virtual int run(int argc, char* argv[]); private: + const string _envName; }; @@ -41,18 +40,18 @@ main(int argc, char* argv[]) int LibraryCollocated::run(int argc, char* argv[]) { - PropertiesPtr properties = communicator()->getProperties(); + Ice::PropertiesPtr properties = communicator()->getProperties(); // // Create an object adapter // - ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Library"); + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Library"); // // Create an evictor for books. // Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, _envName, "books"); - Int evictorSize = properties->getPropertyAsInt("Library.EvictorSize"); + Ice::Int evictorSize = properties->getPropertyAsInt("Library.EvictorSize"); if(evictorSize > 0) { evictor->setSize(evictorSize); @@ -67,18 +66,18 @@ LibraryCollocated::run(int argc, char* argv[]) // Create the library, and add it to the Object Adapter. // LibraryIPtr library = new LibraryI(communicator(), _envName, "authors", evictor); - adapter->add(library, stringToIdentity("library")); + adapter->add(library, Ice::stringToIdentity("library")); // // Create and install a factory for books. // - ObjectFactoryPtr bookFactory = new BookFactory(library); + Ice::ObjectFactoryPtr bookFactory = new BookFactory(library); communicator()->addObjectFactory(bookFactory, "::Demo::Book"); // // Everything ok, let's go. // - int runParser(int, char*[], const CommunicatorPtr&); + int runParser(int, char*[], const Ice::CommunicatorPtr&); int status = runParser(argc, argv, communicator()); adapter->deactivate(); adapter->waitForDeactivate(); |