diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-12-05 22:31:29 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-12-05 22:31:29 +0000 |
commit | 7abe0bb2e951d22f67f34d38bd4892f30ad901bb (patch) | |
tree | 4844d8f0ed9c4988f5ec8988aa313b1f47f15162 /cpp/src/IcePack/QueryI.cpp | |
parent | Added support for object lookup by identity (diff) | |
download | ice-7abe0bb2e951d22f67f34d38bd4892f30ad901bb.tar.bz2 ice-7abe0bb2e951d22f67f34d38bd4892f30ad901bb.tar.xz ice-7abe0bb2e951d22f67f34d38bd4892f30ad901bb.zip |
Added IcePack object registry.
Added support for locator object lookup by identity.
Added Query interface to lookup objects by type.
Changed the IcePack.Registry.Locator properties to IcePack.Registry.Client
Changed the IcePack.Registry.LocatorRegistry properties to
IcePack.Registry.Se rver
Added IcePack demo
Minor fixes and clean-up
Diffstat (limited to 'cpp/src/IcePack/QueryI.cpp')
-rw-r--r-- | cpp/src/IcePack/QueryI.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cpp/src/IcePack/QueryI.cpp b/cpp/src/IcePack/QueryI.cpp new file mode 100644 index 00000000000..79acce6065a --- /dev/null +++ b/cpp/src/IcePack/QueryI.cpp @@ -0,0 +1,50 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// ZeroC, Inc. +// Billerica, MA, USA +// +// All Rights Reserved. +// +// Ice is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License version 2 as published by +// the Free Software Foundation. +// +// ********************************************************************** + +#include <IcePack/Internal.h> +#include <IcePack/QueryI.h> + +using namespace std; +using namespace Ice; +using namespace IcePack; + +IcePack::QueryI::QueryI(const CommunicatorPtr& communicator, const ObjectRegistryPtr& objectRegistry) : + _communicator(communicator), + _objectRegistry(objectRegistry) +{ +} + +IcePack::QueryI::~QueryI() +{ +} + +Ice::ObjectPrx +IcePack::QueryI::findObjectById(const Ice::Identity& id, const Ice::Current&) const +{ + return _objectRegistry->findById(id); +} + +Ice::ObjectPrx +IcePack::QueryI::findObjectByType(const string& type, const Ice::Current&) const +{ + return _objectRegistry->findByType(type); +} + +Ice::ObjectProxySeq +IcePack::QueryI::findAllObjectsWithType(const string& type, const Ice::Current&) const +{ + return _objectRegistry->findAllWithType(type); +} + + |