nano-store 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +5 -0
- data/README.md +3 -1
- data/Rakefile +1 -1
- data/lib/nano_store.rb +1 -1
- data/lib/nano_store/model.rb +11 -7
- data/lib/nano_store/version.rb +1 -1
- data/spec/model_spec.rb +2 -5
- data/vendor/Podfile.lock +4 -4
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoGlobals.h +3 -1
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoPredicate.h +5 -5
- data/vendor/Pods/BuildHeaders/NanoStore/NSFNanoSearch.h +4 -2
- data/vendor/Pods/Documentation/NanoStore/docset-installed.txt +4 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Info.plist +33 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoBag.html +2266 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoEngine.html +4708 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoExpression.html +818 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoObject.html +1781 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoPredicate.html +800 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoResult.html +1054 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoSearch.html +2544 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoSortDescriptor.html +713 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoStore.html +3723 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFOrderedDictionary.html +312 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Protocols/NSFNanoObjectProtocol.html +651 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/css/styles.css +584 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/css/stylesPrint.css +22 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/hierarchy.html +106 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/button_bar_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/disclosure.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/disclosure_open.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/library_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/img/title_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/index.html +654 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Nodes.xml +92 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens1.xml +596 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens10.xml +48 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens11.xml +118 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens2.xml +1209 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens3.xml +158 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens4.xml +455 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens5.xml +166 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens6.xml +246 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens7.xml +821 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens8.xml +125 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Tokens9.xml +1082 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.dsidx +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.mom +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.skidx +0 -0
- data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/docSet.toc +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoBag.html +2266 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoEngine.html +4708 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoExpression.html +818 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoObject.html +1781 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoPredicate.html +800 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoResult.html +1054 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoSearch.html +2544 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoSortDescriptor.html +713 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFNanoStore.html +3723 -0
- data/vendor/Pods/Documentation/NanoStore/html/Classes/NSFOrderedDictionary.html +312 -0
- data/vendor/Pods/Documentation/NanoStore/html/Protocols/NSFNanoObjectProtocol.html +651 -0
- data/vendor/Pods/Documentation/NanoStore/html/css/styles.css +584 -0
- data/vendor/Pods/Documentation/NanoStore/html/css/stylesPrint.css +22 -0
- data/vendor/Pods/Documentation/NanoStore/html/hierarchy.html +106 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/button_bar_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/disclosure.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/disclosure_open.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/library_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/img/title_background.png +0 -0
- data/vendor/Pods/Documentation/NanoStore/html/index.html +654 -0
- data/vendor/Pods/Headers/NanoStore/NSFNanoGlobals.h +3 -1
- data/vendor/Pods/Headers/NanoStore/NSFNanoPredicate.h +5 -5
- data/vendor/Pods/Headers/NanoStore/NSFNanoSearch.h +4 -2
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoGlobals.h +3 -1
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoGlobals.m +1 -0
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.h +5 -5
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoPredicate.m +15 -14
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.h +4 -2
- data/vendor/Pods/NanoStore/Classes/Public/NSFNanoSearch.m +95 -20
- data/vendor/Pods/Pods.bridgesupport +708 -700
- data/vendor/Pods/Pods.xcconfig +3 -3
- metadata +62 -4
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# [0.6.1](https://github.com/siuying/NanoStoreInMotion/compare/v0.6.0%E2%80%A6v0.6.1)
|
|
2
|
+
|
|
3
|
+
- ```attributes``` method to add multiple attributes in one line (thanks @gouravtiwari)
|
|
4
|
+
- Update for NanoStore 2.5.7
|
|
5
|
+
|
|
1
6
|
# [0.6.0](https://github.com/siuying/NanoStoreInMotion/compare/v0.5.2%E2%80%A6v0.6.0)
|
|
2
7
|
|
|
3
8
|
- Update for NanoStore 2.5.3, some notable changes:
|
data/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Motion::Project::App.setup do |app|
|
|
|
33
33
|
|
|
34
34
|
# Add the pod NanoStore to your project
|
|
35
35
|
app.pods do
|
|
36
|
-
pod 'NanoStore', '~> 2.5.
|
|
36
|
+
pod 'NanoStore', '~> 2.5.7'
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
```
|
|
@@ -73,6 +73,8 @@ Attributes must be serializable, which means that only the following data types
|
|
|
73
73
|
- NSData (*)
|
|
74
74
|
- NSDate
|
|
75
75
|
- NSNumber
|
|
76
|
+
- NSNull
|
|
77
|
+
- NSURL
|
|
76
78
|
|
|
77
79
|
#### Note
|
|
78
80
|
|
data/Rakefile
CHANGED
data/lib/nano_store.rb
CHANGED
data/lib/nano_store/model.rb
CHANGED
|
@@ -54,8 +54,12 @@ module NanoStore
|
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
def attributes
|
|
58
|
-
|
|
57
|
+
def attributes(*attrs)
|
|
58
|
+
if attrs.size > 0
|
|
59
|
+
attrs.each{|attr| attribute attr}
|
|
60
|
+
else
|
|
61
|
+
@attributes ||= []
|
|
62
|
+
end
|
|
59
63
|
end
|
|
60
64
|
|
|
61
65
|
def store
|
|
@@ -80,12 +84,12 @@ module NanoStore
|
|
|
80
84
|
end
|
|
81
85
|
|
|
82
86
|
class Model < NSFNanoObject
|
|
83
|
-
include ModelInstanceMethods
|
|
84
|
-
extend ModelClassMethods
|
|
85
|
-
extend FinderMethods
|
|
87
|
+
include NanoStore::ModelInstanceMethods
|
|
88
|
+
extend NanoStore::ModelClassMethods
|
|
89
|
+
extend NanoStore::FinderMethods
|
|
86
90
|
|
|
87
|
-
include AssociationInstanceMethods
|
|
88
|
-
extend AssociationClassMethods
|
|
91
|
+
include NanoStore::AssociationInstanceMethods
|
|
92
|
+
extend NanoStore::AssociationClassMethods
|
|
89
93
|
end
|
|
90
94
|
|
|
91
95
|
end
|
data/lib/nano_store/version.rb
CHANGED
data/spec/model_spec.rb
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
describe NanoStore::Model do
|
|
2
2
|
class User < NanoStore::Model
|
|
3
|
-
|
|
4
|
-
attribute :age
|
|
5
|
-
attribute :created_at
|
|
3
|
+
attributes :name, :age, :created_at
|
|
6
4
|
end
|
|
7
5
|
|
|
8
6
|
class Plane < NanoStore::Model
|
|
9
|
-
|
|
10
|
-
attribute :age
|
|
7
|
+
attributes :name, :age
|
|
11
8
|
end
|
|
12
9
|
|
|
13
10
|
class Listing < NanoStore::Model
|
data/vendor/Podfile.lock
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
PODS:
|
|
3
|
-
- NanoStore (2.5.
|
|
3
|
+
- NanoStore (2.5.7)
|
|
4
4
|
|
|
5
5
|
DEPENDENCIES:
|
|
6
|
-
- NanoStore (~> 2.5.
|
|
6
|
+
- NanoStore (~> 2.5.7)
|
|
7
7
|
|
|
8
8
|
SPEC CHECKSUMS:
|
|
9
|
-
NanoStore:
|
|
9
|
+
NanoStore: bca650b45d05084acf1c5cfc1b75985f5ce1e197
|
|
10
10
|
|
|
11
|
-
COCOAPODS: 0.16.
|
|
11
|
+
COCOAPODS: 0.16.1
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
/** * The comparison operator to be used. */
|
|
78
78
|
@property (nonatomic, assign, readonly) NSFMatchType match;
|
|
79
79
|
/** * The value to be used for comparison. */
|
|
80
|
-
@property (nonatomic,
|
|
80
|
+
@property (nonatomic, readonly) id value;
|
|
81
81
|
|
|
82
82
|
/** @name Creating and Initializing a Predicate
|
|
83
83
|
*/
|
|
@@ -87,22 +87,22 @@
|
|
|
87
87
|
/** * Creates and returns a predicate.
|
|
88
88
|
* @param theType is the column type. Can be \link Globals::NSFKeyColumn NSFKeyColumn \endlink, \link Globals::NSFAttributeColumn NSFAttributeColumn \endlink or \link Globals::NSFValueColumn NSFValueColumn \endlink.
|
|
89
89
|
* @param theMatch is the match operator.
|
|
90
|
-
* @param theValue
|
|
90
|
+
* @param theValue can be an NSString or [NSNull null]
|
|
91
91
|
* @return A predicate which can be used in an NSFNanoExpression.
|
|
92
92
|
* @see \link initWithColumn:matching:value: - (id)initWithColumn:(NSFTableColumnType)theType matching:(NSFMatchType)theMatch value:(NSString *)theValue \endlink
|
|
93
93
|
*/
|
|
94
94
|
|
|
95
|
-
+ (NSFNanoPredicate*)predicateWithColumn:(NSFTableColumnType)theType matching:(NSFMatchType)theMatch value:(
|
|
95
|
+
+ (NSFNanoPredicate*)predicateWithColumn:(NSFTableColumnType)theType matching:(NSFMatchType)theMatch value:(id)theValue;
|
|
96
96
|
|
|
97
97
|
/** * Initializes a newly allocated predicate.
|
|
98
98
|
* @param theType is the column type. Can be \link Globals::NSFKeyColumn NSFKeyColumn \endlink, \link Globals::NSFAttributeColumn NSFAttributeColumn \endlink or \link Globals::NSFValueColumn NSFValueColumn \endlink.
|
|
99
99
|
* @param theMatch is the match operator.
|
|
100
|
-
* @param theValue
|
|
100
|
+
* @param theValue can be an NSString or [NSNull null]
|
|
101
101
|
* @return A predicate which can be used in an NSFNanoExpression.
|
|
102
102
|
* @see \link predicateWithColumn:matching:value: + (NSFNanoPredicate*)predicateWithColumn:(NSFTableColumnType)theType matching:(NSFMatchType)theMatch value:(NSString *)theValue \endlink
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
-
- (id)initWithColumn:(NSFTableColumnType)theType matching:(NSFMatchType)theMatch value:(
|
|
105
|
+
- (id)initWithColumn:(NSFTableColumnType)theType matching:(NSFMatchType)theMatch value:(id)theValue;
|
|
106
106
|
|
|
107
107
|
//@}
|
|
108
108
|
|
|
@@ -180,6 +180,8 @@
|
|
|
180
180
|
@property (nonatomic, assign, readwrite) NSUInteger offset;
|
|
181
181
|
/** * The limit clause is used to place an upper bound on the number of rows returned by a Search operation. */
|
|
182
182
|
@property (nonatomic, assign, readwrite) NSUInteger limit;
|
|
183
|
+
/** * limit a Search to a particular bag. */
|
|
184
|
+
@property (nonatomic, assign, readwrite) NSFNanoBag *bag;
|
|
183
185
|
|
|
184
186
|
/** @name Creating and Initializing a Search
|
|
185
187
|
*/
|
|
@@ -213,7 +215,7 @@
|
|
|
213
215
|
* @param theReturnType the type of object to be returned. Can be \link Globals::NSFReturnObjects NSFReturnObjects \endlink or \link Globals::NSFReturnKeys NSFReturnKeys \endlink.
|
|
214
216
|
* @param outError is used if an error occurs. May be NULL.
|
|
215
217
|
* @return An array is returned if: 1) the sort has been specified or 2) the return type is \link Globals::NSFReturnKeys NSFReturnKeys \endlink. Otherwise, a dictionary is returned.
|
|
216
|
-
* @note The sort descriptor will be ignored when
|
|
218
|
+
* @note The sort descriptor will be ignored when the return type is NSFReturnKeys.
|
|
217
219
|
* @see \link searchObjectsAdded:date:returnType:error: - (id)searchObjectsAdded:(NSFDateMatchType)theDateMatch date:(NSDate *)theDate returnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink
|
|
218
220
|
*/
|
|
219
221
|
|
|
@@ -225,7 +227,7 @@
|
|
|
225
227
|
* @param theReturnType the type of object to be returned. Can be \link Globals::NSFReturnObjects NSFReturnObjects \endlink or \link Globals::NSFReturnKeys NSFReturnKeys \endlink.
|
|
226
228
|
* @param outError is used if an error occurs. May be NULL.
|
|
227
229
|
* @return If theReturnType is \link Globals::NSFReturnObjects NSFReturnObjects \endlink, a dictionary is returned. Otherwise, an array is returned.
|
|
228
|
-
* @note The sort descriptor will be ignored when
|
|
230
|
+
* @note The sort descriptor will be ignored when the return type is NSFReturnKeys.
|
|
229
231
|
* @see \link searchObjectsWithReturnType:error: - (id)searchObjectsWithReturnType:(NSFReturnType)theReturnType error:(out NSError **)outError \endlink
|
|
230
232
|
*/
|
|
231
233
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
7
|
+
<key>CFBundleIdentifier</key>
|
|
8
|
+
<string>org.cocoapods.NanoStore-2.5.7</string>
|
|
9
|
+
<key>CFBundleName</key>
|
|
10
|
+
<string>NanoStore 2.5.7 Documentation</string>
|
|
11
|
+
<key>CFBundleShortVersionString</key>
|
|
12
|
+
<string>1.0</string>
|
|
13
|
+
<key>CFBundleVersion</key>
|
|
14
|
+
<string>1.0</string>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<key>DocSetDescription</key>
|
|
18
|
+
<string>NanoStore is an open source, lightweight schema-less local key-value document store written in Objective-C for Mac OS X and iOS.</string>
|
|
19
|
+
|
|
20
|
+
<key>DocSetFeedName</key>
|
|
21
|
+
<string>NanoStore 2.5.7 Documentation</string>
|
|
22
|
+
|
|
23
|
+
<key>DocSetMinimumXcodeVersion</key>
|
|
24
|
+
<string>3.0</string>
|
|
25
|
+
|
|
26
|
+
<key>DocSetPublisherIdentifier</key>
|
|
27
|
+
<string>org.cocoapods.documentation</string>
|
|
28
|
+
<key>DocSetPublisherName</key>
|
|
29
|
+
<string>Tito Ciuro</string>
|
|
30
|
+
<key>NSHumanReadableCopyright</key>
|
|
31
|
+
<string>Tito Ciuro</string>
|
|
32
|
+
</dict>
|
|
33
|
+
</plist>
|
data/vendor/Pods/Documentation/NanoStore/docset/Contents/Resources/Documents/Classes/NSFNanoBag.html
ADDED
|
@@ -0,0 +1,2266 @@
|
|
|
1
|
+
<!DOCTYPE HTML>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
|
|
5
|
+
<title>NSFNanoBag Class Reference</title>
|
|
6
|
+
<meta id="xcode-display" name="xcode-display" content="render"/>
|
|
7
|
+
<meta name="viewport" content="width=550" />
|
|
8
|
+
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
|
|
9
|
+
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
|
|
10
|
+
<meta name="generator" content="appledoc 2.0.5 (build 789)" />
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header id="top_header">
|
|
14
|
+
<div id="library" class="hideInXcode">
|
|
15
|
+
<h1><a id="libraryTitle" href="../index.html">NanoStore 2.5.7 </a></h1>
|
|
16
|
+
<a id="developerHome" href="../index.html">Tito Ciuro</a>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div id="title" role="banner">
|
|
20
|
+
<h1 class="hideInXcode">NSFNanoBag Class Reference</h1>
|
|
21
|
+
</div>
|
|
22
|
+
<ul id="headerButtons" role="toolbar">
|
|
23
|
+
<li id="toc_button">
|
|
24
|
+
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
|
|
25
|
+
</li>
|
|
26
|
+
<li id="jumpto_button" role="navigation">
|
|
27
|
+
<select id="jumpTo">
|
|
28
|
+
<option value="top">Jump To…</option>
|
|
29
|
+
|
|
30
|
+
<option value="overview">Overview</option>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
<option value="tasks">Tasks</option>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<option value="properties">Properties</option>
|
|
42
|
+
|
|
43
|
+
<option value="//api/name/hasUnsavedChanges"> hasUnsavedChanges</option>
|
|
44
|
+
|
|
45
|
+
<option value="//api/name/key"> key</option>
|
|
46
|
+
|
|
47
|
+
<option value="//api/name/name"> name</option>
|
|
48
|
+
|
|
49
|
+
<option value="//api/name/removedObjects"> removedObjects</option>
|
|
50
|
+
|
|
51
|
+
<option value="//api/name/savedObjects"> savedObjects</option>
|
|
52
|
+
|
|
53
|
+
<option value="//api/name/store"> store</option>
|
|
54
|
+
|
|
55
|
+
<option value="//api/name/unsavedObjects"> unsavedObjects</option>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<option value="class_methods">Class Methods</option>
|
|
61
|
+
|
|
62
|
+
<option value="//api/name/bag"> + bag</option>
|
|
63
|
+
|
|
64
|
+
<option value="//api/name/bagWithObjects:"> + bagWithObjects:</option>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<option value="instance_methods">Instance Methods</option>
|
|
70
|
+
|
|
71
|
+
<option value="//api/name/JSONDescription"> - JSONDescription</option>
|
|
72
|
+
|
|
73
|
+
<option value="//api/name/_inflateObjectsWithKeys:"> - _inflateObjectsWithKeys:</option>
|
|
74
|
+
|
|
75
|
+
<option value="//api/name/_saveInStore:error:"> - _saveInStore:error:</option>
|
|
76
|
+
|
|
77
|
+
<option value="//api/name/_setStore:"> - _setStore:</option>
|
|
78
|
+
|
|
79
|
+
<option value="//api/name/addObject:error:"> - addObject:error:</option>
|
|
80
|
+
|
|
81
|
+
<option value="//api/name/addObjectsFromArray:error:"> - addObjectsFromArray:error:</option>
|
|
82
|
+
|
|
83
|
+
<option value="//api/name/count"> - count</option>
|
|
84
|
+
|
|
85
|
+
<option value="//api/name/deflateBag"> - deflateBag</option>
|
|
86
|
+
|
|
87
|
+
<option value="//api/name/description"> - description</option>
|
|
88
|
+
|
|
89
|
+
<option value="//api/name/dictionaryRepresentation"> - dictionaryRepresentation</option>
|
|
90
|
+
|
|
91
|
+
<option value="//api/name/inflateBag"> - inflateBag</option>
|
|
92
|
+
|
|
93
|
+
<option value="//api/name/initBagWithName:andObjects:"> - initBagWithName:andObjects:</option>
|
|
94
|
+
|
|
95
|
+
<option value="//api/name/isEqualToNanoBag:"> - isEqualToNanoBag:</option>
|
|
96
|
+
|
|
97
|
+
<option value="//api/name/reloadBagWithError:"> - reloadBagWithError:</option>
|
|
98
|
+
|
|
99
|
+
<option value="//api/name/removeAllObjects"> - removeAllObjects</option>
|
|
100
|
+
|
|
101
|
+
<option value="//api/name/removeObject:"> - removeObject:</option>
|
|
102
|
+
|
|
103
|
+
<option value="//api/name/removeObjectWithKey:"> - removeObjectWithKey:</option>
|
|
104
|
+
|
|
105
|
+
<option value="//api/name/removeObjectsInArray:"> - removeObjectsInArray:</option>
|
|
106
|
+
|
|
107
|
+
<option value="//api/name/removeObjectsWithKeysInArray:"> - removeObjectsWithKeysInArray:</option>
|
|
108
|
+
|
|
109
|
+
<option value="//api/name/saveAndReturnError:"> - saveAndReturnError:</option>
|
|
110
|
+
|
|
111
|
+
<option value="//api/name/undoChangesWithError:"> - undoChangesWithError:</option>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
</select>
|
|
116
|
+
</li>
|
|
117
|
+
</ul>
|
|
118
|
+
</header>
|
|
119
|
+
<nav id="tocContainer" class="isShowingTOC">
|
|
120
|
+
<ul id="toc" role="tree">
|
|
121
|
+
|
|
122
|
+
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
|
|
128
|
+
|
|
129
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Creating and Initializing Bags">Creating and Initializing Bags</a></span></li>
|
|
130
|
+
|
|
131
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Adding and Removing Objects">Adding and Removing Objects</a></span></li>
|
|
132
|
+
|
|
133
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Saving, Reloading and Undoing">Saving, Reloading and Undoing</a></span></li>
|
|
134
|
+
|
|
135
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Inflating and Deflating">Inflating and Deflating</a></span></li>
|
|
136
|
+
|
|
137
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Miscellaneous">Miscellaneous</a></span></li>
|
|
138
|
+
|
|
139
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Private Methods">Private Methods</a></span></li>
|
|
140
|
+
|
|
141
|
+
</ul></li>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
|
|
148
|
+
|
|
149
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/hasUnsavedChanges">hasUnsavedChanges</a></span></li>
|
|
150
|
+
|
|
151
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/key">key</a></span></li>
|
|
152
|
+
|
|
153
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/name">name</a></span></li>
|
|
154
|
+
|
|
155
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removedObjects">removedObjects</a></span></li>
|
|
156
|
+
|
|
157
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/savedObjects">savedObjects</a></span></li>
|
|
158
|
+
|
|
159
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/store">store</a></span></li>
|
|
160
|
+
|
|
161
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/unsavedObjects">unsavedObjects</a></span></li>
|
|
162
|
+
|
|
163
|
+
</ul></li>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
|
|
168
|
+
|
|
169
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/bag">bag</a></span></li>
|
|
170
|
+
|
|
171
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/bagWithObjects:">bagWithObjects:</a></span></li>
|
|
172
|
+
|
|
173
|
+
</ul></li>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
|
|
178
|
+
|
|
179
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/JSONDescription">JSONDescription</a></span></li>
|
|
180
|
+
|
|
181
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_inflateObjectsWithKeys:">_inflateObjectsWithKeys:</a></span></li>
|
|
182
|
+
|
|
183
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_saveInStore:error:">_saveInStore:error:</a></span></li>
|
|
184
|
+
|
|
185
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/_setStore:">_setStore:</a></span></li>
|
|
186
|
+
|
|
187
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/addObject:error:">addObject:error:</a></span></li>
|
|
188
|
+
|
|
189
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/addObjectsFromArray:error:">addObjectsFromArray:error:</a></span></li>
|
|
190
|
+
|
|
191
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/count">count</a></span></li>
|
|
192
|
+
|
|
193
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/deflateBag">deflateBag</a></span></li>
|
|
194
|
+
|
|
195
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/description">description</a></span></li>
|
|
196
|
+
|
|
197
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/dictionaryRepresentation">dictionaryRepresentation</a></span></li>
|
|
198
|
+
|
|
199
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/inflateBag">inflateBag</a></span></li>
|
|
200
|
+
|
|
201
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initBagWithName:andObjects:">initBagWithName:andObjects:</a></span></li>
|
|
202
|
+
|
|
203
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isEqualToNanoBag:">isEqualToNanoBag:</a></span></li>
|
|
204
|
+
|
|
205
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/reloadBagWithError:">reloadBagWithError:</a></span></li>
|
|
206
|
+
|
|
207
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removeAllObjects">removeAllObjects</a></span></li>
|
|
208
|
+
|
|
209
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removeObject:">removeObject:</a></span></li>
|
|
210
|
+
|
|
211
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removeObjectWithKey:">removeObjectWithKey:</a></span></li>
|
|
212
|
+
|
|
213
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removeObjectsInArray:">removeObjectsInArray:</a></span></li>
|
|
214
|
+
|
|
215
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/removeObjectsWithKeysInArray:">removeObjectsWithKeysInArray:</a></span></li>
|
|
216
|
+
|
|
217
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/saveAndReturnError:">saveAndReturnError:</a></span></li>
|
|
218
|
+
|
|
219
|
+
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/undoChangesWithError:">undoChangesWithError:</a></span></li>
|
|
220
|
+
|
|
221
|
+
</ul></li>
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
</ul>
|
|
225
|
+
</nav>
|
|
226
|
+
<article>
|
|
227
|
+
<div id="contents" class="isShowingTOC" role="main">
|
|
228
|
+
<a title="NSFNanoBag Class Reference" name="top"></a>
|
|
229
|
+
<div class="main-navigation navigation-top">
|
|
230
|
+
<ul>
|
|
231
|
+
<li><a href="../index.html">Index</a></li>
|
|
232
|
+
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
233
|
+
</ul>
|
|
234
|
+
</div>
|
|
235
|
+
<div id="header">
|
|
236
|
+
<div class="section-header">
|
|
237
|
+
<h1 class="title title-header">NSFNanoBag Class Reference</h1>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
<div id="container">
|
|
241
|
+
|
|
242
|
+
<div class="section section-specification"><table cellspacing="0"><tbody>
|
|
243
|
+
<tr>
|
|
244
|
+
<td class="specification-title">Inherits from</td>
|
|
245
|
+
<td class="specification-value">NSObject</td>
|
|
246
|
+
</tr><tr>
|
|
247
|
+
<td class="specification-title">Conforms to</td>
|
|
248
|
+
<td class="specification-value">NSCopying<br /><a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a></td>
|
|
249
|
+
</tr><tr>
|
|
250
|
+
<td class="specification-title">Declared in</td>
|
|
251
|
+
<td class="specification-value">NSFNanoBag.h</td>
|
|
252
|
+
</tr>
|
|
253
|
+
</tbody></table></div>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
<div class="section section-overview">
|
|
259
|
+
<a title="Overview" name="overview"></a>
|
|
260
|
+
<h2 class="subtitle subtitle-overview">Overview</h2>
|
|
261
|
+
<p>@class NSFNanoBag
|
|
262
|
+
* A <a href="#//api/name/bag">bag</a> is a loose collection of objects stored in a document <a href="#//api/name/store">store</a>.
|
|
263
|
+
*
|
|
264
|
+
* @note
|
|
265
|
+
* The objects must conform to the \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink. For your convenience, NanoStore provides you with <a href="../Classes/NSFNanoObject.html">NSFNanoObject</a>, which is the standard
|
|
266
|
+
* way of storing and retrieving objects from/to a <a href="#//api/name/bag">bag</a>.
|
|
267
|
+
*
|
|
268
|
+
* @par
|
|
269
|
+
* It’s more efficient to make your storage objects \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant, thus eliminating the need to convert your objects to/from
|
|
270
|
+
* objects of type <a href="../Classes/NSFNanoObject.html">NSFNanoObject</a>.
|
|
271
|
+
*
|
|
272
|
+
* @details <b>Example:</b>
|
|
273
|
+
@code
|
|
274
|
+
// Instantiate a NanoStore and open it
|
|
275
|
+
<a href="../Classes/NSFNanoStore.html">NSFNanoStore</a> *nanoStore = [NSFNanoStore createAndOpenStoreWithType:NSFMemoryStoreType path:nil error:nil];
|
|
276
|
+
[nanoStore removeAllObjectsFromStoreAndReturnError:nil];</p>
|
|
277
|
+
|
|
278
|
+
<p>// Add some data to a <a href="#//api/name/bag">bag</a>
|
|
279
|
+
NSFNanoBag <em><a href="#//api/name/bag">bag</a> = <a href="#//api/name/bag">[NSFNanoBag bag]</a>;
|
|
280
|
+
NSDictionary </em>info = …;
|
|
281
|
+
<a href="../Classes/NSFNanoObject.html">NSFNanoObject</a> <em>obj1 = [NSFNanoObject nanoObjectWithDictionary:info];
|
|
282
|
+
<a href="../Classes/NSFNanoObject.html">NSFNanoObject</a> </em>obj2 = [NSFNanoObject nanoObjectWithDictionary:info];
|
|
283
|
+
<a href="../Classes/NSFNanoObject.html">NSFNanoObject</a> *obj3 = [NSFNanoObject nanoObjectWithDictionary:info];
|
|
284
|
+
[<a href="#//api/name/bag">bag</a> addObjectsFromArray:[NSArray arrayWithObjects:obj1, obj2, obj3, nil] error:nil];</p>
|
|
285
|
+
|
|
286
|
+
<p>// Add the <a href="#//api/name/bag">bag</a> and its objects to the document <a href="#//api/name/store">store</a>
|
|
287
|
+
[nanoStore addObject:<a href="#//api/name/bag">bag</a> error:nil];</p>
|
|
288
|
+
|
|
289
|
+
<p>// Obtain the bags from the document <a href="#//api/name/store">store</a>
|
|
290
|
+
NSArray *bags = [nanoStore bags];</p>
|
|
291
|
+
|
|
292
|
+
<p>// Close the document store
|
|
293
|
+
[nanoStore closeWithError:nil];
|
|
294
|
+
@endcode</p>
|
|
295
|
+
|
|
296
|
+
<p>\cond</p>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
<div class="section section-tasks">
|
|
304
|
+
<a title="Tasks" name="tasks"></a>
|
|
305
|
+
<h2 class="subtitle subtitle-tasks">Tasks</h2>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
<h3 class="subsubtitle task-title">Other Methods</h3>
|
|
310
|
+
|
|
311
|
+
<ul class="task-list">
|
|
312
|
+
<li>
|
|
313
|
+
<span class="tooltip">
|
|
314
|
+
<code><a href="#//api/name/store"> store</a></code>
|
|
315
|
+
<span class="tooltip"><ul>
|
|
316
|
+
<li>The store where the <a href="#//api/name/bag">bag</a> is located.</li>
|
|
317
|
+
</ul>
|
|
318
|
+
</span>
|
|
319
|
+
</span>
|
|
320
|
+
<span class="task-item-suffix">property</span>
|
|
321
|
+
|
|
322
|
+
</li><li>
|
|
323
|
+
<span class="tooltip">
|
|
324
|
+
<code><a href="#//api/name/name"> name</a></code>
|
|
325
|
+
<span class="tooltip"><ul>
|
|
326
|
+
<li>The name of the <a href="#//api/name/bag">bag</a>.</li>
|
|
327
|
+
</ul>
|
|
328
|
+
</span>
|
|
329
|
+
</span>
|
|
330
|
+
<span class="task-item-suffix">property</span>
|
|
331
|
+
|
|
332
|
+
</li><li>
|
|
333
|
+
<span class="tooltip">
|
|
334
|
+
<code><a href="#//api/name/key"> key</a></code>
|
|
335
|
+
<span class="tooltip"><ul>
|
|
336
|
+
<li>The UUID of the <a href="#//api/name/bag">bag</a>.</li>
|
|
337
|
+
</ul>
|
|
338
|
+
</span>
|
|
339
|
+
</span>
|
|
340
|
+
<span class="task-item-suffix">property</span>
|
|
341
|
+
|
|
342
|
+
</li><li>
|
|
343
|
+
<span class="tooltip">
|
|
344
|
+
<code><a href="#//api/name/savedObjects"> savedObjects</a></code>
|
|
345
|
+
<span class="tooltip"><ul>
|
|
346
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
347
|
+
</ul>
|
|
348
|
+
</span>
|
|
349
|
+
</span>
|
|
350
|
+
<span class="task-item-suffix">property</span>
|
|
351
|
+
|
|
352
|
+
</li><li>
|
|
353
|
+
<span class="tooltip">
|
|
354
|
+
<code><a href="#//api/name/unsavedObjects"> unsavedObjects</a></code>
|
|
355
|
+
<span class="tooltip"><ul>
|
|
356
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
357
|
+
</ul>
|
|
358
|
+
</span>
|
|
359
|
+
</span>
|
|
360
|
+
<span class="task-item-suffix">property</span>
|
|
361
|
+
|
|
362
|
+
</li><li>
|
|
363
|
+
<span class="tooltip">
|
|
364
|
+
<code><a href="#//api/name/removedObjects"> removedObjects</a></code>
|
|
365
|
+
<span class="tooltip"><ul>
|
|
366
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
367
|
+
</ul>
|
|
368
|
+
</span>
|
|
369
|
+
</span>
|
|
370
|
+
<span class="task-item-suffix">property</span>
|
|
371
|
+
|
|
372
|
+
</li><li>
|
|
373
|
+
<span class="tooltip">
|
|
374
|
+
<code><a href="#//api/name/hasUnsavedChanges"> hasUnsavedChanges</a></code>
|
|
375
|
+
<span class="tooltip"><ul>
|
|
376
|
+
<li>To determine whether the <a href="#//api/name/bag">bag</a> has uncommited changes.</li>
|
|
377
|
+
</ul>
|
|
378
|
+
</span>
|
|
379
|
+
</span>
|
|
380
|
+
<span class="task-item-suffix">property</span>
|
|
381
|
+
|
|
382
|
+
</li>
|
|
383
|
+
</ul>
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
<a title="Creating and Initializing Bags" name="task_Creating and Initializing Bags"></a>
|
|
387
|
+
<h3 class="subsubtitle task-title">Creating and Initializing Bags</h3>
|
|
388
|
+
|
|
389
|
+
<ul class="task-list">
|
|
390
|
+
<li>
|
|
391
|
+
<span class="tooltip">
|
|
392
|
+
<code><a href="#//api/name/bag">+ bag</a></code>
|
|
393
|
+
<span class="tooltip"><p>Creates and returns an empty bag.</p></span>
|
|
394
|
+
</span>
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
</li><li>
|
|
398
|
+
<span class="tooltip">
|
|
399
|
+
<code><a href="#//api/name/bagWithObjects:">+ bagWithObjects:</a></code>
|
|
400
|
+
<span class="tooltip"><p>Creates and returns a <a href="#//api/name/bag">bag</a> adding to it the objects contained in the given array.</p></span>
|
|
401
|
+
</span>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
</li><li>
|
|
405
|
+
<span class="tooltip">
|
|
406
|
+
<code><a href="#//api/name/initBagWithName:andObjects:">– initBagWithName:andObjects:</a></code>
|
|
407
|
+
<span class="tooltip"><p>Initializes a newly allocated <a href="#//api/name/bag">bag</a> with the specified <a href="#//api/name/name">name</a> adding to it the objects contained in the given array.</p></span>
|
|
408
|
+
</span>
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
</li>
|
|
412
|
+
</ul>
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
<a title="Adding and Removing Objects" name="task_Adding and Removing Objects"></a>
|
|
416
|
+
<h3 class="subsubtitle task-title">Adding and Removing Objects</h3>
|
|
417
|
+
|
|
418
|
+
<ul class="task-list">
|
|
419
|
+
<li>
|
|
420
|
+
<span class="tooltip">
|
|
421
|
+
<code><a href="#//api/name/addObject:error:">– addObject:error:</a></code>
|
|
422
|
+
<span class="tooltip"><p>Adds an \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant object to the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
423
|
+
</span>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
</li><li>
|
|
427
|
+
<span class="tooltip">
|
|
428
|
+
<code><a href="#//api/name/addObjectsFromArray:error:">– addObjectsFromArray:error:</a></code>
|
|
429
|
+
<span class="tooltip"><p>Adds a series of \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant objects to the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
430
|
+
</span>
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
</li><li>
|
|
434
|
+
<span class="tooltip">
|
|
435
|
+
<code><a href="#//api/name/removeObject:">– removeObject:</a></code>
|
|
436
|
+
<span class="tooltip"><p>Removes the specified object from the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
437
|
+
</span>
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
</li><li>
|
|
441
|
+
<span class="tooltip">
|
|
442
|
+
<code><a href="#//api/name/removeAllObjects">– removeAllObjects</a></code>
|
|
443
|
+
<span class="tooltip"><p>Empties the <a href="#//api/name/bag">bag</a> of all its elements.</p></span>
|
|
444
|
+
</span>
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
</li><li>
|
|
448
|
+
<span class="tooltip">
|
|
449
|
+
<code><a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a></code>
|
|
450
|
+
<span class="tooltip"><p>Removes the list of objects from the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
451
|
+
</span>
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
</li><li>
|
|
455
|
+
<span class="tooltip">
|
|
456
|
+
<code><a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a></code>
|
|
457
|
+
<span class="tooltip"><p>Removes the object with a given <a href="#//api/name/key">key</a> from the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
458
|
+
</span>
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
</li><li>
|
|
462
|
+
<span class="tooltip">
|
|
463
|
+
<code><a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a></code>
|
|
464
|
+
<span class="tooltip"><p>Removes from the <a href="#//api/name/bag">bag</a> the objects specified by elements in a given array.</p></span>
|
|
465
|
+
</span>
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
</li>
|
|
469
|
+
</ul>
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
<a title="Saving, Reloading and Undoing" name="task_Saving, Reloading and Undoing"></a>
|
|
473
|
+
<h3 class="subsubtitle task-title">Saving, Reloading and Undoing</h3>
|
|
474
|
+
|
|
475
|
+
<ul class="task-list">
|
|
476
|
+
<li>
|
|
477
|
+
<span class="tooltip">
|
|
478
|
+
<code><a href="#//api/name/saveAndReturnError:">– saveAndReturnError:</a></code>
|
|
479
|
+
<span class="tooltip"><p>Saves the <a href="#//api/name/bag">bag</a> and its contents. Also, saves all the changes made since the last save.</p></span>
|
|
480
|
+
</span>
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
</li><li>
|
|
484
|
+
<span class="tooltip">
|
|
485
|
+
<code><a href="#//api/name/reloadBagWithError:">– reloadBagWithError:</a></code>
|
|
486
|
+
<span class="tooltip"><p>Refreshes the <a href="#//api/name/bag">bag</a> to match the contents stored in the document <a href="#//api/name/store">store</a>. The unsaved contents are preserved.</p></span>
|
|
487
|
+
</span>
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
</li><li>
|
|
491
|
+
<span class="tooltip">
|
|
492
|
+
<code><a href="#//api/name/undoChangesWithError:">– undoChangesWithError:</a></code>
|
|
493
|
+
<span class="tooltip"><p>Discards the changes made in the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
494
|
+
</span>
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
</li>
|
|
498
|
+
</ul>
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
<a title="Inflating and Deflating" name="task_Inflating and Deflating"></a>
|
|
502
|
+
<h3 class="subsubtitle task-title">Inflating and Deflating</h3>
|
|
503
|
+
|
|
504
|
+
<ul class="task-list">
|
|
505
|
+
<li>
|
|
506
|
+
<span class="tooltip">
|
|
507
|
+
<code><a href="#//api/name/inflateBag">– inflateBag</a></code>
|
|
508
|
+
<span class="tooltip"><p>Inflates the <a href="#//api/name/bag">bag</a> by reconstructing the objects flattened with – (void)<a href="#//api/name/deflateBag">deflateBag</a>;</p></span>
|
|
509
|
+
</span>
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
</li><li>
|
|
513
|
+
<span class="tooltip">
|
|
514
|
+
<code><a href="#//api/name/deflateBag">– deflateBag</a></code>
|
|
515
|
+
<span class="tooltip"><p>Releases memory by “flattening” the objects from the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
516
|
+
</span>
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
</li>
|
|
520
|
+
</ul>
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
<a title="Miscellaneous" name="task_Miscellaneous"></a>
|
|
524
|
+
<h3 class="subsubtitle task-title">Miscellaneous</h3>
|
|
525
|
+
|
|
526
|
+
<ul class="task-list">
|
|
527
|
+
<li>
|
|
528
|
+
<span class="tooltip">
|
|
529
|
+
<code><a href="#//api/name/count">– count</a></code>
|
|
530
|
+
<span class="tooltip"><p>Returns the number of objects currently in the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
531
|
+
</span>
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
</li><li>
|
|
535
|
+
<span class="tooltip">
|
|
536
|
+
<code><a href="#//api/name/isEqualToNanoBag:">– isEqualToNanoBag:</a></code>
|
|
537
|
+
<span class="tooltip"><p>Compares the receiving <a href="#//api/name/bag">bag</a> to another <a href="#//api/name/bag">bag</a>.</p></span>
|
|
538
|
+
</span>
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
</li><li>
|
|
542
|
+
<span class="tooltip">
|
|
543
|
+
<code><a href="#//api/name/dictionaryRepresentation">– dictionaryRepresentation</a></code>
|
|
544
|
+
<span class="tooltip"><p>Returns a dictionary that contains the information stored in the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
545
|
+
</span>
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
</li><li>
|
|
549
|
+
<span class="tooltip">
|
|
550
|
+
<code><a href="#//api/name/description">– description</a></code>
|
|
551
|
+
<span class="tooltip"><p>Returns a string representation of the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
552
|
+
</span>
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
</li><li>
|
|
556
|
+
<span class="tooltip">
|
|
557
|
+
<code><a href="#//api/name/JSONDescription">– JSONDescription</a></code>
|
|
558
|
+
<span class="tooltip"><p>Returns a JSON representation of the <a href="#//api/name/bag">bag</a>.</p></span>
|
|
559
|
+
</span>
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
</li>
|
|
563
|
+
</ul>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
<a title="Private Methods" name="task_Private Methods"></a>
|
|
567
|
+
<h3 class="subsubtitle task-title">Private Methods</h3>
|
|
568
|
+
|
|
569
|
+
<ul class="task-list">
|
|
570
|
+
<li>
|
|
571
|
+
<span class="tooltip">
|
|
572
|
+
<code><a href="#//api/name/_setStore:">– _setStore:</a></code>
|
|
573
|
+
|
|
574
|
+
</span>
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
</li><li>
|
|
578
|
+
<span class="tooltip">
|
|
579
|
+
<code><a href="#//api/name/_saveInStore:error:">– _saveInStore:error:</a></code>
|
|
580
|
+
|
|
581
|
+
</span>
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
</li><li>
|
|
585
|
+
<span class="tooltip">
|
|
586
|
+
<code><a href="#//api/name/_inflateObjectsWithKeys:">– _inflateObjectsWithKeys:</a></code>
|
|
587
|
+
|
|
588
|
+
</span>
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
</li>
|
|
592
|
+
</ul>
|
|
593
|
+
|
|
594
|
+
</div>
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
<div class="section section-methods">
|
|
601
|
+
<a title="Properties" name="properties"></a>
|
|
602
|
+
<h2 class="subtitle subtitle-methods">Properties</h2>
|
|
603
|
+
|
|
604
|
+
<div class="section-method">
|
|
605
|
+
<a name="//api/name/hasUnsavedChanges" title="hasUnsavedChanges"></a>
|
|
606
|
+
<h3 class="subsubtitle method-title">hasUnsavedChanges</h3>
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
<div class="method-subsection brief-description">
|
|
611
|
+
<ul>
|
|
612
|
+
<li>To determine whether the <a href="#//api/name/bag">bag</a> has uncommited changes.</li>
|
|
613
|
+
</ul>
|
|
614
|
+
|
|
615
|
+
</div>
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) BOOL hasUnsavedChanges</code></div>
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
<div class="method-subsection discussion-section">
|
|
630
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
631
|
+
<ul>
|
|
632
|
+
<li>To determine whether the <a href="#//api/name/bag">bag</a> has uncommited changes.</li>
|
|
633
|
+
</ul>
|
|
634
|
+
|
|
635
|
+
</div>
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
<div class="method-subsection declared-in-section">
|
|
644
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
645
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
646
|
+
</div>
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
</div>
|
|
650
|
+
|
|
651
|
+
<div class="section-method">
|
|
652
|
+
<a name="//api/name/key" title="key"></a>
|
|
653
|
+
<h3 class="subsubtitle method-title">key</h3>
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
<div class="method-subsection brief-description">
|
|
658
|
+
<ul>
|
|
659
|
+
<li>The UUID of the <a href="#//api/name/bag">bag</a>.</li>
|
|
660
|
+
</ul>
|
|
661
|
+
|
|
662
|
+
</div>
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readonly) NSString *key</code></div>
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
<div class="method-subsection discussion-section">
|
|
677
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
678
|
+
<ul>
|
|
679
|
+
<li>The UUID of the <a href="#//api/name/bag">bag</a>.</li>
|
|
680
|
+
</ul>
|
|
681
|
+
|
|
682
|
+
</div>
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
<div class="method-subsection declared-in-section">
|
|
691
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
692
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
693
|
+
</div>
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
</div>
|
|
697
|
+
|
|
698
|
+
<div class="section-method">
|
|
699
|
+
<a name="//api/name/name" title="name"></a>
|
|
700
|
+
<h3 class="subsubtitle method-title">name</h3>
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
<div class="method-subsection brief-description">
|
|
705
|
+
<ul>
|
|
706
|
+
<li>The name of the <a href="#//api/name/bag">bag</a>.</li>
|
|
707
|
+
</ul>
|
|
708
|
+
|
|
709
|
+
</div>
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readwrite) NSString *name</code></div>
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
<div class="method-subsection discussion-section">
|
|
724
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
725
|
+
<ul>
|
|
726
|
+
<li>The name of the <a href="#//api/name/bag">bag</a>.</li>
|
|
727
|
+
</ul>
|
|
728
|
+
|
|
729
|
+
</div>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
<div class="method-subsection declared-in-section">
|
|
738
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
739
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
740
|
+
</div>
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
</div>
|
|
744
|
+
|
|
745
|
+
<div class="section-method">
|
|
746
|
+
<a name="//api/name/removedObjects" title="removedObjects"></a>
|
|
747
|
+
<h3 class="subsubtitle method-title">removedObjects</h3>
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
<div class="method-subsection brief-description">
|
|
752
|
+
<ul>
|
|
753
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
754
|
+
</ul>
|
|
755
|
+
|
|
756
|
+
</div>
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NSDictionary *removedObjects</code></div>
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
<div class="method-subsection discussion-section">
|
|
771
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
772
|
+
<ul>
|
|
773
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
774
|
+
</ul>
|
|
775
|
+
|
|
776
|
+
</div>
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
<div class="method-subsection declared-in-section">
|
|
785
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
786
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
787
|
+
</div>
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
</div>
|
|
791
|
+
|
|
792
|
+
<div class="section-method">
|
|
793
|
+
<a name="//api/name/savedObjects" title="savedObjects"></a>
|
|
794
|
+
<h3 class="subsubtitle method-title">savedObjects</h3>
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
<div class="method-subsection brief-description">
|
|
799
|
+
<ul>
|
|
800
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
801
|
+
</ul>
|
|
802
|
+
|
|
803
|
+
</div>
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NSDictionary *savedObjects</code></div>
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
<div class="method-subsection discussion-section">
|
|
818
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
819
|
+
<ul>
|
|
820
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
821
|
+
</ul>
|
|
822
|
+
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
<div class="method-subsection declared-in-section">
|
|
832
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
833
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
834
|
+
</div>
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
</div>
|
|
838
|
+
|
|
839
|
+
<div class="section-method">
|
|
840
|
+
<a name="//api/name/store" title="store"></a>
|
|
841
|
+
<h3 class="subsubtitle method-title">store</h3>
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
<div class="method-subsection brief-description">
|
|
846
|
+
<ul>
|
|
847
|
+
<li>The store where the <a href="#//api/name/bag">bag</a> is located.</li>
|
|
848
|
+
</ul>
|
|
849
|
+
|
|
850
|
+
</div>
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, weak, readonly) NSFNanoStore *store</code></div>
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
<div class="method-subsection discussion-section">
|
|
865
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
866
|
+
<ul>
|
|
867
|
+
<li>The store where the <a href="#//api/name/bag">bag</a> is located.</li>
|
|
868
|
+
</ul>
|
|
869
|
+
|
|
870
|
+
</div>
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
<div class="method-subsection declared-in-section">
|
|
879
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
880
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
881
|
+
</div>
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
</div>
|
|
885
|
+
|
|
886
|
+
<div class="section-method">
|
|
887
|
+
<a name="//api/name/unsavedObjects" title="unsavedObjects"></a>
|
|
888
|
+
<h3 class="subsubtitle method-title">unsavedObjects</h3>
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
<div class="method-subsection brief-description">
|
|
893
|
+
<ul>
|
|
894
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
895
|
+
</ul>
|
|
896
|
+
|
|
897
|
+
</div>
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NSDictionary *unsavedObjects</code></div>
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
<div class="method-subsection discussion-section">
|
|
912
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
913
|
+
<ul>
|
|
914
|
+
<li>Dictionary of NSString (<a href="#//api/name/key">key</a>) and id<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a> (value).</li>
|
|
915
|
+
</ul>
|
|
916
|
+
|
|
917
|
+
</div>
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
<div class="method-subsection declared-in-section">
|
|
926
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
927
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
928
|
+
</div>
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
</div>
|
|
932
|
+
|
|
933
|
+
</div>
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
<div class="section section-methods">
|
|
938
|
+
<a title="Class Methods" name="class_methods"></a>
|
|
939
|
+
<h2 class="subtitle subtitle-methods">Class Methods</h2>
|
|
940
|
+
|
|
941
|
+
<div class="section-method">
|
|
942
|
+
<a name="//api/name/bag" title="bag"></a>
|
|
943
|
+
<h3 class="subsubtitle method-title">bag</h3>
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
<div class="method-subsection brief-description">
|
|
948
|
+
<p>Creates and returns an empty bag.</p>
|
|
949
|
+
</div>
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
<div class="method-subsection method-declaration"><code>+ (NSFNanoBag *)bag</code></div>
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
<div class="method-subsection return">
|
|
960
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
961
|
+
<p>An empty bag upon success, nil otherwise.</p>
|
|
962
|
+
</div>
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
<div class="method-subsection discussion-section">
|
|
969
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
970
|
+
<p>Creates and returns an empty bag.</p>
|
|
971
|
+
</div>
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
<div class="method-subsection declared-in-section">
|
|
980
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
981
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
982
|
+
</div>
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
</div>
|
|
986
|
+
|
|
987
|
+
<div class="section-method">
|
|
988
|
+
<a name="//api/name/bagWithObjects:" title="bagWithObjects:"></a>
|
|
989
|
+
<h3 class="subsubtitle method-title">bagWithObjects:</h3>
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
<div class="method-subsection brief-description">
|
|
994
|
+
<p>Creates and returns a <a href="#//api/name/bag">bag</a> adding to it the objects contained in the given array.</p>
|
|
995
|
+
</div>
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
<div class="method-subsection method-declaration"><code>+ (NSFNanoBag *)bagWithObjects:(NSArray *)<em>theObjects</em></code></div>
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
<div class="method-subsection arguments-section parameters">
|
|
1004
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1005
|
+
|
|
1006
|
+
<dl class="argument-def parameter-def">
|
|
1007
|
+
<dt><em>theObjects</em></dt>
|
|
1008
|
+
<dd><p>an array of objects conforming to the \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink.</p></dd>
|
|
1009
|
+
</dl>
|
|
1010
|
+
|
|
1011
|
+
</div>
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
<div class="method-subsection return">
|
|
1016
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1017
|
+
<p>A <a href="#//api/name/bag">bag</a> only containing the objects with conform to the \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink upon success, nil otherwise.
|
|
1018
|
+
@throws NSFUnexpectedParameterException is thrown if theObjects is nil.</p>
|
|
1019
|
+
</div>
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
<div class="method-subsection discussion-section">
|
|
1026
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1027
|
+
<p>Creates and returns a <a href="#//api/name/bag">bag</a> adding to it the objects contained in the given array.</p><div class="warning"><p><strong>Warning:</strong> If theObjects is nil, an NSFUnexpectedParameterException will be thrown. Use + <a href="#//api/name/bag">bag</a>; instead.</p></div>
|
|
1028
|
+
</div>
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
<div class="method-subsection declared-in-section">
|
|
1037
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1038
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1039
|
+
</div>
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
</div>
|
|
1043
|
+
|
|
1044
|
+
</div>
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
<div class="section section-methods">
|
|
1049
|
+
<a title="Instance Methods" name="instance_methods"></a>
|
|
1050
|
+
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
|
|
1051
|
+
|
|
1052
|
+
<div class="section-method">
|
|
1053
|
+
<a name="//api/name/JSONDescription" title="JSONDescription"></a>
|
|
1054
|
+
<h3 class="subsubtitle method-title">JSONDescription</h3>
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
<div class="method-subsection brief-description">
|
|
1059
|
+
<p>Returns a JSON representation of the <a href="#//api/name/bag">bag</a>.</p>
|
|
1060
|
+
</div>
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)JSONDescription</code></div>
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
<div class="method-subsection discussion-section">
|
|
1075
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1076
|
+
<p>Returns a JSON representation of the <a href="#//api/name/bag">bag</a>.</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
1077
|
+
</div>
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
<div class="method-subsection declared-in-section">
|
|
1086
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1087
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1088
|
+
</div>
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
</div>
|
|
1092
|
+
|
|
1093
|
+
<div class="section-method">
|
|
1094
|
+
<a name="//api/name/_inflateObjectsWithKeys:" title="_inflateObjectsWithKeys:"></a>
|
|
1095
|
+
<h3 class="subsubtitle method-title">_inflateObjectsWithKeys:</h3>
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
<div class="method-subsection method-declaration"><code>- (void)_inflateObjectsWithKeys:(NSArray *)<em>someKeys</em></code></div>
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
</div>
|
|
1103
|
+
|
|
1104
|
+
<div class="section-method">
|
|
1105
|
+
<a name="//api/name/_saveInStore:error:" title="_saveInStore:error:"></a>
|
|
1106
|
+
<h3 class="subsubtitle method-title">_saveInStore:error:</h3>
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)_saveInStore:(NSFNanoStore *)<em>someStore</em> error:(out NSError **)<em>outError</em></code></div>
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
</div>
|
|
1114
|
+
|
|
1115
|
+
<div class="section-method">
|
|
1116
|
+
<a name="//api/name/_setStore:" title="_setStore:"></a>
|
|
1117
|
+
<h3 class="subsubtitle method-title">_setStore:</h3>
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
<div class="method-subsection method-declaration"><code>- (void)_setStore:(NSFNanoStore *)<em>aStore</em></code></div>
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
</div>
|
|
1125
|
+
|
|
1126
|
+
<div class="section-method">
|
|
1127
|
+
<a name="//api/name/addObject:error:" title="addObject:error:"></a>
|
|
1128
|
+
<h3 class="subsubtitle method-title">addObject:error:</h3>
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
<div class="method-subsection brief-description">
|
|
1133
|
+
<p>Adds an \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant object to the <a href="#//api/name/bag">bag</a>.</p>
|
|
1134
|
+
</div>
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)addObject:(id<NSFNanoObjectProtocol>)<em>theObject</em> error:(out NSError **)<em>outError</em></code></div>
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
<div class="method-subsection arguments-section parameters">
|
|
1143
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1144
|
+
|
|
1145
|
+
<dl class="argument-def parameter-def">
|
|
1146
|
+
<dt><em>theObject</em></dt>
|
|
1147
|
+
<dd><p>is added to the <a href="#//api/name/bag">bag</a>.</p></dd>
|
|
1148
|
+
</dl>
|
|
1149
|
+
|
|
1150
|
+
<dl class="argument-def parameter-def">
|
|
1151
|
+
<dt><em>outError</em></dt>
|
|
1152
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
|
1153
|
+
</dl>
|
|
1154
|
+
|
|
1155
|
+
</div>
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
<div class="method-subsection return">
|
|
1160
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1161
|
+
<p>YES upon success, NO otherwise.</p>
|
|
1162
|
+
</div>
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
<div class="method-subsection discussion-section">
|
|
1169
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1170
|
+
<p>Adds an \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant object to the <a href="#//api/name/bag">bag</a>.</p><div class="warning"><p><strong>Warning:</strong> This value cannot be nil and it must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.
|
|
1171
|
+
@throws NSFNonConformingNanoObjectProtocolException is thrown if the object is non-\link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink compliant.</p></div>
|
|
1172
|
+
</div>
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
<div class="method-subsection see-also-section">
|
|
1179
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1180
|
+
<ul>
|
|
1181
|
+
|
|
1182
|
+
<li><code><p>\link <a href="#//api/name/addObjectsFromArray:error:">– addObjectsFromArray:error:</a> – (BOOL)addObjectsFromArray:(NSArray *)theObjects error:(out NSError **)outError \endlink</p></code></li>
|
|
1183
|
+
|
|
1184
|
+
</ul>
|
|
1185
|
+
</div>
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
<div class="method-subsection declared-in-section">
|
|
1190
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1191
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1192
|
+
</div>
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
</div>
|
|
1196
|
+
|
|
1197
|
+
<div class="section-method">
|
|
1198
|
+
<a name="//api/name/addObjectsFromArray:error:" title="addObjectsFromArray:error:"></a>
|
|
1199
|
+
<h3 class="subsubtitle method-title">addObjectsFromArray:error:</h3>
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
<div class="method-subsection brief-description">
|
|
1204
|
+
<p>Adds a series of \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant objects to the <a href="#//api/name/bag">bag</a>.</p>
|
|
1205
|
+
</div>
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)addObjectsFromArray:(NSArray *)<em>theObjects</em> error:(out NSError **)<em>outError</em></code></div>
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
<div class="method-subsection arguments-section parameters">
|
|
1214
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1215
|
+
|
|
1216
|
+
<dl class="argument-def parameter-def">
|
|
1217
|
+
<dt><em>theObjects</em></dt>
|
|
1218
|
+
<dd><p>is an array of objects to be added to the <a href="#//api/name/bag">bag</a>. The objects must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.</p></dd>
|
|
1219
|
+
</dl>
|
|
1220
|
+
|
|
1221
|
+
<dl class="argument-def parameter-def">
|
|
1222
|
+
<dt><em>outError</em></dt>
|
|
1223
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
|
1224
|
+
</dl>
|
|
1225
|
+
|
|
1226
|
+
</div>
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
<div class="method-subsection return">
|
|
1231
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1232
|
+
<p>YES upon success, NO otherwise.</p>
|
|
1233
|
+
</div>
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
<div class="method-subsection discussion-section">
|
|
1240
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1241
|
+
<p>Adds a series of \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant objects to the <a href="#//api/name/bag">bag</a>.</p><div class="warning"><p><strong>Warning:</strong> The objects of the array must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.
|
|
1242
|
+
@throws NSFNonConformingNanoObjectProtocolException is thrown if the object is non-\link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink compliant.</p></div>
|
|
1243
|
+
</div>
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
<div class="method-subsection see-also-section">
|
|
1250
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1251
|
+
<ul>
|
|
1252
|
+
|
|
1253
|
+
<li><code><p>\link <a href="#//api/name/addObject:error:">– addObject:error:</a> – (BOOL)addObject:(id <<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>>)theObject error:(out NSError **)outError \endlink</p></code></li>
|
|
1254
|
+
|
|
1255
|
+
</ul>
|
|
1256
|
+
</div>
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
<div class="method-subsection declared-in-section">
|
|
1261
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1262
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1263
|
+
</div>
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
</div>
|
|
1267
|
+
|
|
1268
|
+
<div class="section-method">
|
|
1269
|
+
<a name="//api/name/count" title="count"></a>
|
|
1270
|
+
<h3 class="subsubtitle method-title">count</h3>
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
<div class="method-subsection brief-description">
|
|
1275
|
+
<p>Returns the number of objects currently in the <a href="#//api/name/bag">bag</a>.</p>
|
|
1276
|
+
</div>
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
<div class="method-subsection method-declaration"><code>- (NSUInteger)count</code></div>
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
<div class="method-subsection return">
|
|
1287
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1288
|
+
<p>The number of objects currently in the <a href="#//api/name/bag">bag</a>.</p>
|
|
1289
|
+
</div>
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
<div class="method-subsection discussion-section">
|
|
1296
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1297
|
+
<p>Returns the number of objects currently in the <a href="#//api/name/bag">bag</a>.</p>
|
|
1298
|
+
</div>
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
<div class="method-subsection declared-in-section">
|
|
1307
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1308
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1309
|
+
</div>
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
</div>
|
|
1313
|
+
|
|
1314
|
+
<div class="section-method">
|
|
1315
|
+
<a name="//api/name/deflateBag" title="deflateBag"></a>
|
|
1316
|
+
<h3 class="subsubtitle method-title">deflateBag</h3>
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
<div class="method-subsection brief-description">
|
|
1321
|
+
<p>Releases memory by “flattening” the objects from the <a href="#//api/name/bag">bag</a>.</p>
|
|
1322
|
+
</div>
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
<div class="method-subsection method-declaration"><code>- (void)deflateBag</code></div>
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
<div class="method-subsection discussion-section">
|
|
1337
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1338
|
+
<p>Releases memory by “flattening” the objects from the <a href="#//api/name/bag">bag</a>.</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
1339
|
+
</div>
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
<div class="method-subsection see-also-section">
|
|
1346
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1347
|
+
<ul>
|
|
1348
|
+
|
|
1349
|
+
<li><code><p>\link <a href="#//api/name/inflateBag">– inflateBag</a> – (void)<a href="#//api/name/inflateBag">– inflateBag</a> \endlink</p></code></li>
|
|
1350
|
+
|
|
1351
|
+
</ul>
|
|
1352
|
+
</div>
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
<div class="method-subsection declared-in-section">
|
|
1357
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1358
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1359
|
+
</div>
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
</div>
|
|
1363
|
+
|
|
1364
|
+
<div class="section-method">
|
|
1365
|
+
<a name="//api/name/description" title="description"></a>
|
|
1366
|
+
<h3 class="subsubtitle method-title">description</h3>
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
<div class="method-subsection brief-description">
|
|
1371
|
+
<p>Returns a string representation of the <a href="#//api/name/bag">bag</a>.</p>
|
|
1372
|
+
</div>
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
<div class="method-subsection method-declaration"><code>- (NSString *)description</code></div>
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
<div class="method-subsection discussion-section">
|
|
1387
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1388
|
+
<p>Returns a string representation of the <a href="#//api/name/bag">bag</a>.</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
1389
|
+
</div>
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
<div class="method-subsection declared-in-section">
|
|
1398
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1399
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1400
|
+
</div>
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
</div>
|
|
1404
|
+
|
|
1405
|
+
<div class="section-method">
|
|
1406
|
+
<a name="//api/name/dictionaryRepresentation" title="dictionaryRepresentation"></a>
|
|
1407
|
+
<h3 class="subsubtitle method-title">dictionaryRepresentation</h3>
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
<div class="method-subsection brief-description">
|
|
1412
|
+
<p>Returns a dictionary that contains the information stored in the <a href="#//api/name/bag">bag</a>.</p>
|
|
1413
|
+
</div>
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
<div class="method-subsection method-declaration"><code>- (NSDictionary *)dictionaryRepresentation</code></div>
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
<div class="method-subsection discussion-section">
|
|
1428
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1429
|
+
<p>Returns a dictionary that contains the information stored in the <a href="#//api/name/bag">bag</a>.</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
1430
|
+
</div>
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
<div class="method-subsection see-also-section">
|
|
1437
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1438
|
+
<ul>
|
|
1439
|
+
|
|
1440
|
+
<li><code><p>\link <a href="#//api/name/description">– description</a> – (NSString *)<a href="#//api/name/description">– description</a> \endlink</p></code></li>
|
|
1441
|
+
|
|
1442
|
+
</ul>
|
|
1443
|
+
</div>
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
<div class="method-subsection declared-in-section">
|
|
1448
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1449
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1450
|
+
</div>
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
</div>
|
|
1454
|
+
|
|
1455
|
+
<div class="section-method">
|
|
1456
|
+
<a name="//api/name/inflateBag" title="inflateBag"></a>
|
|
1457
|
+
<h3 class="subsubtitle method-title">inflateBag</h3>
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
<div class="method-subsection brief-description">
|
|
1462
|
+
<p>Inflates the <a href="#//api/name/bag">bag</a> by reconstructing the objects flattened with – (void)<a href="#//api/name/deflateBag">deflateBag</a>;</p>
|
|
1463
|
+
</div>
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
<div class="method-subsection method-declaration"><code>- (void)inflateBag</code></div>
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
<div class="method-subsection discussion-section">
|
|
1478
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1479
|
+
<p>Inflates the <a href="#//api/name/bag">bag</a> by reconstructing the objects flattened with – (void)<a href="#//api/name/deflateBag">deflateBag</a>;</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
1480
|
+
</div>
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
<div class="method-subsection see-also-section">
|
|
1487
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1488
|
+
<ul>
|
|
1489
|
+
|
|
1490
|
+
<li><code><p>\link <a href="#//api/name/deflateBag">– deflateBag</a> – (void)<a href="#//api/name/deflateBag">– deflateBag</a> \endlink</p></code></li>
|
|
1491
|
+
|
|
1492
|
+
</ul>
|
|
1493
|
+
</div>
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
<div class="method-subsection declared-in-section">
|
|
1498
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1499
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1500
|
+
</div>
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
</div>
|
|
1504
|
+
|
|
1505
|
+
<div class="section-method">
|
|
1506
|
+
<a name="//api/name/initBagWithName:andObjects:" title="initBagWithName:andObjects:"></a>
|
|
1507
|
+
<h3 class="subsubtitle method-title">initBagWithName:andObjects:</h3>
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
<div class="method-subsection brief-description">
|
|
1512
|
+
<p>Initializes a newly allocated <a href="#//api/name/bag">bag</a> with the specified <a href="#//api/name/name">name</a> adding to it the objects contained in the given array.</p>
|
|
1513
|
+
</div>
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
<div class="method-subsection method-declaration"><code>- (id)initBagWithName:(NSString *)<em>theName</em> andObjects:(NSArray *)<em>someObjects</em></code></div>
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
<div class="method-subsection arguments-section parameters">
|
|
1522
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1523
|
+
|
|
1524
|
+
<dl class="argument-def parameter-def">
|
|
1525
|
+
<dt><em>theName</em></dt>
|
|
1526
|
+
<dd><p>the <a href="#//api/name/name">name</a> of the <a href="#//api/name/bag">bag</a>. Can be nil.</p></dd>
|
|
1527
|
+
</dl>
|
|
1528
|
+
|
|
1529
|
+
<dl class="argument-def parameter-def">
|
|
1530
|
+
<dt><em>theObjects</em></dt>
|
|
1531
|
+
<dd><p>is a required array of objects conforming to the \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink.</p></dd>
|
|
1532
|
+
</dl>
|
|
1533
|
+
|
|
1534
|
+
</div>
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
<div class="method-subsection return">
|
|
1539
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1540
|
+
<p>A <a href="#//api/name/bag">bag</a> only containing the objects with conform to the \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink upon success, nil otherwise.
|
|
1541
|
+
@throws NSFUnexpectedParameterException is thrown if theObjects is nil.</p>
|
|
1542
|
+
</div>
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
<div class="method-subsection discussion-section">
|
|
1549
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1550
|
+
<p>Initializes a newly allocated <a href="#//api/name/bag">bag</a> with the specified <a href="#//api/name/name">name</a> adding to it the objects contained in the given array.</p><div class="warning"><p><strong>Warning:</strong> If theObjects is nil, an NSFUnexpectedParameterException will be thrown.</p></div>
|
|
1551
|
+
</div>
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
<div class="method-subsection see-also-section">
|
|
1558
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1559
|
+
<ul>
|
|
1560
|
+
|
|
1561
|
+
<li><code><p>\link <a href="#//api/name/bagWithObjects:">+ bagWithObjects:</a> + (NSFNanoBag<em>)<a href="#//api/name/bagWithObjects:">+ bagWithObjects:</a>(NSArray </em>)theObjects \endlink</p></code></li>
|
|
1562
|
+
|
|
1563
|
+
</ul>
|
|
1564
|
+
</div>
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
<div class="method-subsection declared-in-section">
|
|
1569
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1570
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1571
|
+
</div>
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
</div>
|
|
1575
|
+
|
|
1576
|
+
<div class="section-method">
|
|
1577
|
+
<a name="//api/name/isEqualToNanoBag:" title="isEqualToNanoBag:"></a>
|
|
1578
|
+
<h3 class="subsubtitle method-title">isEqualToNanoBag:</h3>
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
<div class="method-subsection brief-description">
|
|
1583
|
+
<p>Compares the receiving <a href="#//api/name/bag">bag</a> to another <a href="#//api/name/bag">bag</a>.</p>
|
|
1584
|
+
</div>
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)isEqualToNanoBag:(NSFNanoBag *)<em>otherNanoBag</em></code></div>
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
<div class="method-subsection arguments-section parameters">
|
|
1593
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1594
|
+
|
|
1595
|
+
<dl class="argument-def parameter-def">
|
|
1596
|
+
<dt><em>otherNanoBag</em></dt>
|
|
1597
|
+
<dd><p>is a <a href="#//api/name/bag">bag</a>.</p></dd>
|
|
1598
|
+
</dl>
|
|
1599
|
+
|
|
1600
|
+
</div>
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
<div class="method-subsection return">
|
|
1605
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1606
|
+
<p>YES if the contents of otherNanoBag are equal to the contents of the receiving <a href="#//api/name/bag">bag</a>, otherwise NO.</p>
|
|
1607
|
+
</div>
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
<div class="method-subsection discussion-section">
|
|
1614
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1615
|
+
<p>Compares the receiving <a href="#//api/name/bag">bag</a> to another <a href="#//api/name/bag">bag</a>.</p>
|
|
1616
|
+
</div>
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
<div class="method-subsection declared-in-section">
|
|
1625
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1626
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1627
|
+
</div>
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
</div>
|
|
1631
|
+
|
|
1632
|
+
<div class="section-method">
|
|
1633
|
+
<a name="//api/name/reloadBagWithError:" title="reloadBagWithError:"></a>
|
|
1634
|
+
<h3 class="subsubtitle method-title">reloadBagWithError:</h3>
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
<div class="method-subsection brief-description">
|
|
1639
|
+
<p>Refreshes the <a href="#//api/name/bag">bag</a> to match the contents stored in the document <a href="#//api/name/store">store</a>. The unsaved contents are preserved.</p>
|
|
1640
|
+
</div>
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)reloadBagWithError:(out NSError **)<em>outError</em></code></div>
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
<div class="method-subsection arguments-section parameters">
|
|
1649
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1650
|
+
|
|
1651
|
+
<dl class="argument-def parameter-def">
|
|
1652
|
+
<dt><em>outError</em></dt>
|
|
1653
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
|
1654
|
+
</dl>
|
|
1655
|
+
|
|
1656
|
+
</div>
|
|
1657
|
+
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
<div class="method-subsection return">
|
|
1661
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
1662
|
+
<p>YES upon success, NO otherwise.</p>
|
|
1663
|
+
</div>
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
<div class="method-subsection discussion-section">
|
|
1670
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1671
|
+
<p>Refreshes the <a href="#//api/name/bag">bag</a> to match the contents stored in the document <a href="#//api/name/store">store</a>. The unsaved contents are preserved.</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
1672
|
+
</div>
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
<div class="method-subsection see-also-section">
|
|
1679
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1680
|
+
<ul>
|
|
1681
|
+
|
|
1682
|
+
<li><code><p>\link <a href="#//api/name/saveAndReturnError:">– saveAndReturnError:</a> – (BOOL)<a href="#//api/name/saveAndReturnError:">– saveAndReturnError:</a>(out NSError **)outError \endlink</p></code></li>
|
|
1683
|
+
|
|
1684
|
+
<li><code><p>\link <a href="#//api/name/undoChangesWithError:">– undoChangesWithError:</a> – (BOOL)<a href="#//api/name/undoChangesWithError:">– undoChangesWithError:</a>(out NSError **)outError \endlink</p></code></li>
|
|
1685
|
+
|
|
1686
|
+
</ul>
|
|
1687
|
+
</div>
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
<div class="method-subsection declared-in-section">
|
|
1692
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1693
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1694
|
+
</div>
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
</div>
|
|
1698
|
+
|
|
1699
|
+
<div class="section-method">
|
|
1700
|
+
<a name="//api/name/removeAllObjects" title="removeAllObjects"></a>
|
|
1701
|
+
<h3 class="subsubtitle method-title">removeAllObjects</h3>
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
<div class="method-subsection brief-description">
|
|
1706
|
+
<p>Empties the <a href="#//api/name/bag">bag</a> of all its elements.</p>
|
|
1707
|
+
</div>
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
<div class="method-subsection method-declaration"><code>- (void)removeAllObjects</code></div>
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
<div class="method-subsection discussion-section">
|
|
1722
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1723
|
+
<p>Empties the <a href="#//api/name/bag">bag</a> of all its elements.</p>
|
|
1724
|
+
</div>
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
<div class="method-subsection see-also-section">
|
|
1731
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1732
|
+
<ul>
|
|
1733
|
+
|
|
1734
|
+
<li><code><p>\link <a href="#//api/name/removeObject:">– removeObject:</a> – (void)<a href="#//api/name/removeObject:">– removeObject:</a>(id <<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>>)theObject \endlink</p></code></li>
|
|
1735
|
+
|
|
1736
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a> – (void)<a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a>(NSArray *)theObjects \endlink</p></code></li>
|
|
1737
|
+
|
|
1738
|
+
<li><code><p>\link <a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a> – (void)<a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a>(NSString *)theObjectKey \endlink</p></code></li>
|
|
1739
|
+
|
|
1740
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a> – (void)<a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a>(NSArray *)theKeys \endlink</p></code></li>
|
|
1741
|
+
|
|
1742
|
+
</ul>
|
|
1743
|
+
</div>
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
<div class="method-subsection declared-in-section">
|
|
1748
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1749
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1750
|
+
</div>
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
</div>
|
|
1754
|
+
|
|
1755
|
+
<div class="section-method">
|
|
1756
|
+
<a name="//api/name/removeObject:" title="removeObject:"></a>
|
|
1757
|
+
<h3 class="subsubtitle method-title">removeObject:</h3>
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
<div class="method-subsection brief-description">
|
|
1762
|
+
<p>Removes the specified object from the <a href="#//api/name/bag">bag</a>.</p>
|
|
1763
|
+
</div>
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
<div class="method-subsection method-declaration"><code>- (void)removeObject:(id<NSFNanoObjectProtocol>)<em>theObject</em></code></div>
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
<div class="method-subsection arguments-section parameters">
|
|
1772
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1773
|
+
|
|
1774
|
+
<dl class="argument-def parameter-def">
|
|
1775
|
+
<dt><em>theObject</em></dt>
|
|
1776
|
+
<dd><p>the object to be removed from the <a href="#//api/name/bag">bag</a>.</p></dd>
|
|
1777
|
+
</dl>
|
|
1778
|
+
|
|
1779
|
+
</div>
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
<div class="method-subsection discussion-section">
|
|
1788
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1789
|
+
<p>Removes the specified object from the <a href="#//api/name/bag">bag</a>.</p><div class="warning"><p><strong>Warning:</strong> The object must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.</p></div>
|
|
1790
|
+
</div>
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
<div class="method-subsection see-also-section">
|
|
1797
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1798
|
+
<ul>
|
|
1799
|
+
|
|
1800
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a> – (void)<a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a>(NSArray *)theObjects \endlink</p></code></li>
|
|
1801
|
+
|
|
1802
|
+
<li><code><p>\link <a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a> – (void)<a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a>(NSString *)theObjectKey \endlink</p></code></li>
|
|
1803
|
+
|
|
1804
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a> – (void)<a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a>(NSArray *)theKeys \endlink</p></code></li>
|
|
1805
|
+
|
|
1806
|
+
<li><code><p>\link <a href="#//api/name/removeAllObjects">– removeAllObjects</a> – (void)<a href="#//api/name/removeAllObjects">– removeAllObjects</a> \endlink</p></code></li>
|
|
1807
|
+
|
|
1808
|
+
</ul>
|
|
1809
|
+
</div>
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
<div class="method-subsection declared-in-section">
|
|
1814
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1815
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1816
|
+
</div>
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
</div>
|
|
1820
|
+
|
|
1821
|
+
<div class="section-method">
|
|
1822
|
+
<a name="//api/name/removeObjectWithKey:" title="removeObjectWithKey:"></a>
|
|
1823
|
+
<h3 class="subsubtitle method-title">removeObjectWithKey:</h3>
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
<div class="method-subsection brief-description">
|
|
1828
|
+
<p>Removes the object with a given <a href="#//api/name/key">key</a> from the <a href="#//api/name/bag">bag</a>.</p>
|
|
1829
|
+
</div>
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
<div class="method-subsection method-declaration"><code>- (void)removeObjectWithKey:(NSString *)<em>theObjectKey</em></code></div>
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
<div class="method-subsection arguments-section parameters">
|
|
1838
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1839
|
+
|
|
1840
|
+
<dl class="argument-def parameter-def">
|
|
1841
|
+
<dt><em>theObjectKey</em></dt>
|
|
1842
|
+
<dd><p>the <a href="#//api/name/key">key</a> of the object to be removed from the <a href="#//api/name/bag">bag</a>.</p></dd>
|
|
1843
|
+
</dl>
|
|
1844
|
+
|
|
1845
|
+
</div>
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
<div class="method-subsection discussion-section">
|
|
1854
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1855
|
+
<p>Removes the object with a given <a href="#//api/name/key">key</a> from the <a href="#//api/name/bag">bag</a>.</p><div class="warning"><p><strong>Warning:</strong> The object referenced by theObjectKey must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.</p></div>
|
|
1856
|
+
</div>
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
<div class="method-subsection see-also-section">
|
|
1863
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1864
|
+
<ul>
|
|
1865
|
+
|
|
1866
|
+
<li><code><p>\link <a href="#//api/name/removeObject:">– removeObject:</a> – (void)<a href="#//api/name/removeObject:">– removeObject:</a>(id <<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>>)theObject \endlink</p></code></li>
|
|
1867
|
+
|
|
1868
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a> – (void)<a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a>(NSArray *)theObjects \endlink</p></code></li>
|
|
1869
|
+
|
|
1870
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a> – (void)<a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a>(NSArray *)theKeys \endlink</p></code></li>
|
|
1871
|
+
|
|
1872
|
+
<li><code><p>\link <a href="#//api/name/removeAllObjects">– removeAllObjects</a> – (void)<a href="#//api/name/removeAllObjects">– removeAllObjects</a> \endlink</p></code></li>
|
|
1873
|
+
|
|
1874
|
+
</ul>
|
|
1875
|
+
</div>
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
<div class="method-subsection declared-in-section">
|
|
1880
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1881
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1882
|
+
</div>
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
</div>
|
|
1886
|
+
|
|
1887
|
+
<div class="section-method">
|
|
1888
|
+
<a name="//api/name/removeObjectsInArray:" title="removeObjectsInArray:"></a>
|
|
1889
|
+
<h3 class="subsubtitle method-title">removeObjectsInArray:</h3>
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
<div class="method-subsection brief-description">
|
|
1894
|
+
<p>Removes the list of objects from the <a href="#//api/name/bag">bag</a>.</p>
|
|
1895
|
+
</div>
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
|
|
1899
|
+
<div class="method-subsection method-declaration"><code>- (void)removeObjectsInArray:(NSArray *)<em>theObjects</em></code></div>
|
|
1900
|
+
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
<div class="method-subsection arguments-section parameters">
|
|
1904
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1905
|
+
|
|
1906
|
+
<dl class="argument-def parameter-def">
|
|
1907
|
+
<dt><em>theObjects</em></dt>
|
|
1908
|
+
<dd><p>the list of objects to be removed from the <a href="#//api/name/bag">bag</a>.</p></dd>
|
|
1909
|
+
</dl>
|
|
1910
|
+
|
|
1911
|
+
</div>
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
<div class="method-subsection discussion-section">
|
|
1920
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1921
|
+
<p>Removes the list of objects from the <a href="#//api/name/bag">bag</a>.</p><div class="warning"><p><strong>Warning:</strong> The objects of the array must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.</p></div>
|
|
1922
|
+
</div>
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
<div class="method-subsection see-also-section">
|
|
1929
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1930
|
+
<ul>
|
|
1931
|
+
|
|
1932
|
+
<li><code><p>\link <a href="#//api/name/removeObject:">– removeObject:</a> – (void)<a href="#//api/name/removeObject:">– removeObject:</a>(id <<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>>)theObject \endlink</p></code></li>
|
|
1933
|
+
|
|
1934
|
+
<li><code><p>\link <a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a> – (void)<a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a>(NSString *)theObjectKey \endlink</p></code></li>
|
|
1935
|
+
|
|
1936
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a> – (void)<a href="#//api/name/removeObjectsWithKeysInArray:">– removeObjectsWithKeysInArray:</a>(NSArray *)theKeys \endlink</p></code></li>
|
|
1937
|
+
|
|
1938
|
+
<li><code><p>\link <a href="#//api/name/removeAllObjects">– removeAllObjects</a> – (void)<a href="#//api/name/removeAllObjects">– removeAllObjects</a> \endlink</p></code></li>
|
|
1939
|
+
|
|
1940
|
+
</ul>
|
|
1941
|
+
</div>
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
<div class="method-subsection declared-in-section">
|
|
1946
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
1947
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
1948
|
+
</div>
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
</div>
|
|
1952
|
+
|
|
1953
|
+
<div class="section-method">
|
|
1954
|
+
<a name="//api/name/removeObjectsWithKeysInArray:" title="removeObjectsWithKeysInArray:"></a>
|
|
1955
|
+
<h3 class="subsubtitle method-title">removeObjectsWithKeysInArray:</h3>
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
<div class="method-subsection brief-description">
|
|
1960
|
+
<p>Removes from the <a href="#//api/name/bag">bag</a> the objects specified by elements in a given array.</p>
|
|
1961
|
+
</div>
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
<div class="method-subsection method-declaration"><code>- (void)removeObjectsWithKeysInArray:(NSArray *)<em>theKeys</em></code></div>
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
<div class="method-subsection arguments-section parameters">
|
|
1970
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
1971
|
+
|
|
1972
|
+
<dl class="argument-def parameter-def">
|
|
1973
|
+
<dt><em>theKeys</em></dt>
|
|
1974
|
+
<dd><p>an array of objects specifying the keys to remove from the <a href="#//api/name/bag">bag</a></p></dd>
|
|
1975
|
+
</dl>
|
|
1976
|
+
|
|
1977
|
+
</div>
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
<div class="method-subsection discussion-section">
|
|
1986
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
1987
|
+
<p>Removes from the <a href="#//api/name/bag">bag</a> the objects specified by elements in a given array.</p><div class="warning"><p><strong>Warning:</strong> The objects referenced by theKeys must be \link <a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>::initNanoObjectFromDictionaryRepresentation:forKey:store: NSFNanoObjectProtocol\endlink-compliant.</p></div>
|
|
1988
|
+
</div>
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
|
|
1994
|
+
<div class="method-subsection see-also-section">
|
|
1995
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
1996
|
+
<ul>
|
|
1997
|
+
|
|
1998
|
+
<li><code><p>\link <a href="#//api/name/removeObject:">– removeObject:</a> – (void)<a href="#//api/name/removeObject:">– removeObject:</a>(id <<a href="../Protocols/NSFNanoObjectProtocol.html">NSFNanoObjectProtocol</a>>)theObject \endlink</p></code></li>
|
|
1999
|
+
|
|
2000
|
+
<li><code><p>\link <a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a> – (void)<a href="#//api/name/removeObjectsInArray:">– removeObjectsInArray:</a>(NSArray *)theObjects \endlink</p></code></li>
|
|
2001
|
+
|
|
2002
|
+
<li><code><p>\link <a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a> – (void)<a href="#//api/name/removeObjectWithKey:">– removeObjectWithKey:</a>(NSString *)theObjectKey \endlink</p></code></li>
|
|
2003
|
+
|
|
2004
|
+
<li><code><p>\link <a href="#//api/name/removeAllObjects">– removeAllObjects</a> – (void)<a href="#//api/name/removeAllObjects">– removeAllObjects</a> \endlink</p></code></li>
|
|
2005
|
+
|
|
2006
|
+
</ul>
|
|
2007
|
+
</div>
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
|
|
2011
|
+
<div class="method-subsection declared-in-section">
|
|
2012
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
2013
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
2014
|
+
</div>
|
|
2015
|
+
|
|
2016
|
+
|
|
2017
|
+
</div>
|
|
2018
|
+
|
|
2019
|
+
<div class="section-method">
|
|
2020
|
+
<a name="//api/name/saveAndReturnError:" title="saveAndReturnError:"></a>
|
|
2021
|
+
<h3 class="subsubtitle method-title">saveAndReturnError:</h3>
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
<div class="method-subsection brief-description">
|
|
2026
|
+
<p>Saves the <a href="#//api/name/bag">bag</a> and its contents. Also, saves all the changes made since the last save.</p>
|
|
2027
|
+
</div>
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)saveAndReturnError:(out NSError **)<em>outError</em></code></div>
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
<div class="method-subsection arguments-section parameters">
|
|
2036
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
2037
|
+
|
|
2038
|
+
<dl class="argument-def parameter-def">
|
|
2039
|
+
<dt><em>outError</em></dt>
|
|
2040
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
|
2041
|
+
</dl>
|
|
2042
|
+
|
|
2043
|
+
</div>
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
<div class="method-subsection return">
|
|
2048
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
2049
|
+
<p>YES upon success, NO otherwise.</p>
|
|
2050
|
+
</div>
|
|
2051
|
+
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
<div class="method-subsection discussion-section">
|
|
2057
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
2058
|
+
<p>Saves the <a href="#//api/name/bag">bag</a> and its contents. Also, saves all the changes made since the last save.</p><div class="note"><p><strong>Note:</strong> Check property <a href="#//api/name/hasUnsavedChanges">hasUnsavedChanges</a> to find out whether the <a href="#//api/name/bag">bag</a> has unsaved contents.</p></div>
|
|
2059
|
+
</div>
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
<div class="method-subsection see-also-section">
|
|
2066
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
2067
|
+
<ul>
|
|
2068
|
+
|
|
2069
|
+
<li><code><p>\link <a href="#//api/name/reloadBagWithError:">– reloadBagWithError:</a> – (BOOL)<a href="#//api/name/reloadBagWithError:">– reloadBagWithError:</a>(out NSError **)outError \endlink</p></code></li>
|
|
2070
|
+
|
|
2071
|
+
<li><code><p>\link <a href="#//api/name/undoChangesWithError:">– undoChangesWithError:</a> – (BOOL)<a href="#//api/name/undoChangesWithError:">– undoChangesWithError:</a>(out NSError **)outError \endlink</p></code></li>
|
|
2072
|
+
|
|
2073
|
+
</ul>
|
|
2074
|
+
</div>
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
<div class="method-subsection declared-in-section">
|
|
2079
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
2080
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
2081
|
+
</div>
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
</div>
|
|
2085
|
+
|
|
2086
|
+
<div class="section-method">
|
|
2087
|
+
<a name="//api/name/undoChangesWithError:" title="undoChangesWithError:"></a>
|
|
2088
|
+
<h3 class="subsubtitle method-title">undoChangesWithError:</h3>
|
|
2089
|
+
|
|
2090
|
+
|
|
2091
|
+
|
|
2092
|
+
<div class="method-subsection brief-description">
|
|
2093
|
+
<p>Discards the changes made in the <a href="#//api/name/bag">bag</a>.</p>
|
|
2094
|
+
</div>
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
<div class="method-subsection method-declaration"><code>- (BOOL)undoChangesWithError:(out NSError **)<em>outError</em></code></div>
|
|
2099
|
+
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
<div class="method-subsection arguments-section parameters">
|
|
2103
|
+
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
2104
|
+
|
|
2105
|
+
<dl class="argument-def parameter-def">
|
|
2106
|
+
<dt><em>outError</em></dt>
|
|
2107
|
+
<dd><p>is used if an error occurs. May be NULL.</p></dd>
|
|
2108
|
+
</dl>
|
|
2109
|
+
|
|
2110
|
+
</div>
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
<div class="method-subsection return">
|
|
2115
|
+
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
2116
|
+
<p>YES upon success, NO otherwise.</p>
|
|
2117
|
+
</div>
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
<div class="method-subsection discussion-section">
|
|
2124
|
+
<h4 class="method-subtitle">Discussion</h4>
|
|
2125
|
+
<p>Discards the changes made in the <a href="#//api/name/bag">bag</a>.</p><div class="note"><p><strong>Note:</strong> Check properties <a href="#//api/name/savedObjects">savedObjects</a>, <a href="#//api/name/unsavedObjects">unsavedObjects</a> and <a href="#//api/name/removedObjects">removedObjects</a> to find out the current state of the <a href="#//api/name/bag">bag</a>.</p></div>
|
|
2126
|
+
</div>
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
<div class="method-subsection see-also-section">
|
|
2133
|
+
<h4 class="method-subtitle">See Also</h4>
|
|
2134
|
+
<ul>
|
|
2135
|
+
|
|
2136
|
+
<li><code><p>\link <a href="#//api/name/saveAndReturnError:">– saveAndReturnError:</a> – (BOOL)<a href="#//api/name/saveAndReturnError:">– saveAndReturnError:</a>(out NSError **)outError \endlink</p></code></li>
|
|
2137
|
+
|
|
2138
|
+
<li><code><p>\link <a href="#//api/name/reloadBagWithError:">– reloadBagWithError:</a> – (BOOL)<a href="#//api/name/reloadBagWithError:">– reloadBagWithError:</a>(out NSError **)outError \endlink</p></code></li>
|
|
2139
|
+
|
|
2140
|
+
</ul>
|
|
2141
|
+
</div>
|
|
2142
|
+
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
<div class="method-subsection declared-in-section">
|
|
2146
|
+
<h4 class="method-subtitle">Declared In</h4>
|
|
2147
|
+
<code class="declared-in-ref">NSFNanoBag.h</code><br />
|
|
2148
|
+
</div>
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
</div>
|
|
2152
|
+
|
|
2153
|
+
</div>
|
|
2154
|
+
|
|
2155
|
+
|
|
2156
|
+
</div>
|
|
2157
|
+
<div class="main-navigation navigation-bottom">
|
|
2158
|
+
<ul>
|
|
2159
|
+
<li><a href="../index.html">Index</a></li>
|
|
2160
|
+
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
2161
|
+
</ul>
|
|
2162
|
+
</div>
|
|
2163
|
+
<div id="footer">
|
|
2164
|
+
<hr />
|
|
2165
|
+
<div class="footer-copyright">
|
|
2166
|
+
<p><span class="copyright">© 2013 Tito Ciuro. All rights reserved. (Last updated: 2013-01-22)</span><br />
|
|
2167
|
+
|
|
2168
|
+
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.0.5 (build 789)</a>.</span></p>
|
|
2169
|
+
|
|
2170
|
+
</div>
|
|
2171
|
+
</div>
|
|
2172
|
+
</div>
|
|
2173
|
+
</article>
|
|
2174
|
+
<script type="text/javascript">
|
|
2175
|
+
function jumpToChange()
|
|
2176
|
+
{
|
|
2177
|
+
window.location.hash = this.options[this.selectedIndex].value;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
function toggleTOC()
|
|
2181
|
+
{
|
|
2182
|
+
var contents = document.getElementById('contents');
|
|
2183
|
+
var tocContainer = document.getElementById('tocContainer');
|
|
2184
|
+
|
|
2185
|
+
if (this.getAttribute('class') == 'open')
|
|
2186
|
+
{
|
|
2187
|
+
this.setAttribute('class', '');
|
|
2188
|
+
contents.setAttribute('class', '');
|
|
2189
|
+
tocContainer.setAttribute('class', '');
|
|
2190
|
+
|
|
2191
|
+
window.name = "hideTOC";
|
|
2192
|
+
}
|
|
2193
|
+
else
|
|
2194
|
+
{
|
|
2195
|
+
this.setAttribute('class', 'open');
|
|
2196
|
+
contents.setAttribute('class', 'isShowingTOC');
|
|
2197
|
+
tocContainer.setAttribute('class', 'isShowingTOC');
|
|
2198
|
+
|
|
2199
|
+
window.name = "";
|
|
2200
|
+
}
|
|
2201
|
+
return false;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
function toggleTOCEntryChildren(e)
|
|
2205
|
+
{
|
|
2206
|
+
e.stopPropagation();
|
|
2207
|
+
var currentClass = this.getAttribute('class');
|
|
2208
|
+
if (currentClass == 'children') {
|
|
2209
|
+
this.setAttribute('class', 'children open');
|
|
2210
|
+
}
|
|
2211
|
+
else if (currentClass == 'children open') {
|
|
2212
|
+
this.setAttribute('class', 'children');
|
|
2213
|
+
}
|
|
2214
|
+
return false;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
function tocEntryClick(e)
|
|
2218
|
+
{
|
|
2219
|
+
e.stopPropagation();
|
|
2220
|
+
return true;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
function init()
|
|
2224
|
+
{
|
|
2225
|
+
var selectElement = document.getElementById('jumpTo');
|
|
2226
|
+
selectElement.addEventListener('change', jumpToChange, false);
|
|
2227
|
+
|
|
2228
|
+
var tocButton = document.getElementById('table_of_contents');
|
|
2229
|
+
tocButton.addEventListener('click', toggleTOC, false);
|
|
2230
|
+
|
|
2231
|
+
var taskTreeItem = document.getElementById('task_treeitem');
|
|
2232
|
+
if (taskTreeItem.getElementsByTagName('li').length > 0)
|
|
2233
|
+
{
|
|
2234
|
+
taskTreeItem.setAttribute('class', 'children');
|
|
2235
|
+
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
var tocList = document.getElementById('toc');
|
|
2239
|
+
|
|
2240
|
+
var tocEntries = tocList.getElementsByTagName('li');
|
|
2241
|
+
for (var i = 0; i < tocEntries.length; i++) {
|
|
2242
|
+
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
var tocLinks = tocList.getElementsByTagName('a');
|
|
2246
|
+
for (var i = 0; i < tocLinks.length; i++) {
|
|
2247
|
+
tocLinks[i].addEventListener('click', tocEntryClick, false);
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
if (window.name == "hideTOC") {
|
|
2251
|
+
toggleTOC.call(tocButton);
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
window.onload = init;
|
|
2256
|
+
|
|
2257
|
+
// If showing in Xcode, hide the TOC and Header
|
|
2258
|
+
if (navigator.userAgent.match(/xcode/i)) {
|
|
2259
|
+
document.getElementById("contents").className = "hideInXcode"
|
|
2260
|
+
document.getElementById("tocContainer").className = "hideInXcode"
|
|
2261
|
+
document.getElementById("top_header").className = "hideInXcode"
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
</script>
|
|
2265
|
+
</body>
|
|
2266
|
+
</html>
|