Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
805 | - | 1 | // |
2 | // Copyright 2009-2010 Facebook |
||
3 | // |
||
4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
||
5 | // you may not use this file except in compliance with the License. |
||
6 | // You may obtain a copy of the License at |
||
7 | // |
||
8 | // http://www.apache.org/licenses/LICENSE-2.0 |
||
9 | // |
||
10 | // Unless required by applicable law or agreed to in writing, software |
||
11 | // distributed under the License is distributed on an "AS IS" BASIS, |
||
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
13 | // See the License for the specific language governing permissions and |
||
14 | // limitations under the License. |
||
15 | // |
||
16 | |||
17 | #import <Foundation/Foundation.h> |
||
18 | |||
19 | /** |
||
20 | * Creates a mutable array which does not retain references to the objects it contains. |
||
21 | * |
||
22 | * Typically used with arrays of delegates. |
||
23 | */ |
||
24 | NSMutableArray* TTCreateNonRetainingArray(); |
||
25 | |||
26 | /** |
||
27 | * Creates a mutable dictionary which does not retain references to the values it contains. |
||
28 | * |
||
29 | * Typically used with dictionaries of delegates. |
||
30 | */ |
||
31 | NSMutableDictionary* TTCreateNonRetainingDictionary(); |
||
32 | |||
33 | /** |
||
34 | * Tests if an object is an array which is not empty. |
||
35 | */ |
||
36 | BOOL TTIsArrayWithItems(id object); |
||
37 | |||
38 | /** |
||
39 | * Tests if an object is a set which is not empty. |
||
40 | */ |
||
41 | BOOL TTIsSetWithItems(id object); |
||
42 | |||
43 | /** |
||
44 | * Tests if an object is a string which is not empty. |
||
45 | */ |
||
46 | BOOL TTIsStringWithAnyText(id object); |
||
47 | |||
48 | /** |
||
49 | * Swap the two method implementations on the given class. |
||
50 | * Uses method_exchangeImplementations to accomplish this. |
||
51 | */ |
||
52 | void TTSwapMethods(Class cls, SEL originalSel, SEL newSel); |