diff options
author | Michi Henning <michi@zeroc.com> | 2004-12-03 04:12:39 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2004-12-03 04:12:39 +0000 |
commit | 1690923ef5a9f7b22c70ce343554cc41eb9f00e3 (patch) | |
tree | 8a98dfc73b86882e7dc72b1046220af23dc32cc5 /cpp/src | |
parent | Fixed VC build (diff) | |
download | ice-1690923ef5a9f7b22c70ce343554cc41eb9f00e3.tar.bz2 ice-1690923ef5a9f7b22c70ce343554cc41eb9f00e3.tar.xz ice-1690923ef5a9f7b22c70ce343554cc41eb9f00e3.zip |
Added ::Ice::Context parameter to checkedCast.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index 7b7a4095ad9..27dd8f09f32 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -75,6 +75,39 @@ IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string& return 0; } +::Ice::ObjectPrx +IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string& typeId, const Context& ctx) +{ +// +// Without this work-around, release VC7.0 build crash when FacetNotExistException +// is raised +// +#if defined(_MSC_VER) && (_MSC_VER == 1300) + ObjectPrx fooBar; +#endif + + if(b) + { + ObjectPrx bb = b->ice_newFacet(f); + try + { + if(bb->ice_isA(typeId, ctx)) + { + return bb; + } +#ifndef NDEBUG + else + { + assert(typeId != "::Ice::Object"); + } +#endif + } + catch(const FacetNotExistException&) + { + } + } + return 0; +} bool IceProxy::Ice::Object::operator==(const Object& r) const |