mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Init and release instance vars
This commit is contained in:
parent
f9d50db4d0
commit
e424e8dcc9
2 changed files with 28 additions and 4 deletions
|
@ -109,7 +109,15 @@ DEFINE_BLOCK_TYPE(GSLinguisticTagRangeBoolBlock, void, NSLinguisticTag, NSRange,
|
|||
DEFINE_BLOCK_TYPE(GSLinguisticTagRangeRangeBoolBlock, void, NSLinguisticTag, NSRange, NSRange, BOOL);
|
||||
|
||||
@interface NSLinguisticTagger : NSObject
|
||||
|
||||
{
|
||||
NSArray *_schemes;
|
||||
NSString *_string;
|
||||
NSString *_dominantLanguage;
|
||||
NSArray *_tokenArray;
|
||||
NSArray *_orthographyArray;
|
||||
NSUInteger _options;
|
||||
}
|
||||
|
||||
- (instancetype) initWithTagSchemes: (NSArray *)tagSchemes
|
||||
options: (NSUInteger)opts;
|
||||
|
||||
|
|
|
@ -79,21 +79,37 @@ NSLinguisticTag const NSLinguisticTagOrganizationName = @"NSLinguisticTagOrganiz
|
|||
- (instancetype) initWithTagSchemes: (NSArray *)tagSchemes
|
||||
options: (NSUInteger)opts
|
||||
{
|
||||
return nil;
|
||||
self = [super init];
|
||||
if(self != nil)
|
||||
{
|
||||
ASSIGNCOPY(_schemes, tagSchemes);
|
||||
_options = opts;
|
||||
_string = nil;
|
||||
_dominantLanguage = nil;
|
||||
_tokenArray = nil;
|
||||
_orthographyArray = nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSArray *) tagSchemes
|
||||
{
|
||||
return nil;
|
||||
return _schemes;
|
||||
}
|
||||
|
||||
- (NSString *) string
|
||||
{
|
||||
return nil;
|
||||
return _string;
|
||||
}
|
||||
|
||||
- (void) setString: (NSString *)string
|
||||
{
|
||||
ASSIGNCOPY(_string, string);
|
||||
}
|
||||
|
||||
+ (NSArray *) availableTagSchemesForUnit: (NSLinguisticTaggerUnit)unit
|
||||
|
|
Loading…
Reference in a new issue