summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/Parser.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-09-09 22:31:50 +0000
committerMarc Laukien <marc@zeroc.com>2001-09-09 22:31:50 +0000
commit8260c9c3a8b6fbf43f0403c8082a713a94c83eaf (patch)
treed7aaede8d1fea68b31e39736d116c7567a1f218c /cpp/src/IcePack/Parser.cpp
parentcompleted structs; parser visitor changes (diff)
downloadice-8260c9c3a8b6fbf43f0403c8082a713a94c83eaf.tar.bz2
ice-8260c9c3a8b6fbf43f0403c8082a713a94c83eaf.tar.xz
ice-8260c9c3a8b6fbf43f0403c8082a713a94c83eaf.zip
fixes, tests, etc.
Diffstat (limited to 'cpp/src/IcePack/Parser.cpp')
-rw-r--r--cpp/src/IcePack/Parser.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index 9c82492b6bf..b53be9d841e 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -50,16 +50,16 @@ IcePack::Parser::add(const list<string>& args)
try
{
- ServerDescriptionPtr desc = new ServerDescription;
+ ServerDescription desc;
list<string>::const_iterator p = args.begin();
- desc->object = _communicator->stringToProxy(*p);
- desc->regex = false;
+ desc.object = _communicator->stringToProxy(*p);
+ desc.regex = false;
if (++p != args.end())
{
- desc->path = *p;
+ desc.path = *p;
while (++p != args.end())
{
- desc->args.push_back(*p);
+ desc.args.push_back(*p);
}
}
_admin->add(desc);
@@ -99,12 +99,13 @@ IcePack::Parser::getAll()
ServerDescriptions::iterator p = descriptions.begin();
while(p != descriptions.end())
{
- cout << "object = " << _communicator->proxyToString((*p)->object) << endl;
- cout << "regex = " << boolalpha << (*p)->regex << endl;
- cout << "host = " << (*p)->host << endl;
- cout << "path = " << (*p)->path << endl;
+ cout << "identity = " << p->first << endl;
+ cout << "object = " << _communicator->proxyToString(p->second.object) << endl;
+ cout << "regex = " << boolalpha << p->second.regex << endl;
+ cout << "host = " << p->second.host << endl;
+ cout << "path = " << p->second.path << endl;
cout << "args =";
- for (Args::iterator q = (*p)->args.begin(); q != (*p)->args.end(); ++q)
+ for (Args::iterator q = p->second.args.begin(); q != p->second.args.end(); ++q)
{
cout << ' ' << *q;
}