Samond Classes Library 1.2.0-RELEASE build 166
SCNSMutableArray.h
Go to the documentation of this file.
1 //
2 // SCMutableArrayNSMutableArray.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 13.05.12.
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/SCMutableIndexedCollection.h>
30 
31 #pragma mark -
32 #pragma mark Константы класса
33 
37 #define NSMutableArrayClass @"NSMutableArray"
38 
39 
55 
56 #pragma mark -
57 #pragma mark Создание массивов
58 + (NSMutableArray *)arrayWithAscendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
59 + (NSMutableArray *)arrayWithDescendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
60 + (NSMutableArray *)arrayWithSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
61 + (NSMutableArray *)arrayWithAscendingSortedCollection:(id)collection;
62 + (NSMutableArray *)arrayWithDescendingSortedCollection:(id)collection;
63 + (NSMutableArray *)arrayWithSortedCollection:(id)collection;
64 + (NSMutableArray *)arrayWithCollection:(id)collection;
65 
66 + (NSMutableArray *)arrayWithCoder:(NSCoder *)coder;
67 + (NSMutableArray *)arrayWithContentsOfSerializedFile:(NSString *)path;
68 + (NSMutableArray *)arrayWithDataDictionary:(NSDictionary *)dictionary;
69 + (NSMutableArray *)arrayWithDataDictionaryFromFile:(NSString *)path;
70 + (NSMutableArray *)arrayWithStream:(SCStream *)stream;
71 + (NSMutableArray *)arrayWithFileStream:(NSString *)path;
72 
73 #pragma mark -
74 #pragma mark Копирование массивов
75 - (void)setCollection:(id)collection;
76 - (void)setObject:(id)object;
77 - (void)setObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
78 - (void)setAscendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
79 - (void)setDescendingSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
80 - (void)setSortedCollection:(id)collection sorter:(id<SCSorter>)sorter;
81 - (void)setAscendingSortedCollection:(id)collection;
82 - (void)setDescendingSortedCollection:(id)collection;
83 - (void)setSortedCollection:(id)collection;
84 
85 #pragma mark -
86 #pragma mark Добавление объектов
87 - (void)addObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
88 - (void)addCollection:(id)collection;
89 
90 #pragma mark -
91 #pragma mark Удаление объектов
92 - (void)removeObjectsWithClass:(Class)oclass;
93 - (void)removeObjectsWithClassName:(NSString *)name;
94 - (void)removeCollection:(id)collection;
95 - (void)removeObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
96 
97 #pragma mark -
98 #pragma mark Замена объектов
99 - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withCollection:(id)collection;
100 - (void)replaceObjectsInRange:(NSRange)range withObjects:(id)object, ... NS_REQUIRES_NIL_TERMINATION;
101 - (void)replaceObjectsInRange:(NSRange)range withCollection:(id)collection;
102 
103 #pragma mark -
104 #pragma mark Сортировка массивов
105 - (void)sortAscendingWithSorter:(id<SCSorter>)sorter;
106 - (void)sortDescendingWithSorter:(id<SCSorter>)sorter;
107 - (void)sortWithSorter:(id<SCSorter>)sorter;
108 - (void)sortAscending;
109 - (void)sortDescending;
110 - (void)sort;
111 
112 #pragma mark -
113 #pragma mark Дополнительные методы
114 - (void)copyObjectAtIndex:(SCIndex)index toIndex:(SCIndex)destination;
115 - (void)moveObjectAtIndex:(SCIndex)index toIndex:(SCIndex)destination;
116 - (void)reverse;
117 
118 @end
SCULong SCIndex
Index data type.
Definition: SCTypes.h:240
void sortDescending()
Definition: SCNSMutableArray.m:858
Mutable collections protocol.
Definition: SCMutableCollection.h:38
void reverse()
Definition: SCNSMutableArray.m:925
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 sort()
Definition: SCNSMutableArray.m:872
void sortAscending()
Definition: SCNSMutableArray.m:846
Collections communications protocol.
Definition: SCCollectioning.h:78
Streams communications protocol.
Definition: SCStreaming.h:40
Standard class NSMutableArray functionality extending category.
Definition: SCNSMutableArray.h:53
Abstract parent class of the stream classes hierarchy.
Definition: SCStream.h:242