diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-12-19 16:25:36 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-12-19 16:25:36 +0000 |
commit | 9b810dc117c11967759c85280ba7c780f050b013 (patch) | |
tree | 71de09d58f26bd0c96759fc48ef2515e7f2c0b6c /cpp/src/Yellow/AdminI.cpp | |
parent | Removed Yellow + clear the servant locator map in ObjectAdapter. (diff) | |
download | ice-9b810dc117c11967759c85280ba7c780f050b013.tar.bz2 ice-9b810dc117c11967759c85280ba7c780f050b013.tar.xz ice-9b810dc117c11967759c85280ba7c780f050b013.zip |
Removed Yellow.
Diffstat (limited to 'cpp/src/Yellow/AdminI.cpp')
-rw-r--r-- | cpp/src/Yellow/AdminI.cpp | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/cpp/src/Yellow/AdminI.cpp b/cpp/src/Yellow/AdminI.cpp deleted file mode 100644 index 9a7544bb588..00000000000 --- a/cpp/src/Yellow/AdminI.cpp +++ /dev/null @@ -1,89 +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/AdminI.h> - -using namespace std; -using namespace Ice; -using namespace Yellow; -using namespace Freeze; - -Yellow::AdminI::AdminI(const DBPtr& db) : - _dict(db) -{ -} - -void -Yellow::AdminI::add(const string& intf, const ObjectPrx& offer, const Current&) -{ - IceUtil::Mutex::Lock sync(*this); - - ObjectProxySeq seq; - - StringObjectProxySeqDict::iterator p = _dict.find(intf); - if(p != _dict.end()) - { - seq = p->second; - } - - seq.push_back(offer); - if(p == _dict.end()) - { - _dict.insert(make_pair(intf, seq)); - } - else - { - p.set(seq); - } -} - -void -Yellow::AdminI::remove(const string& intf, const ObjectPrx& offer, const Current&) -{ - IceUtil::Mutex::Lock sync(*this); - - ObjectProxySeq seq; - - StringObjectProxySeqDict::iterator p = _dict.find(intf); - if(p == _dict.end()) - { - throw NoSuchOfferException(); - } - - seq = p->second; - Ice::Identity ident = offer->ice_getIdentity(); - ObjectProxySeq::iterator q; - for(q = seq.begin(); q != seq.end(); ++q) - { - ObjectPrx proxy = *q; - if(proxy->ice_getIdentity() == ident) - { - break; - } - } - if(q == seq.end()) - { - throw NoSuchOfferException(); - } - seq.erase(q); - if(seq.size() == 0) - { - _dict.erase(p); - } - else - { - p.set(seq); - } -} - |