summaryrefslogtreecommitdiff
path: root/cpp/src/Yellow/QueryI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-12-19 16:25:36 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-12-19 16:25:36 +0000
commit9b810dc117c11967759c85280ba7c780f050b013 (patch)
tree71de09d58f26bd0c96759fc48ef2515e7f2c0b6c /cpp/src/Yellow/QueryI.cpp
parentRemoved Yellow + clear the servant locator map in ObjectAdapter. (diff)
downloadice-9b810dc117c11967759c85280ba7c780f050b013.tar.bz2
ice-9b810dc117c11967759c85280ba7c780f050b013.tar.xz
ice-9b810dc117c11967759c85280ba7c780f050b013.zip
Removed Yellow.
Diffstat (limited to 'cpp/src/Yellow/QueryI.cpp')
-rw-r--r--cpp/src/Yellow/QueryI.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/cpp/src/Yellow/QueryI.cpp b/cpp/src/Yellow/QueryI.cpp
deleted file mode 100644
index 25cdb899a1d..00000000000
--- a/cpp/src/Yellow/QueryI.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// **********************************************************************
-//
-// 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 <Yellow/QueryI.h>
-
-using namespace std;
-using namespace Ice;
-using namespace Yellow;
-using namespace Freeze;
-
-Yellow::QueryI::QueryI(const DBPtr& db) :
- _dict(db)
-{
-}
-
-ObjectPrx
-Yellow::QueryI::lookup(const string& intf, const Current&)
-{
- StringObjectProxySeqDict::const_iterator p = _dict.find(intf);
- if(p == _dict.end())
- {
- NoSuchOfferException e;
- e.intf = intf;
- throw e;
- }
-
- int r = rand() % p->second.size();
- return p->second[r];
-}
-
-ObjectProxySeq
-Yellow::QueryI::lookupAll(const string& intf, const Current&)
-{
- StringObjectProxySeqDict::const_iterator p = _dict.find(intf);
- if(p == _dict.end())
- {
- NoSuchOfferException e;
- e.intf = intf;
- throw e;
- }
- return p->second;
-}