Samond Classes Library 1.2.0-RELEASE build 166
SCList.h
Go to the documentation of this file.
1 //
2 // SCList.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 13.04.12.
6 // Copyright (c) 2007 - 2017 by Samond Development Corporation. All rights reserved.
7 //
8 
21 #import <scl/SCCollection.h>
22 
23 #pragma mark -
24 #pragma mark Константы класса
25 
29 #define SCListClass @"SCList"
30 
31 
64 @interface SCList : SCCollection {
65  NSMutableArray *fList; // Внутреннее представление списка
66  SCIndex fCurrentObject; // Индекс текущего объекта
67 }
68 
82 @property (nonatomic, retain, readonly, getter=currentObject) id currentObject;
83 
88 @property (nonatomic, retain, readonly, getter=currentString) NSString *currentString;
89 
94 @property (nonatomic, retain, readonly, getter=currentNumber) NSNumber *currentNumber;
95 
100 @property (nonatomic, retain, readonly, getter=firstObject) id firstObject;
101 
106 @property (nonatomic, retain, readonly, getter=firstString) NSString *firstString;
107 
112 @property (nonatomic, retain, readonly, getter=firstNumber) NSNumber *firstNumber;
113 
116 #pragma mark -
117 #pragma mark Инициализация списков
118 - (id)initWithName:(NSString *)name;
119 - (id)initWithObject:(id)object;
120 - (id)initWithObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
121 - (id)initWithCollection:(id)collection;
122 - (id)initWithList:(SCList *)list;
123 - (id)init;
124 
125 #pragma mark -
126 #pragma mark Доступ к объектам
127 - (id)currentObject;
128 - (NSString *)currentString;
129 - (NSNumber *)currentNumber;
130 - (SCByte)currentByte;
131 - (SCUByte)currentUByte;
132 - (SCShort)currentShort;
133 - (SCUShort)currentUShort;
134 - (SCInteger)currentInteger;
135 - (SCUInteger)currentUInteger;
136 - (SCLong)currentLong;
137 - (SCULong)currentULong;
138 - (char)currentChar;
139 - (unichar)currentUnichar;
140 - (const char *)currentCharString;
141 - (BOOL)currentBool;
142 - (SCFloat)currentFloat;
143 - (SCDouble)currentDouble;
144 
145 - (id)firstObject;
146 - (NSString *)firstString;
147 - (NSNumber *)firstNumber;
148 - (SCByte)firstByte;
149 - (SCUByte)firstUByte;
150 - (SCShort)firstShort;
151 - (SCUShort)firstUShort;
152 - (SCInteger)firstInteger;
153 - (SCUInteger)firstUInteger;
154 - (SCLong)firstLong;
155 - (SCULong)firstULong;
156 - (char)firstChar;
157 - (unichar)firstUnichar;
158 - (const char *)firstCharString;
159 - (BOOL)firstBool;
160 - (SCFloat)firstFloat;
161 - (SCDouble)firstDouble;
162 
163 #pragma mark -
164 #pragma mark Копирование списков
165 - (void)setList:(SCList *)list;
166 
167 #pragma mark -
168 #pragma mark Сравнение списков
169 - (BOOL)isEqualToList:(SCList *)list;
170 - (BOOL)isEqualToContentsOfList:(SCList *)list;
171 
172 #pragma mark -
173 #pragma mark Управление списком
174 - (id)nextObject;
175 
176 #pragma mark -
177 #pragma mark Добавление объектов
178 - (void)insertCurrentObject:(id)object;
179 - (void)insertCurrentByte:(SCByte)value;
180 - (void)insertCurrentUByte:(SCUByte)value;
181 - (void)insertCurrentShort:(SCShort)value;
182 - (void)insertCurrentUShort:(SCUShort)value;
183 - (void)insertCurrentInteger:(SCInteger)value;
184 - (void)insertCurrentUInteger:(SCUInteger)value;
185 - (void)insertCurrentLong:(SCLong)value;
186 - (void)insertCurrentULong:(SCULong)value;
187 - (void)insertCurrentChar:(char)value;
188 - (void)insertCurrentUnichar:(unichar)value;
189 - (void)insertCurrentCharString:(const char *)string;
190 - (void)insertCurrentBool:(BOOL)value;
191 - (void)insertCurrentFloat:(SCFloat)value;
192 - (void)insertCurrentDouble:(SCDouble)value;
193 - (void)insertCurrentObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
194 - (void)insertCurrentCollection:(id)collection;
195 
196 - (void)insertFirstObject:(id)object;
197 - (void)insertFirstByte:(SCByte)value;
198 - (void)insertFirstUByte:(SCUByte)value;
199 - (void)insertFirstShort:(SCShort)value;
200 - (void)insertFirstUShort:(SCUShort)value;
201 - (void)insertFirstInteger:(SCInteger)value;
202 - (void)insertFirstUInteger:(SCUInteger)value;
203 - (void)insertFirstLong:(SCLong)value;
204 - (void)insertFirstULong:(SCULong)value;
205 - (void)insertFirstChar:(char)value;
206 - (void)insertFirstUnichar:(unichar)value;
207 - (void)insertFirstCharString:(const char *)string;
208 - (void)insertFirstBool:(BOOL)value;
209 - (void)insertFirstFloat:(SCFloat)value;
210 - (void)insertFirstDouble:(SCDouble)value;
211 - (void)insertFirstObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
212 - (void)insertFirstCollection:(id)collection;
213 
214 #pragma mark -
215 #pragma mark Удаление объектов
216 - (void)removeCurrentObject;
217 - (void)removeFirstObject;
218 
219 #pragma mark -
220 #pragma mark Замена объектов
221 - (void)replaceCurrentObjectWithObject:(id)object;
222 - (void)replaceCurrentObjectWithByte:(SCByte)value;
223 - (void)replaceCurrentObjectWithUByte:(SCUByte)value;
224 - (void)replaceCurrentObjectWithShort:(SCShort)value;
225 - (void)replaceCurrentObjectWithUShort:(SCUShort)value;
226 - (void)replaceCurrentObjectWithInteger:(SCInteger)value;
227 - (void)replaceCurrentObjectWithUInteger:(SCUInteger)value;
228 - (void)replaceCurrentObjectWithLong:(SCLong)value;
229 - (void)replaceCurrentObjectWithULong:(SCULong)value;
230 - (void)replaceCurrentObjectWithChar:(char)value;
231 - (void)replaceCurrentObjectWithUnichar:(unichar)value;
232 - (void)replaceCurrentObjectWithCharString:(const char *)string;
233 - (void)replaceCurrentObjectWithBool:(BOOL)value;
234 - (void)replaceCurrentObjectWithFloat:(SCFloat)value;
235 - (void)replaceCurrentObjectWithDouble:(SCDouble)value;
236 
237 - (void)replaceFirstObjectWithObject:(id)object;
238 - (void)replaceFirstObjectWithByte:(SCByte)value;
239 - (void)replaceFirstObjectWithUByte:(SCUByte)value;
240 - (void)replaceFirstObjectWithShort:(SCShort)value;
241 - (void)replaceFirstObjectWithUShort:(SCUShort)value;
242 - (void)replaceFirstObjectWithInteger:(SCInteger)value;
243 - (void)replaceFirstObjectWithUInteger:(SCUInteger)value;
244 - (void)replaceFirstObjectWithLong:(SCLong)value;
245 - (void)replaceFirstObjectWithULong:(SCULong)value;
246 - (void)replaceFirstObjectWithChar:(char)value;
247 - (void)replaceFirstObjectWithUnichar:(unichar)value;
248 - (void)replaceFirstObjectWithCharString:(const char *)string;
249 - (void)replaceFirstObjectWithBool:(BOOL)value;
250 - (void)replaceFirstObjectWithFloat:(SCFloat)value;
251 - (void)replaceFirstObjectWithDouble:(SCDouble)value;
252 
253 #pragma mark -
254 #pragma mark Копирование объектов
255 - (void)duplicateCurrentObject;
256 - (void)duplicateFirstObject;
257 
258 @end
uint64_t SCULong
Definition: SCTypes.h:78
int16_t SCShort
Definition: SCTypes.h:42
SCULong SCIndex
Index data type.
Definition: SCTypes.h:240
int64_t SCLong
Definition: SCTypes.h:54
NSNumber * firstNumber
Definition: SCList.h:112
int32_t SCInteger
Definition: SCTypes.h:48
uint32_t SCUInteger
Definition: SCTypes.h:72
id currentObject
Definition: SCList.h:82
int8_t SCByte
Definition: SCTypes.h:36
uint16_t SCUShort
Definition: SCTypes.h:66
uint8_t SCUByte
Definition: SCTypes.h:60
NSString * firstString
Definition: SCList.h:106
id firstObject
Definition: SCList.h:100
float_t SCFloat
Definition: SCTypes.h:84
NSNumber * currentNumber
Definition: SCList.h:94
Parent class of the object list classes.
Definition: SCList.h:64
Abstract collections class.
Definition: SCCollection.h:94
NSString * currentString
Definition: SCList.h:88
double_t SCDouble
Definition: SCTypes.h:90