Samond Classes Library 1.2.6-STABLE build 219
List of all members
SCTextIndex Class Reference

Text index class. More...

#import <SCTextIndex.h>

+ Inheritance diagram for SCTextIndex:

Instance Properties

SCIndex line
 
SCIndex character
 

Creating Text Indexes

(instancetype) + textIndexWithCoder:
 
(instancetype) + textIndexWithContentsOfSerializedFile:
 
(instancetype) + textIndexWithDataDictionary:
 
(instancetype) + textIndexWithDataDictionaryFromFile:
 
(instancetype) + textIndexWithStream:
 
(instancetype) + textIndexWithFileStream:
 
(instancetype) + textIndexWithData:
 
(instancetype) + textIndexWithContentsOfFile:
 
(instancetype) + textIndexWithContentsOfURL:
 
(instancetype) + textIndexWithContentsOfURLString:
 
(instancetype) + textIndexWithLine:character:
 
(instancetype) + textIndexWithTextIndex:
 
(instancetype) + textIndex
 

Initializing Text Indexes

(instancetype) - initWithLine:character:
 
(instancetype) - initWithTextIndex:
 
(instancetype) - init
 

Copying Text Indexes

(void) - setLine:character:
 
(void) - setTextIndex:
 

Comparing Text Indexes

(BOOL) - isEqualToTextIndex:
 
(BOOL) - isEqualTo:
 
(BOOL) - isEqual:
 
(BOOL) - isEqualToLine:character:
 

Additional Inherited Members

- Instance Methods inherited from SCObject
(instancetype) - initWithContentsOfSerializedFile:
 
(BOOL) - writeContentsToSerializedFile:
 
(instancetype) - initWithDataDictionaryFromFile:
 
(void) - writeToDataDictionaryFile:atomically:
 
(void) - writeToDataDictionaryFile:
 
(NSDictionary *) - dataDictionary
 
(instancetype) - initWithFileStream:
 
(void) - writeToFileStream:
 
(void) - appendToFileStream:
 
(instancetype) - initWithData:
 
(instancetype) - initWithContentsOfFile:
 
(instancetype) - initWithContentsOfURL:
 
(instancetype) - initWithContentsOfURLString:
 
(BOOL) - writeToFile:
 
(BOOL) - writeToURL:
 
(BOOL) - writeToURLString:
 
(NSData *) - data
 
- Properties inherited from SCObject
NSString * className
 

Detailed Description

Text index class.

SDK
macOS 10.6+, iOS 7.0+, GNUstep
Since
version 1.1.4

Class SCTextIndex implements the entity of the text index, which is a combination of the string number within the strings list and the character number within the string.

Method Documentation

- (instancetype) init

Initializes a text index using the default settings.

Returns
A newly initialized text index
- (instancetype) initWithLine: (SCIndex line
character: (SCIndex character 

Initializes a text index using the specified line number and character number.

Parameters
line- the line number
character- the character number
Returns
A newly initialized text index
- (instancetype) initWithTextIndex: (SCTextIndex *)  textIndex

Initializes a text index using the specified existing text index.

Parameters
textIndex- an existing source text index
Returns
A newly initialized text index
- (BOOL) isEqual: (id)  object

Returns a boolean value that indicates whether the receiving text index is equals to the specified object.

Parameters
object- an object with which to compare the receiving text index
Returns
YES if the receiving text index is equals to the specified object, otherwise NO
See also
- isEqualTo:

Reimplemented from SCObject.

- (BOOL) isEqualTo: (id)  object

Returns a boolean value that indicates whether the receiving text index is equals to the specified object.

Parameters
object- a class instance with which to compare the receiving text index
Returns
YES if the receiving text index is equals to the specified object, otherwise NO
See also
- isEqual:
- (BOOL) isEqualToLine: (SCIndex line
character: (SCIndex character 

Returns a boolean value that indicates whether the receiving text index is equals to the specified line number and character number.

Parameters
line- the line number with which to compare the receiving text index
character- the character number with which to compare the receiving text index
Returns
YES if the receiving text index is equal to the specified line and character numbers, otherwise NO
- (BOOL) isEqualToTextIndex: (SCTextIndex *)  index

Returns a boolean value that indicates whether the receiving text index is equals to the specified text index.

Parameters
index- the text index with which to compare the receiving text index
Returns
YES if the receiving and the specified text indexes are equal, otherwise NO
- (void) setLine: (SCIndex line
character: (SCIndex character 

Sets the specified line number and character number.

Parameters
line- the line number
character- the character number
- (void) setTextIndex: (SCTextIndex *)  index

Sets the line number and character number by using the specified existing text index.

Parameters
index- an existing source text index
+ (instancetype) textIndex

Returns the text index created by using the default settings.

Returns
A created text index
+ (instancetype) textIndexWithCoder: (NSCoder *)  coder

Returns the text index created by using the specified coder.

Parameters
coder- the source coder
Returns
A created text index
+ (instancetype) textIndexWithContentsOfFile: (NSString *)  path

Returns the text index created by using the file with the specified path.

Parameters
path- the path to the source file
Returns
A created text index
+ (instancetype) textIndexWithContentsOfSerializedFile: (NSString *)  path

Returns the text index created by using the content of the serialized file with the specified path.

Parameters
path- the source serialized file path
Returns
A created text index
+ (instancetype) textIndexWithContentsOfURL: (NSURL *)  url

Returns the text index created by using the specified URL.

Parameters
url- the source URL
Returns
A created text index
+ (instancetype) textIndexWithContentsOfURLString: (NSString *)  urlString

Returns the text index created by using the data from the URL with the specified string.

Parameters
urlString- the string of the source URL
Returns
A created text index
+ (instancetype) textIndexWithData: (NSData *)  data

Returns the text index created by using the specified data object.

Parameters
data- the source data object
Returns
A created text index
+ (instancetype) textIndexWithDataDictionary: (NSDictionary *)  dictionary

Returns the text index created by using the specified data dictionary.

Parameters
dictionary- the source data dictionary
Returns
A created text index
+ (instancetype) textIndexWithDataDictionaryFromFile: (NSString *)  path

Returns the text index created by using the data dictionary from the specified file.

Parameters
path- the source data dictionary file path
Returns
A created text index
+ (instancetype) textIndexWithFileStream: (NSString *)  path

Returns the text index created by using the data from the file stream with the specified path.

Parameters
path- the path of the source file stream
Returns
A created text index
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) textIndexWithLine: (SCIndex line
character: (SCIndex character 

Returns the text index created by using the specified line number and character number.

Parameters
line- the line number
character- the character number
Returns
A created text index
+ (instancetype) textIndexWithStream: (SCStream *)  stream

Returns the text index created by using the data from the specified stream.

Parameters
stream- the source stream
Returns
A created text index
Exceptions
SCStreamException- stream error detected
SCSystemException- system error detected
+ (instancetype) textIndexWithTextIndex: (SCTextIndex *)  textIndex

Returns the text index created by using the specified existing text index.

Parameters
textIndex- existing source text index
Returns
A created text index

Property Documentation

- (SCIndex) character
readwritenonatomicassign

A character number

- (SCIndex) line
readwritenonatomicassign

A line number


The documentation for this class was generated from the following files: