Samond Classes Library 1.2.4-RELEASE build 198
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 - 2017 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 *fCollectionName; // Collection name
339  NSString *fTypeName; // Name of the unsupported collection type
340  NSString *fUnsupported; // Unsupported class name
341  NSString *fUnknown; // Unknown clas name
342  SCIndex fIndex; // Incorrect index
343  NSRange fRange; // Incorrect reange of the objects
344  NSIndexSet *fIndexSet; // Incorrect index set
345  SCULong fIndexesCount; // Number of the indexes
346  SCULong fObjectsCount; // Number of the objects
347  NSString *fKey; // Incorrect object key
348  SCULong fKeysCount; // 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 - (instancetype)initWithName:(NSString *)name;
434 - (instancetype)init;
435 
436 #pragma mark -
437 #pragma mark Creating and Initializing Source Exception (SCL-20041)
438 + (instancetype)exceptionWithSource;
439 - (instancetype)initWithSource;
440 
441 #pragma mark -
442 #pragma mark Creating and Initializing Unsupported Collection Type Exception (SCL-20042)
443 + (instancetype)exceptionWithUnsupportedType:(NSString *)type;
444 - (instancetype)initWithUnsupportedType:(NSString *)type;
445 
446 #pragma mark -
447 #pragma mark Creating and Initializing Read Only Exception (SCL-20043)
448 + (instancetype)exceptionWithReadOnlyType:(NSString *)type name:(NSString *)name;
449 + (instancetype)exceptionWithReadOnlyType:(NSString *)type;
450 - (instancetype)initWithReadOnlyType:(NSString *)type name:(NSString *)name;
451 - (instancetype)initWithReadOnlyType:(NSString *)type;
452 
453 #pragma mark -
454 #pragma mark Creating and Initializing Null Object Exception (SCL-20044)
455 + (instancetype)exceptionWithItemType:(NSString *)type name:(NSString *)name;
456 + (instancetype)exceptionWithItemType:(NSString *)type;
457 - (instancetype)initWithItemType:(NSString *)type name:(NSString *)name;
458 - (instancetype)initWithItemType:(NSString *)type;
459 
460 #pragma mark -
461 #pragma mark Creating and Initializing Source Object Exception (SCL-20045)
462 + (instancetype)exceptionWithObject;
463 - (instancetype)initWithObject;
464 
465 #pragma mark -
466 #pragma mark Creating and Initializing Unsupported Class Exception (SCL-20046)
467 + (instancetype)exceptionWithUnsupported:(NSString *)cname type:(NSString *)type name:(NSString *)name;
468 + (instancetype)exceptionWithUnsupported:(NSString *)cname type:(NSString *)type;
469 - (instancetype)initWithUnsupported:(NSString *)cname type:(NSString *)type name:(NSString *)name;
470 - (instancetype)initWithUnsupported:(NSString *)cname type:(NSString *)type;
471 
472 #pragma mark -
473 #pragma mark Creating and Initializing Unknown Class Exception (SCL-20047)
474 + (instancetype)exceptionWithUnknown:(NSString *)cname type:(NSString *)type name:(NSString *)name;
475 + (instancetype)exceptionWithUnknown:(NSString *)cname type:(NSString *)type;
476 - (instancetype)initWithUnknown:(NSString *)cname type:(NSString *)type name:(NSString *)name;
477 - (instancetype)initWithUnknown:(NSString *)cname type:(NSString *)type;
478 
479 #pragma mark -
480 #pragma mark Creating and Initializing Incomparable Object Exception (SCL-20048)
481 + (instancetype)exceptionWithNotComparableType:(NSString *)type name:(NSString *)name;
482 + (instancetype)exceptionWithNotComparableType:(NSString *)type;
483 - (instancetype)initWithNotComparableType:(NSString *)type name:(NSString *)name;
484 - (instancetype)initWithNotComparableType:(NSString *)type;
485 
486 #pragma mark -
487 #pragma mark Creating and Initializing Unsortable Collection Exception (SCL-20049)
488 + (instancetype)exceptionWithNotSortableType:(NSString *)type name:(NSString *)name;
489 + (instancetype)exceptionWithNotSortableType:(NSString *)type;
490 - (instancetype)initWithNotSortableType:(NSString *)type name:(NSString *)name;
491 - (instancetype)initWithNotSortableType:(NSString *)type;
492 
493 #pragma mark -
494 #pragma mark Creating and Initializing Incorrect Sorter Exception (SCL-20050)
495 + (instancetype)exceptionWithSorterType:(NSString *)type name:(NSString *)name;
496 + (instancetype)exceptionWithSorterType:(NSString *)type;
497 - (instancetype)initWithSorterType:(NSString *)type name:(NSString *)name;
498 - (instancetype)initWithSorterType:(NSString *)type;
499 
500 #pragma mark -
501 #pragma mark Creating and Initializing Incorrect Index Exception (SCL-20052)
502 + (instancetype)exceptionWithIndex:(SCIndex)index name:(NSString *)name;
503 + (instancetype)exceptionWithIndex:(SCIndex)index;
504 - (instancetype)initWithIndex:(SCIndex)index name:(NSString *)name;
505 - (instancetype)initWithIndex:(SCIndex)index;
506 
507 #pragma mark -
508 #pragma mark Creating and Initializing Incorrect Range Exception (SCL-20053)
509 + (instancetype)exceptionWithRange:(NSRange)range name:(NSString *)name;
510 + (instancetype)exceptionWithRange:(NSRange)range;
511 - (instancetype)initWithRange:(NSRange)range name:(NSString *)name;
512 - (instancetype)initWithRange:(NSRange)range;
513 
514 #pragma mark -
515 #pragma mark Creating and Initializing Incorrect Index Set Exception (SCL-20054)
516 + (instancetype)exceptionWithIndexSet:(NSIndexSet *)indexSet name:(NSString *)name;
517 + (instancetype)exceptionWithIndexSet:(NSIndexSet *)indexSet;
518 - (instancetype)initWithIndexSet:(NSIndexSet *)indexSet name:(NSString *)name;
519 - (instancetype)initWithIndexSet:(NSIndexSet *)indexSet;
520 
521 #pragma mark -
522 #pragma mark Creating and Initializing Indexes and Objects Count Exception (SCL-20055)
523 + (instancetype)exceptionWithIndexesCount:(SCULong)indexes objectsCount:(SCULong)objects;
524 - (instancetype)initWithIndexesCount:(SCULong)indexes objectsCount:(SCULong)objects;
525 
526 #pragma mark -
527 #pragma mark Creating and Initializing Incorrect Key Exception (SCL-20056)
528 + (instancetype)exceptionWithKey:(NSString *)key name:(NSString *)name;
529 + (instancetype)exceptionWithKey:(NSString *)key;
530 - (instancetype)initWithKey:(NSString *)key name:(NSString *)name;
531 - (instancetype)initWithKey:(NSString *)key;
532 
533 #pragma mark -
534 #pragma mark Creating and Initializing Keys and Objects Count Exception (SCL-20057)
535 + (instancetype)exceptionWithKeysCount:(SCULong)keys objectsCount:(SCULong)objects;
536 - (instancetype)initWithKeysCount:(SCULong)keys objectsCount:(SCULong)objects;
537 
538 #pragma mark -
539 #pragma mark Creating and Initializing Empty Value Exception (SCL-20058)
540 + (instancetype)exceptionValueForKey:(NSString *)key name:(NSString *)name;
541 + (instancetype)exceptionValueForKey:(NSString *)key;
542 - (instancetype)initValueForKey:(NSString *)key name:(NSString *)name;
543 - (instancetype)initValueForKey:(NSString *)key;
544 
545 @end
Definition: SCCollectionException.h:255
uint64_t SCULong
Definition: SCTypes.h:86
Definition: SCCollectionException.h:202
Definition: SCCollectionException.h:237
Definition: SCCollectionException.h:273
int32_t SCInteger
Definition: SCTypes.h:49
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