diff options
Diffstat (limited to 'cpp/src/Yellow/QueryI.cpp')
-rw-r--r-- | cpp/src/Yellow/QueryI.cpp | 53 |
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; -} |