summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/IdentityUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2008-01-31 19:05:51 -0800
committerMark Spruiell <mes@zeroc.com>2008-01-31 19:05:51 -0800
commit2c3770915174ad6f358b4ab82848f99bf464cb76 (patch)
tree14ed55dabd722e1f8e8b917c1be4de104d2b8f05 /cpp/src/Ice/IdentityUtil.cpp
parentC# bug fix in Stream.cs (diff)
downloadice-2c3770915174ad6f358b4ab82848f99bf464cb76.tar.bz2
ice-2c3770915174ad6f358b4ab82848f99bf464cb76.tar.xz
ice-2c3770915174ad6f358b4ab82848f99bf464cb76.zip
bug 2264 - remove deprecated APIs
Diffstat (limited to 'cpp/src/Ice/IdentityUtil.cpp')
-rw-r--r--cpp/src/Ice/IdentityUtil.cpp90
1 files changed, 0 insertions, 90 deletions
diff --git a/cpp/src/Ice/IdentityUtil.cpp b/cpp/src/Ice/IdentityUtil.cpp
deleted file mode 100644
index bfd212c324d..00000000000
--- a/cpp/src/Ice/IdentityUtil.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#include <Ice/IdentityUtil.h>
-#include <Ice/LocalException.h>
-#include <IceUtil/StringUtil.h>
-
-using namespace std;
-using namespace Ice;
-using namespace IceInternal;
-
-Identity
-Ice::stringToIdentity(const string& s)
-{
- Identity ident;
-
- //
- // Find unescaped separator.
- //
- string::size_type slash = string::npos, pos = 0;
- while((pos = s.find('/', pos)) != string::npos)
- {
- if(pos == 0 || s[pos - 1] != '\\')
- {
- if(slash == string::npos)
- {
- slash = pos;
- }
- else
- {
- //
- // Extra unescaped slash found.
- //
- IdentityParseException ex(__FILE__, __LINE__);
- ex.str = s;
- throw ex;
- }
- }
- pos++;
- }
-
- if(slash == string::npos)
- {
- if(!IceUtilInternal::unescapeString(s, 0, s.size(), ident.name))
- {
- IdentityParseException ex(__FILE__, __LINE__);
- ex.str = s;
- throw ex;
- }
- }
- else
- {
- if(!IceUtilInternal::unescapeString(s, 0, slash, ident.category))
- {
- IdentityParseException ex(__FILE__, __LINE__);
- ex.str = s;
- throw ex;
- }
- if(slash + 1 < s.size())
- {
- if(!IceUtilInternal::unescapeString(s, slash + 1, s.size(), ident.name))
- {
- IdentityParseException ex(__FILE__, __LINE__);
- ex.str = s;
- throw ex;
- }
- }
- }
-
- return ident;
-}
-
-string
-Ice::identityToString(const Identity& ident)
-{
- if(ident.category.empty())
- {
- return IceUtilInternal::escapeString(ident.name, "/");
- }
- else
- {
- return IceUtilInternal::escapeString(ident.category, "/") + '/' + IceUtilInternal::escapeString(ident.name, "/");
- }
-}