Samond Classes Library 1.2.6-STABLE build 219
SCCollectionException.h
Go to the documentation of this file.
1 //
2 // SCCollectionException.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 12.04.12.
6 // Copyright (c) 2007 - 2018 by Samond Development Corporation. All rights reserved.
7 //
8 
22 #import <Foundation/Foundation.h>
24 #import <scl/SCException.h>
25 
26 #pragma mark -
27 #pragma mark Class Constants
28 
37 #define SCCollectionExceptionClass @"SCCollectionException"
38 
43 #define SCCollectionErrorName @"SCCollection"
44 
45 
46 #pragma mark -
47 #pragma mark Error ID Contants
48 
57 #define SCCollectionEIDUnspecified @"SCL-20040"
58 
63 #define SCCollectionEIDSource @"SCL-20041"
64 
69 #define SCCollectionEIDType @"SCL-20042"
70 
75 #define SCCollectionEIDReadOnly @"SCL-20043"
76 
81 #define SCCollectionEIDItem @"SCL-20044"
82 
87 #define SCCollectionEIDObject @"SCL-20045"
88 
93 #define SCCollectionEIDUnsupported @"SCL-20046"
94 
99 #define SCCollectionEIDUnknown @"SCL-20047"
100 
105 #define SCCollectionEIDNotComparable @"SCL-20048"
106 
111 #define SCCollectionEIDNotSortable @"SCL-20049"
112 
117 #define SCCollectionEIDSorter @"SCL-20050"
118 
123 #define SCCollectionEIDIndex @"SCL-20052"
124 
129 #define SCCollectionEIDRange @"SCL-20053"
130 
135 #define SCCollectionEIDIndexSet @"SCL-20054"
136 
141 #define SCCollectionEIDIndexSetCount @"SCL-20055"
142 
147 #define SCCollectionEIDKey @"SCL-20056"
148 
153 #define SCCollectionEIDKeysCount @"SCL-20057"
154 
159 #define SCCollectionEIDValue @"SCL-20058"
160 
161 
162 #pragma mark -
163 #pragma mark Class Support Types
164 
173 typedef enum {
179 
185 
191 
197 
203 
209 
215 
221 
227 
233 
238 
244 
250 
256 
262 
268 
274 
280 
282 
283 
284 #pragma mark -
285 
338  NSString *_collectionName; // Collection name
339  NSString *_typeName; // Name of the unsupported collection type
340  NSString *_unsupported; // Unsupported class name
341  NSString *_unknown; // Unknown clas name
342  SCIndex _index; // Incorrect index
343  NSRange _range; // Incorrect reange of the objects
344  NSIndexSet *_indexSet; // Incorrect index set
345  SCULong _indexesCount; // Number of the indexes
346  SCULong _objectsCount; // Number of the objects
347  NSString *_key; // Incorrect object key
348  SCULong _keysCount; // Number of the keys
349 }
350 #pragma mark -
351 #pragma mark Instance Properties
352 
361 @property (nonatomic, readonly, retain) NSString *collectionName;
362 
367 @property (nonatomic, readonly, retain) NSString *typeName;
368 
373 @property (nonatomic, readonly, retain) NSString *unsupported;
374 
379 @property (nonatomic, readonly, retain) NSString *unknown;
380 
385 @property (nonatomic, readonly, assign) SCIndex index;
386 
391 @property (nonatomic, readonly, assign) NSRange range;
392 
397 @property (nonatomic, readonly, retain) NSIndexSet *indexSet;
398 
403 @property (nonatomic, readonly, assign) SCULong indexesCount;
404 
409 @property (nonatomic, readonly, assign) SCULong objectsCount;
410 
415 @property (nonatomic, readonly, retain) NSString *key;
416 
421 @property (nonatomic, readonly, assign) SCULong keysCount;
422 
425 #pragma mark -
426 #pragma mark Creating and Initializing the Generic Collection Exceptions
427 + (instancetype)exceptionWithName:(NSString *)name reason:(NSString *)reason code:(SCInteger)code eid:(NSString *)eid;
428 + (instancetype)exceptionWithReason:(NSString *)reason code:(SCInteger)code eid:(NSString *)eid;
429 + (instancetype)exceptionWithName:(NSString *)name;
430 + (instancetype)exception;
431 - (instancetype)initWithName:(NSString *)name reason:(NSString *)reason code:(SCInteger)code eid:(NSString *)eid;
432 - (instancetype)initWithReason:(NSString *)reason code:(SCInteger)code eid:(NSString *)eid;
433 
434 #pragma mark -
435 #pragma mark Creating Source Exception (SCL-20041)
436 + (instancetype)exceptionWithSource;
437 
438 #pragma mark -
439 #pragma mark Creating Unsupported Collection Type Exception (SCL-20042)
440 + (instancetype)exceptionWithUnsupportedType:(NSString *)type;
441 
442 #pragma mark -
443 #pragma mark Creating Read Only Exception (SCL-20043)
444 + (instancetype)exceptionWithReadOnlyType:(NSString *)type name:(NSString *)name;
445 + (instancetype)exceptionWithReadOnlyType:(NSString *)type;
446 
447 #pragma mark -
448 #pragma mark Creating Null Object Exception (SCL-20044)
449 + (instancetype)exceptionWithItemType:(NSString *)type name:(NSString *)name;
450 + (instancetype)exceptionWithItemType:(NSString *)type;
451 
452 #pragma mark -
453 #pragma mark Creating Source Object Exception (SCL-20045)
454 + (instancetype)exceptionWithObject;
455 
456 #pragma mark -
457 #pragma mark Creating Unsupported Class Exception (SCL-20046)
458 + (instancetype)exceptionWithUnsupported:(NSString *)cname type:(NSString *)type name:(NSString *)name;
459 + (instancetype)exceptionWithUnsupported:(NSString *)cname type:(NSString *)type;
460 
461 #pragma mark -
462 #pragma mark Creating Unknown Class Exception (SCL-20047)
463 + (instancetype)exceptionWithUnknown:(NSString *)cname type:(NSString *)type name:(NSString *)name;
464 + (instancetype)exceptionWithUnknown:(NSString *)cname type:(NSString *)type;
465 
466 #pragma mark -
467 #pragma mark Creating Incomparable Object Exception (SCL-20048)
468 + (instancetype)exceptionWithNotComparableType:(NSString *)type name:(NSString *)name;
469 + (instancetype)exceptionWithNotComparableType:(NSString *)type;
470 
471 #pragma mark -
472 #pragma mark Creating Unsortable Collection Exception (SCL-20049)
473 + (instancetype)exceptionWithNotSortableType:(NSString *)type name:(NSString *)name;
474 + (instancetype)exceptionWithNotSortableType:(NSString *)type;
475 
476 #pragma mark -
477 #pragma mark Creating Incorrect Sorter Exception (SCL-20050)
478 + (instancetype)exceptionWithSorterType:(NSString *)type name:(NSString *)name;
479 + (instancetype)exceptionWithSorterType:(NSString *)type;
480 
481 #pragma mark -
482 #pragma mark Creating Incorrect Index Exception (SCL-20052)
483 + (instancetype)exceptionWithIndex:(SCIndex)index name:(NSString *)name;
484 + (instancetype)exceptionWithIndex:(SCIndex)index;
485 
486 #pragma mark -
487 #pragma mark Creating Incorrect Range Exception (SCL-20053)
488 + (instancetype)exceptionWithRange:(NSRange)range name:(NSString *)name;
489 + (instancetype)exceptionWithRange:(NSRange)range;
490 
491 #pragma mark -
492 #pragma mark Creating Incorrect Index Set Exception (SCL-20054)
493 + (instancetype)exceptionWithIndexSet:(NSIndexSet *)indexSet name:(NSString *)name;
494 + (instancetype)exceptionWithIndexSet:(NSIndexSet *)indexSet;
495 
496 #pragma mark -
497 #pragma mark Creating Indexes and Objects Count Exception (SCL-20055)
498 + (instancetype)exceptionWithIndexesCount:(SCULong)indexes objectsCount:(SCULong)objects;
499 
500 #pragma mark -
501 #pragma mark Creating Incorrect Key Exception (SCL-20056)
502 + (instancetype)exceptionWithKey:(NSString *)key name:(NSString *)name;
503 + (instancetype)exceptionWithKey:(NSString *)key;
504 
505 #pragma mark -
506 #pragma mark Creating Keys and Objects Count Exception (SCL-20057)
507 + (instancetype)exceptionWithKeysCount:(SCULong)keys objectsCount:(SCULong)objects;
508 
509 #pragma mark -
510 #pragma mark Creating Empty Value Exception (SCL-20058)
511 + (instancetype)exceptionValueForKey:(NSString *)key name:(NSString *)name;
512 + (instancetype)exceptionValueForKey:(NSString *)key;
513 
514 @end
Definition: SCCollectionException.h:255
uint64_t SCULong
Definition: SCTypes.h:94
Definition: SCCollectionException.h:202
Definition: SCCollectionException.h:237
Definition: SCCollectionException.h:273
int32_t SCInteger
Definition: SCTypes.h:149
Definition: SCCollectionException.h:190
Definition: SCCollectionException.h:261
Parent class of all library exceptions.
Definition: SCException.h:72
SCCollectionError
Definition: SCCollectionException.h:173
Definition: SCCollectionException.h:267
Definition: SCCollectionException.h:279
Definition: SCCollectionException.h:226
Definition: SCCollectionException.h:243
Definition: SCCollectionException.h:249
Definition: SCCollectionException.h:208
Definition: SCCollectionException.h:232
Definition: SCCollectionException.h:184
Definition: SCCollectionException.h:196
Collection types protocols header file.
Definition: SCCollectionException.h:178
Definition: SCCollectionException.h:214
Exception SCException header file.
NSUInteger SCIndex
Definition: SCCollectionProtocols.h:53
Definition: SCCollectionException.h:220
Exception class SCCollectionException.
Definition: SCCollectionException.h:337