diff options
author | Matthew Newhook <matthew@zeroc.com> | 2002-03-08 13:47:12 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2002-03-08 13:47:12 +0000 |
commit | 2ee86c01bdce8ff4fb14120f9603e2d4382a32af (patch) | |
tree | 9ef026ad20f848bf3f4217eebd478804e3740f9f /cpp/demo/Freeze/phonebook/Collocated.cpp | |
parent | adding constructors to holder classes (diff) | |
download | ice-2ee86c01bdce8ff4fb14120f9603e2d4382a32af.tar.bz2 ice-2ee86c01bdce8ff4fb14120f9603e2d4382a32af.tar.xz ice-2ee86c01bdce8ff4fb14120f9603e2d4382a32af.zip |
updates for Freeze.
Diffstat (limited to 'cpp/demo/Freeze/phonebook/Collocated.cpp')
-rw-r--r-- | cpp/demo/Freeze/phonebook/Collocated.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/cpp/demo/Freeze/phonebook/Collocated.cpp b/cpp/demo/Freeze/phonebook/Collocated.cpp index ca23cc5bcc1..72f36506f57 100644 --- a/cpp/demo/Freeze/phonebook/Collocated.cpp +++ b/cpp/demo/Freeze/phonebook/Collocated.cpp @@ -14,11 +14,6 @@ using namespace std; using namespace Ice; -using namespace Freeze; - -using namespace std; -using namespace Ice; -using namespace Freeze; class PhoneBookCollocated : public Freeze::Application { @@ -29,7 +24,7 @@ public: { } - virtual int runFreeze(int argc, char* argv[], const DBEnvironmentPtr&); + virtual int runFreeze(int argc, char* argv[], const Freeze::DBEnvironmentPtr&); }; int @@ -40,26 +35,26 @@ main(int argc, char* argv[]) } int -PhoneBookCollocated::runFreeze(int argc, char* argv[], const DBEnvironmentPtr& dbEnv) +PhoneBookCollocated::runFreeze(int argc, char* argv[], const Freeze::DBEnvironmentPtr& dbEnv) { PropertiesPtr properties = communicator()->getProperties(); string value; - DBPtr dbPhoneBook = dbEnv->openDB("phonebook", true); - DBPtr dbContacts = dbEnv->openDB("contacts", true); + Freeze::DBPtr dbPhoneBook = dbEnv->openDB("phonebook", true); + Freeze::DBPtr dbContacts = dbEnv->openDB("contacts", true); // // Create an Evictor for contacts. // - EvictorPtr evictor; + Freeze::EvictorPtr evictor; value = properties->getProperty("PhoneBook.SaveAfterMutatingOperation"); if(!value.empty() && atoi(value.c_str()) > 0) { - evictor = dbContacts->createEvictor(SaveAfterMutatingOperation); + evictor = dbContacts->createEvictor(Freeze::SaveAfterMutatingOperation); } else { - evictor = dbContacts->createEvictor(SaveUponEviction); + evictor = dbContacts->createEvictor(Freeze::SaveUponEviction); } value = properties->getProperty("PhoneBook.EvictorSize"); if(!value.empty()) @@ -83,7 +78,7 @@ PhoneBookCollocated::runFreeze(int argc, char* argv[], const DBEnvironmentPtr& d // Create and install a factory and initializer for contacts. // ObjectFactoryPtr contactFactory = new ContactFactory(phoneBook, evictor); - ServantInitializerPtr contactInitializer = ServantInitializerPtr::dynamicCast(contactFactory); + Freeze::ServantInitializerPtr contactInitializer = Freeze::ServantInitializerPtr::dynamicCast(contactFactory); communicator()->addObjectFactory(contactFactory, "::Contact"); evictor->installServantInitializer(contactInitializer); |