diff options
Diffstat (limited to 'cpp/src/IceGrid/Client.cpp')
-rw-r--r-- | cpp/src/IceGrid/Client.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 4edd7b01536..ef613e541a1 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -12,6 +12,7 @@ #include <Ice/Application.h> #include <Ice/SliceChecksums.h> #include <IceGrid/Parser.h> +#include <IceGrid/FileParserI.h> #include <fstream> using namespace std; @@ -47,6 +48,7 @@ Client::usage() "-IDIR Put DIR in the include file search path.\n" "-e COMMANDS Execute COMMANDS.\n" "-d, --debug Print debug messages.\n" + "-s, --server Start icegridadmin as a server (to parse XML files).\n" ; } @@ -65,6 +67,7 @@ Client::run(int argc, char* argv[]) opts.addOpt("I", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat); opts.addOpt("e", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat); opts.addOpt("d", "debug"); + opts.addOpt("s", "server"); vector<string> args; try @@ -88,6 +91,21 @@ Client::run(int argc, char* argv[]) cout << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } + + if(opts.isSet("s") || opts.isSet("server")) + { + ObjectAdapterPtr adapter = + communicator()->createObjectAdapterWithEndpoints("FileParser", "tcp -h localhost"); + adapter->activate(); + ObjectPrx proxy = adapter-> + add(new FileParserI, Ice::stringToIdentity("FileParser")); + cout << proxy << endl; + + communicator()->waitForShutdown(); + return EXIT_SUCCESS; + } + + if(opts.isSet("D")) { vector<string> optargs = opts.argVec("D"); |