|
Samond Classes Library 1.1.6-RELEASE build 132
|
00001 // 00002 // SCTextIndex.h 00003 // scl 00004 // 00005 // Created by Viacheslav Smolensky on 06.02.13. 00006 // Copyright (c) 2007 - 2014 by Samond Development Corporation. All rights reserved. 00007 // 00008 00016 #import <scl/SCServiceObject.h> 00017 #import <scl/SCTypes.h> 00018 00019 #define SCTextIndexClass @"SCTextIndex" ///< SCTextIndex class name 00020 00031 @interface SCTextIndex : SCServiceObject { 00032 SCULong fLine; // Line index 00033 SCULong fCharacter; // Character index 00034 } 00035 #pragma mark - 00036 #pragma mark Class properties 00037 #if (__MAC_OS_X_VERSION_MIN_REQUIRED > 1040) || IOS_TARGET 00038 // Line index property 00039 @property (assign, getter=line, setter=setLine:) SCULong line; 00040 // Character index property 00041 @property (assign, getter=character, setter=setCharacter:) SCULong character; 00042 #endif 00043 00044 #pragma mark - 00045 #pragma mark Creating Text Index 00046 00052 + (SCTextIndex *)textIndexWithDataDictionary:(NSDictionary *)dictionary; 00053 00059 + (SCTextIndex *)textIndexWithDataDictionaryFromFile:(NSString *)path; 00060 00066 + (SCTextIndex *)textIndexWithCoder:(NSCoder *)coder; 00067 00073 + (SCTextIndex *)textIndexWithContentsOfSerializedFile:(NSString *)path; 00074 00082 + (SCTextIndex *)textIndexWithStream:(SCStream *)stream; 00083 00091 + (SCTextIndex *)textIndexWithFileStream:(NSString *)path; 00092 00097 + (SCTextIndex *)textIndex; 00098 00105 + (SCTextIndex *)textIndexWithLine:(SCULong)line character:(SCULong)character; 00106 00112 + (SCTextIndex *)textIndexWithTextIndex:(SCTextIndex *)index; 00113 00114 #pragma mark - 00115 #pragma mark Initializing Text Index 00116 00121 - (id)init; 00122 00129 - (id)initWithLine:(SCULong)line character:(SCULong)character; 00130 00136 - (id)initWithTextIndex:(SCTextIndex *)index; 00137 00138 #pragma mark - 00139 #pragma mark Setting and Getting Text Index Properties 00140 00145 - (SCULong)line; 00146 00151 - (SCULong)character; 00152 00157 - (NSString *)description; 00158 00163 - (void)setLine:(SCULong)line; 00164 00169 - (void)setCharacter:(SCULong)character; 00170 00176 - (void)setLine:(SCULong)line character:(SCULong)character; 00177 00182 - (void)setTextIndex:(SCTextIndex *)index; 00183 00184 #pragma mark - 00185 #pragma mark Comparing Text Index 00186 00193 - (BOOL)isEqualToTextIndex:(SCTextIndex *)index; 00194 00201 - (BOOL)isEqual:(id)object; 00202 00211 - (BOOL)isEqualToLine:(SCULong)line character:(SCULong)character; 00212 00213 @end 00214 00215 #pragma mark - 00216 #pragma mark Functions 00217 00224 SCTextIndex *SCMakeTextIndex( SCULong line, SCULong character);
1.7.3