Samond Classes Library 1.2.0-RELEASE build 166
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 
21 #import <scl/SCService.h>
22 #import <scl/SCTypes.h>
23 
24 #pragma mark -
25 #pragma mark Константы класса
26 
30 #define SCTextIndexClass @"SCTextIndex"
31 
32 
45 @interface SCTextIndex : SCService {
46  SCULong fLine; // Номер строки
47  SCULong fCharacter; // Номер символа в строке
48 }
49 
59 @property (nonatomic, assign, getter=line, setter=setLine:) SCULong line;
60 
65 @property (nonatomic, assign, getter=character, setter=setCharacter:) SCULong character;
66 
71 @property (nonatomic, retain, readonly, getter=description) NSString *description;
72 
75 #pragma mark -
76 #pragma mark Создание текстовых индексов
77 + (SCTextIndex *)textIndexWithCoder:(NSCoder *)coder;
78 + (SCTextIndex *)textIndexWithContentsOfSerializedFile:(NSString *)path;
79 + (SCTextIndex *)textIndexWithDataDictionary:(NSDictionary *)dictionary;
80 + (SCTextIndex *)textIndexWithDataDictionaryFromFile:(NSString *)path;
81 + (SCTextIndex *)textIndexWithStream:(SCStream *)stream;
82 + (SCTextIndex *)textIndexWithFileStream:(NSString *)path;
83 
84 + (SCTextIndex *)textIndexWithLine:(SCULong)line character:(SCULong)character;
85 + (SCTextIndex *)textIndexWithTextIndex:(SCTextIndex *)textIndex;
86 + (SCTextIndex *)textIndex;
87 
88 #pragma mark -
89 #pragma mark Инициализация текстовых индексов
90 - (id)initWithLine:(SCULong)line character:(SCULong)character;
91 - (id)initWithTextIndex:(SCTextIndex *)textIndex;
92 - (id)init;
93 
94 #pragma mark -
95 #pragma mark Свойства экземпляра класса
96 - (SCULong)line;
97 - (SCULong)character;
98 - (NSString *)description;
99 - (void)setLine:(SCULong)line;
100 - (void)setCharacter:(SCULong)character;
101 
102 #pragma mark -
103 #pragma mark Копирование текстовых индексов
104 - (void)setLine:(SCULong)line character:(SCULong)character;
105 - (void)setTextIndex:(SCTextIndex *)index;
106 
107 #pragma mark -
108 #pragma mark Сравнение текстовых индексов
109 - (BOOL)isEqualToTextIndex:(SCTextIndex *)index;
110 - (BOOL)isEqualTo:(id)object;
111 - (BOOL)isEqual:(id)object;
112 - (BOOL)isEqualToLine:(SCULong)line character:(SCULong)character;
113 
114 @end
115 
116 #pragma mark -
117 #pragma mark Функции
118 
123 SCTextIndex *SCMakeTextIndex( SCULong line, SCULong character);
SCTextIndex * SCMakeTextIndex(SCULong line, SCULong character)
Definition: SCTextIndex.m:527
uint64_t SCULong
Definition: SCTypes.h:78
SCULong line
Definition: SCTextIndex.h:59
SCULong character
Definition: SCTextIndex.h:65
Text index class.
Definition: SCTextIndex.h:45
Parent class of all library service classes.
Definition: SCService.h:45
NSString * description
Definition: SCTextIndex.h:71
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:242