Samond Classes Library 1.2.2-RELEASE build 188
SCTextIndex.h
Go to the documentation of this file.
1 //
2 // SCTextIndex.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 06.02.13.
6 // Copyright (c) 2007 - 2017 by Samond Development Corporation. All rights reserved.
7 //
8 
22 #import <scl/SCService.h>
23 #import <scl/SCTypes.h>
24 
25 #pragma mark -
26 #pragma mark Class Constants
27 
36 #define SCTextIndexClass @"SCTextIndex"
37 
38 
53 @interface SCTextIndex : SCService {
54  SCIndex fLine; // String number
55  SCIndex fCharacter; // Character number in string
56 }
57 
67 @property (nonatomic, readwrite, assign) SCIndex line;
68 
73 @property (nonatomic, readwrite, assign) SCIndex character;
74 
77 #pragma mark -
78 #pragma mark Creating Text Indexes
79 + (instancetype)textIndexWithCoder:(NSCoder *)coder;
80 + (instancetype)textIndexWithContentsOfSerializedFile:(NSString *)path;
81 + (instancetype)textIndexWithDataDictionary:(NSDictionary *)dictionary;
82 + (instancetype)textIndexWithDataDictionaryFromFile:(NSString *)path;
83 + (instancetype)textIndexWithStream:(SCStream *)stream;
84 + (instancetype)textIndexWithFileStream:(NSString *)path;
85 
86 + (instancetype)textIndexWithLine:(SCIndex)line character:(SCIndex)character;
87 + (instancetype)textIndexWithTextIndex:(SCTextIndex *)textIndex;
88 + (instancetype)textIndex;
89 
90 #pragma mark -
91 #pragma mark Initializing Text Indexes
92 - (instancetype)initWithLine:(SCIndex)line character:(SCIndex)character;
93 - (instancetype)initWithTextIndex:(SCTextIndex *)textIndex;
94 - (instancetype)init;
95 
96 #pragma mark -
97 #pragma mark Copying Text Indexes
98 - (void)setLine:(SCIndex)line character:(SCIndex)character;
99 - (void)setTextIndex:(SCTextIndex *)index;
100 
101 #pragma mark -
102 #pragma mark Comparing Text Indexes
103 - (BOOL)isEqualToTextIndex:(SCTextIndex *)index;
104 - (BOOL)isEqualTo:(id)object;
105 - (BOOL)isEqual:(id)object;
106 - (BOOL)isEqualToLine:(SCIndex)line character:(SCIndex)character;
107 
108 @end
109 
110 #pragma mark -
111 #pragma mark Functions
112 
117 SCTextIndex *SCMakeTextIndex( SCIndex line, SCIndex character);
SCTextIndex * SCMakeTextIndex(SCIndex line, SCIndex character)
Definition: SCTextIndex.m:478
Text index class.
Definition: SCTextIndex.h:53
Class SCService header file.
Library types header file.
Parent class of all library service classes.
Definition: SCService.h:51
NSUInteger SCIndex
Definition: SCCollectionProtocols.h:50
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:226