summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/FileParserI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-03-31 04:29:47 +0000
committerBernard Normier <bernard@zeroc.com>2006-03-31 04:29:47 +0000
commit66a0681bdb76416f73c242d40c228ba61182ec2c (patch)
tree8cfd2ab1a6049e79e76ecc0fcc72bae322e7ef5c /cpp/src/IceGrid/FileParserI.cpp
parentfixing IceSSL properties (diff)
downloadice-66a0681bdb76416f73c242d40c228ba61182ec2c.tar.bz2
ice-66a0681bdb76416f73c242d40c228ba61182ec2c.tar.xz
ice-66a0681bdb76416f73c242d40c228ba61182ec2c.zip
Added --server option to icegridadmin
Diffstat (limited to 'cpp/src/IceGrid/FileParserI.cpp')
-rwxr-xr-xcpp/src/IceGrid/FileParserI.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/FileParserI.cpp b/cpp/src/IceGrid/FileParserI.cpp
new file mode 100755
index 00000000000..a4284521449
--- /dev/null
+++ b/cpp/src/IceGrid/FileParserI.cpp
@@ -0,0 +1,30 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2006 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 <IceGrid/FileParserI.h>
+#include <IceGrid/DescriptorParser.h>
+#include <IceXML/Parser.h>
+#include <Ice/ObjectAdapter.h>
+
+using namespace std;
+using namespace IceGrid;
+
+ApplicationDescriptor
+FileParserI::parse(const string& file, const AdminPrx& admin, const Ice::Current& current)
+{
+ try
+ {
+ return DescriptorParser::parseDescriptor(file, Ice::StringSeq(), map<string, string>(),
+ current.adapter->getCommunicator(), admin);
+ }
+ catch(const IceXML::ParserException& e)
+ {
+ throw ParseException(e.reason());
+ }
+}