summaryrefslogtreecommitdiff
path: root/objective-c/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-07-27 19:30:37 -0400
committerBernard Normier <bernard@zeroc.com>2016-07-27 19:30:37 -0400
commit883edab4361e58957796f25d5fc55cfb41f0f6ea (patch)
treefc90adc372b66bf0becf4c0912794c64af250a29 /objective-c/src
parentICE-7242 - Cross test updates (diff)
downloadice-883edab4361e58957796f25d5fc55cfb41f0f6ea.tar.bz2
ice-883edab4361e58957796f25d5fc55cfb41f0f6ea.tar.xz
ice-883edab4361e58957796f25d5fc55cfb41f0f6ea.zip
Deprecate Communicator::stringToIdentity and identityToString
Diffstat (limited to 'objective-c/src')
-rw-r--r--objective-c/src/Ice/CommunicatorI.mm24
-rw-r--r--objective-c/src/Ice/Initialize.mm33
2 files changed, 34 insertions, 23 deletions
diff --git a/objective-c/src/Ice/CommunicatorI.mm b/objective-c/src/Ice/CommunicatorI.mm
index 94b9314e58e..3110c72e47d 100644
--- a/objective-c/src/Ice/CommunicatorI.mm
+++ b/objective-c/src/Ice/CommunicatorI.mm
@@ -237,32 +237,12 @@
-(ICEIdentity*) stringToIdentity:(NSString*)str
{
- NSException* nsex = nil;
- try
- {
- return [ICEIdentity identityWithIdentity:COMMUNICATOR->stringToIdentity(fromNSString(str))];
- }
- catch(const std::exception& ex)
- {
- nsex = toObjCException(ex);
- }
- @throw nsex;
- return nil; // Keep the compiler happy.
+ return [ICEUtil stringToIdentity:str];
}
-(NSMutableString*) identityToString:(ICEIdentity*)ident
{
- NSException* nsex = nil;
- try
- {
- return [toNSMutableString(COMMUNICATOR->identityToString([ident identity])) autorelease];
- }
- catch(const std::exception& ex)
- {
- nsex = toObjCException(ex);
- }
- @throw nsex;
- return nil; // Keep the compiler happy.
+ return [ICEUtil identityToString:ident];
}
-(id<ICEObjectAdapter>) createObjectAdapter:(NSString*)name;
diff --git a/objective-c/src/Ice/Initialize.mm b/objective-c/src/Ice/Initialize.mm
index b1ea0d6dd38..0e23324738f 100644
--- a/objective-c/src/Ice/Initialize.mm
+++ b/objective-c/src/Ice/Initialize.mm
@@ -12,6 +12,7 @@
#import <CommunicatorI.h>
#import <StreamI.h>
#import <LoggerI.h>
+#import <IdentityI.h>
#import <DispatcherI.h>
#import <BatchRequestInterceptorI.h>
#import <Util.h>
@@ -492,7 +493,7 @@ private:
return [[ns copy] autorelease];
}
-+(void)stringSeqToArgs:(NSArray*)args argc:(int*)argc argv:(char*[])argv;
++(void)stringSeqToArgs:(NSArray*)args argc:(int*)argc argv:(char*[])argv
{
//
// Shift all elements in argv which are present in args to the
@@ -537,6 +538,36 @@ private:
argv[*argc] = 0;
}
}
+
++(ICEIdentity*) stringToIdentity:(NSString*)str
+{
+ NSException* nsex = nil;
+ try
+ {
+ return [ICEIdentity identityWithIdentity:Ice::stringToIdentity(fromNSString(str))];
+ }
+ catch(const std::exception& ex)
+ {
+ nsex = toObjCException(ex);
+ }
+ @throw nsex;
+ return nil; // Keep the compiler happy.
+}
+
++(NSMutableString*) identityToString:(ICEIdentity*)ident
+{
+ NSException* nsex = nil;
+ try
+ {
+ return [toNSMutableString(Ice::identityToString([ident identity])) autorelease];
+ }
+ catch(const std::exception& ex)
+ {
+ nsex = toObjCException(ex);
+ }
+ @throw nsex;
+ return nil; // Keep the compiler happy.
+}
@end
@implementation ICEEncodingVersion(StringConv)