Samond Classes Library 1.2.0-RELEASE build 166
SCNSMutableOrderedSet.h
Go to the documentation of this file.
1 //
2 // SCNSMutableOrderedSet.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 25.01.16.
6 // Copyright (c) 2007 - 2017 by Samond Development Corporation. All rights reserved.
7 //
8 
23 #import <Foundation/Foundation.h>
24 #import <scl/SCCoding.h>
25 #import <scl/SCDictionaring.h>
26 #import <scl/SCStreaming.h>
27 #import <scl/SCCollectioning.h>
28 #import <scl/SCMutableCollection.h>
29 #import <scl/SCTypes.h>
30 #import <scl/SCCollection.h>
31 #import <scl/SCMutableIndexedCollection.h>
32 
33 #pragma mark -
34 #pragma mark Константы класса
35 
39 #define NSMutableOrderedSetClass @"NSMutableOrderedSet"
40 
58 
59 #pragma mark -
60 #pragma mark Создание упорядоченных множеств
61 + (NSMutableOrderedSet *)orderedSetWithAscendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
62 + (NSMutableOrderedSet *)orderedSetWithDescendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
63 + (NSMutableOrderedSet *)orderedSetWithSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
64 + (NSMutableOrderedSet *)orderedSetWithAscendingSortedCollection:(id)collection;
65 + (NSMutableOrderedSet *)orderedSetWithDescendingSortedCollection:(id)collection;
66 + (NSMutableOrderedSet *)orderedSetWithSortedCollection:(id)collection;
67 + (NSMutableOrderedSet *)orderedSetWithCollection:(id)collection;
68 
69 + (NSMutableOrderedSet *)orderedSetWithCoder:(NSCoder *)coder;
70 + (NSMutableOrderedSet *)orderedSetWithContentsOfSerializedFile:(NSString *)path;
71 + (NSMutableOrderedSet *)orderedSetWithDataDictionary:(NSDictionary *)dictionary;
72 + (NSMutableOrderedSet *)orderedSetWithDataDictionaryFromFile:(NSString *)path;
73 + (NSMutableOrderedSet *)orderedSetWithStream:(SCStream *)stream;
74 + (NSMutableOrderedSet *)orderedSetWithFileStream:(NSString *)path;
75 
76 #pragma mark -
77 #pragma mark Копирование упорядоченных множеств
78 - (void)setCollection:(id)collection;
79 - (void)setObject:(id)object;
80 - (void)setObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
81 - (void)setAscendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
82 - (void)setDescendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
83 - (void)setSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
84 - (void)setAscendingSortedCollection:(id)collection;
85 - (void)setDescendingSortedCollection:(id)collection;
86 - (void)setSortedCollection:(id)collection;
87 
88 #pragma mark -
89 #pragma mark Добавление объектов
90 - (void)addObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
91 - (void)addCollection:(id)collection;
92 
93 #pragma mark -
94 #pragma mark Удаление объектов
95 - (void)removeObjectsWithClass:(Class)oclass;
96 - (void)removeObjectsWithClassName:(NSString *)name;
97 - (void)removeCollection:(id)collection;
98 - (void)removeObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
99 
100 #pragma mark -
101 #pragma mark Замена объектов
102 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withCollection:(id)collection;
103 
104 #pragma mark -
105 #pragma mark Сортировка упорядоченных множеств
106 - (void)sortAscendingWithSorter:(id<SCSorter>)sorter;
107 - (void)sortDescendingWithSorter:(id<SCSorter>)sorter;
108 - (void)sortWithSorter:(id<SCSorter>)sorter;
109 - (void)sortAscending;
110 - (void)sortDescending;
111 - (void)sort;
112 
113 #pragma mark -
114 #pragma mark Дополнительные методы
115 - (void)moveObjectAtIndex:(SCIndex)index toIndex:(SCIndex)destination;
116 
117 @end
SCULong SCIndex
Index data type.
Definition: SCTypes.h:240
Standard class NSMutableOrderedSet functionality extending category.
Definition: SCNSMutableOrderedSet.h:56
Mutable collections protocol.
Definition: SCMutableCollection.h:38
Mutable indexed collection protocol.
Definition: SCMutableIndexedCollection.h:38
Standard protocol NSCoding extention protocol.
Definition: SCCoding.h:40
Abstract implementation of the protocol SCSorter.
Definition: SCSorter.h:37
Protocol of methods for data exchanging between class instances and classes NSDictionary and NSMutabl...
Definition: SCDictionaring.h:42
void sortAscending()
Definition: SCNSMutableOrderedSet.m:783
Collections communications protocol.
Definition: SCCollectioning.h:78
Streams communications protocol.
Definition: SCStreaming.h:40
void sortDescending()
Definition: SCNSMutableOrderedSet.m:795
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:242
void sort()
Definition: SCNSMutableOrderedSet.m:809