mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Implement simple methods
This commit is contained in:
parent
e62e156b67
commit
4a3de6cb47
2 changed files with 28 additions and 6 deletions
|
@ -36,7 +36,11 @@ extern "C" {
|
||||||
@class NSDictionary, NSString, NSArray;
|
@class NSDictionary, NSString, NSArray;
|
||||||
|
|
||||||
@interface NSOrthography : NSObject <NSCopying, NSCoding>
|
@interface NSOrthography : NSObject <NSCopying, NSCoding>
|
||||||
|
{
|
||||||
|
NSDictionary *_languageMap;
|
||||||
|
NSString *_dominantScript;
|
||||||
|
}
|
||||||
|
|
||||||
- (instancetype) initWithDominantScript: (NSString *)script
|
- (instancetype) initWithDominantScript: (NSString *)script
|
||||||
languageMap: (NSDictionary *)map;
|
languageMap: (NSDictionary *)map;
|
||||||
|
|
||||||
|
|
|
@ -29,17 +29,30 @@
|
||||||
- (instancetype) initWithDominantScript: (NSString *)script
|
- (instancetype) initWithDominantScript: (NSString *)script
|
||||||
languageMap: (NSDictionary *)map
|
languageMap: (NSDictionary *)map
|
||||||
{
|
{
|
||||||
return nil;
|
self = [super init];
|
||||||
|
if(self != nil)
|
||||||
|
{
|
||||||
|
ASSIGNCOPY(_dominantScript, script);
|
||||||
|
ASSIGNCOPY(_languageMap, map);
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (oneway void) release
|
||||||
|
{
|
||||||
|
RELEASE(_dominantScript);
|
||||||
|
RELEASE(_languageMap);
|
||||||
|
[super release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) dominantScript
|
- (NSString *) dominantScript
|
||||||
{
|
{
|
||||||
return nil;
|
return _dominantScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) languationMap
|
- (NSDictionary *) languationMap
|
||||||
{
|
{
|
||||||
return nil;
|
return _languageMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) languagesForScript: (NSString *)script
|
- (NSArray *) languagesForScript: (NSString *)script
|
||||||
|
@ -74,7 +87,10 @@
|
||||||
|
|
||||||
+ (instancetype) orthographyWithDominantScript: (NSString *)script languageMap: (NSDictionary *)map
|
+ (instancetype) orthographyWithDominantScript: (NSString *)script languageMap: (NSDictionary *)map
|
||||||
{
|
{
|
||||||
return nil;
|
NSOrthography *result = [[NSOrthography alloc] initWithDominantScript: script
|
||||||
|
languageMap: map];
|
||||||
|
AUTORELEASE(result);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||||
|
@ -88,7 +104,9 @@
|
||||||
|
|
||||||
- (instancetype) copyWithZone: (NSZone *)zone
|
- (instancetype) copyWithZone: (NSZone *)zone
|
||||||
{
|
{
|
||||||
return nil;
|
return [[[self class] allocWithZone: zone]
|
||||||
|
initWithDominantScript: _dominantScript
|
||||||
|
languageMap: _languageMap];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue