diff options
Diffstat (limited to 'cpp/demo/Freeze/transform/recreate.cpp')
-rw-r--r-- | cpp/demo/Freeze/transform/recreate.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/cpp/demo/Freeze/transform/recreate.cpp b/cpp/demo/Freeze/transform/recreate.cpp new file mode 100644 index 00000000000..ecd2c949730 --- /dev/null +++ b/cpp/demo/Freeze/transform/recreate.cpp @@ -0,0 +1,39 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <Freeze/Freeze.h> +#include <NewContacts.h> + +using namespace std; +using namespace Demo; +using namespace Freeze; + +class Recreate : public Ice::Application +{ +public: + + virtual int run(int, char*[]); +}; + +int main(int argc, char* argv[]) +{ + Recreate app; + return app.main(argc, argv); +} + +int +Recreate::run(int argc, char* argv[]) +{ + ConnectionPtr connection = createConnection(communicator(), "dbnew"); + NewContacts::recreate(connection, "contacts"); + + cout << "Recreated contacts database successfully!" << endl; + return 0; +} |