Skip to content

Commit 2e1fe1d

Browse files
committed
Generated docs HTML now goes to the FirebaseUI website. Fixed issue with __kindof (now returns id), clang-format changes to ignore certain pieces.
1 parent 756f99b commit 2e1fe1d

12 files changed

+327
-152
lines changed

FirebaseUI/API/FirebaseArray.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// clang-format off
2+
13
/*
24
* Firebase UI Bindings iOS Library
35
*
@@ -26,6 +28,8 @@
2628
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2729
*/
2830

31+
// clang-format on
32+
2933
#import <Foundation/Foundation.h>
3034
#import <FirebaseUI/XCodeMacros.h>
3135

FirebaseUI/API/FirebaseArrayDelegate.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// clang-format off
2+
13
/*
24
* Firebase UI Bindings iOS Library
35
*
@@ -26,11 +28,12 @@
2628
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2729
*/
2830

31+
// clang-format on
32+
2933
/**
3034
* A protocol to allow instances of FirebaseArray to raise events through a delegate. Raises all
3135
* Firebase events except FEventTypeValue.
3236
*/
33-
3437
@protocol FirebaseArrayDelegate<NSObject>
3538

3639
@optional

FirebaseUI/API/FirebaseCollectionViewDataSource.h

Lines changed: 114 additions & 55 deletions
Large diffs are not rendered by default.

FirebaseUI/API/FirebaseDataSource.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// clang-format off
2+
13
/*
24
* Firebase UI Bindings iOS Library
35
*
@@ -26,16 +28,21 @@
2628
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2729
*/
2830

31+
// clang-format on
32+
2933
#import <Foundation/Foundation.h>
3034

3135
#import "FirebaseArray.h"
3236

3337
@class Firebase;
3438

3539
/**
36-
* A FirebaseDataSource is a generic superclass for all Firebase datasources, like
37-
* FirebaseTableViewDataSource and FirebaseCollectionViewDataSource. It provides properties that all
38-
* subclasses need as well as several methods that pass through to the instance of FirebaseArray.
40+
* A FirebaseDataSource is a generic superclass for all Firebase datasources,
41+
* like
42+
* FirebaseTableViewDataSource and FirebaseCollectionViewDataSource. It provides
43+
* properties that all
44+
* subclasses need as well as several methods that pass through to the instance
45+
* of FirebaseArray.
3946
*/
4047
@interface FirebaseDataSource : NSObject<FirebaseArrayDelegate>
4148

Lines changed: 93 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// clang-format off
2+
13
/*
24
* Firebase UI Bindings iOS Library
35
*
@@ -26,6 +28,8 @@
2628
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2729
*/
2830

31+
// clang-format on
32+
2933
#import <UIKit/UIKit.h>
3034
#import <FirebaseUI/XCodeMacros.h>
3135

@@ -34,20 +38,30 @@
3438
@class Firebase;
3539

3640
/**
37-
* FirebaseTableViewDataSource provides an class that conforms to the UITableViewDataSource protocol
38-
* which allows UITableViews to implement FirebaseTableViewDataSource in order to provide a
39-
* UITableView synchronized to a Firebase reference or query. In addition to handling all Firebase
40-
* child events (added, changed, removed, moved), FirebaseTableViewDataSource handles
41-
* UITableViewCell creation, either with the default UITableViewCell, prototype cells, custom
42-
* UITableViewCell subclasses, or custom XIBs, and provides a simple [FirebaseTableViewDataSource
43-
* populateCellWithBlock:] method which allows developers to populate the cells created for them
41+
* FirebaseTableViewDataSource provides an class that conforms to the
42+
* UITableViewDataSource protocol
43+
* which allows UITableViews to implement FirebaseTableViewDataSource in order
44+
* to provide a
45+
* UITableView synchronized to a Firebase reference or query. In addition to
46+
* handling all Firebase
47+
* child events (added, changed, removed, moved), FirebaseTableViewDataSource
48+
* handles
49+
* UITableViewCell creation, either with the default UITableViewCell, prototype
50+
* cells, custom
51+
* UITableViewCell subclasses, or custom XIBs, and provides a simple
52+
* [FirebaseTableViewDataSource
53+
* populateCellWithBlock:] method which allows developers to populate the cells
54+
* created for them
4455
* with desired data from Firebase.
4556
*/
46-
@interface FirebaseTableViewDataSource : FirebaseDataSource<UITableViewDataSource>
57+
@interface FirebaseTableViewDataSource
58+
: FirebaseDataSource<UITableViewDataSource>
4759

4860
/**
49-
* The model class to coerce FDataSnapshots to (if desired). For instance, if the modelClass is set
50-
* to [Message class] in Obj-C or Message.self in Swift, then objects of type Message will be
61+
* The model class to coerce FDataSnapshots to (if desired). For instance, if
62+
* the modelClass is set
63+
* to [Message class] in Obj-C or Message.self in Swift, then objects of type
64+
* Message will be
5165
* returned instead of type FDataSnapshot.
5266
*/
5367
@property(strong, nonatomic, __NON_NULL) Class modelClass;
@@ -58,58 +72,70 @@
5872
@property(strong, nonatomic, __NON_NULL) NSString *reuseIdentifier;
5973

6074
/**
61-
* The UITableView instance that operations (inserts, removals, moves, etc.) are performed against.
75+
* The UITableView instance that operations (inserts, removals, moves, etc.) are
76+
* performed against.
6277
*/
6378
@property(strong, nonatomic, __NON_NULL) UITableView *tableView;
6479

6580
/**
66-
* Property to keep track of prototype cell use, to not register a class for the UICollectionView or
81+
* Property to keep track of prototype cell use, to not register a class for the
82+
* UICollectionView or
6783
* do similar book keeping.
6884
*/
6985
@property BOOL hasPrototypeCell;
7086

7187
/**
72-
* The callback to populate a subclass of UITableViewCell with an object provided by the datasource.
88+
* The callback to populate a subclass of UITableViewCell with an object
89+
* provided by the datasource.
7390
*/
7491
@property(strong, nonatomic, __NON_NULL) void (^populateCell)
75-
(__KINDOF UITableViewCell *__NON_NULL_PTR cell, __KINDOF NSObject *__NON_NULL_PTR object);
92+
(__KINDOF(UITableViewCell *) __NON_NULL_PTR cell,
93+
__KINDOF(NSObject *) __NON_NULL_PTR object);
7694

7795
/**
78-
* Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with
96+
* Initialize an instance of FirebaseTableViewDataSource that populates
97+
* UITableViewCells with
7998
* FDataSnapshots.
8099
* @param ref A Firebase reference to bind the datasource to
81100
* @param identifier A string to use as a CellReuseIdentifier
82101
* @param tableView An instance of a UITableView to bind to
83-
* @return An instance of FirebaseTableViewDataSource that populates UITableViewCells with
102+
* @return An instance of FirebaseTableViewDataSource that populates
103+
* UITableViewCells with
84104
* FDataSnapshots
85105
*/
86106
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
87107
cellReuseIdentifier:(__NON_NULL NSString *)identifier
88108
view:(__NON_NULL UITableView *)tableView;
89109

90110
/**
91-
* Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with
92-
* FDataSnapshots. Note that this method is used when using prototype cells, where the cells don't
111+
* Initialize an instance of FirebaseTableViewDataSource that populates
112+
* UITableViewCells with
113+
* FDataSnapshots. Note that this method is used when using prototype cells,
114+
* where the cells don't
93115
* need to be registered in the class.
94116
* @param ref A Firebase reference to bind the datasource to
95117
* @param identifier A string to use as a CellReuseIdentifier
96118
* @param tableView An instance of a UITableView to bind to
97-
* @return An instance of FirebaseTableViewDataSource that populates UITableViewCells with
119+
* @return An instance of FirebaseTableViewDataSource that populates
120+
* UITableViewCells with
98121
* FDataSnapshots
99122
*/
100123
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
101124
prototypeReuseIdentifier:(__NON_NULL NSString *)identifier
102125
view:(__NON_NULL UITableView *)tableView;
103126

104127
/**
105-
* Initialize an instance of FirebaseTableViewDataSource that populates a custom subclass of
128+
* Initialize an instance of FirebaseTableViewDataSource that populates a custom
129+
* subclass of
106130
* UITableViewCell with FDataSnapshots.
107131
* @param ref A Firebase reference to bind the datasource to
108-
* @param cell A subclass of UITableViewCell used to populate the UITableView, defaults to
132+
* @param cell A subclass of UITableViewCell used to populate the UITableView,
133+
* defaults to
109134
* UITableViewCell if nil
110135
* @param identifier A string to use as a CellReuseIdentifier
111136
* @param tableView An instance of a UITableView to bind to
112-
* @return An instance of FirebaseTableViewDataSource that populates a custom subclass of
137+
* @return An instance of FirebaseTableViewDataSource that populates a custom
138+
* subclass of
113139
* UITableViewCell with FDataSnapshots
114140
*/
115141
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
@@ -118,13 +144,16 @@
118144
view:(__NON_NULL UITableView *)tableView;
119145

120146
/**
121-
* Initialize an instance of FirebaseTableViewDataSource that populates a custom xib with
147+
* Initialize an instance of FirebaseTableViewDataSource that populates a custom
148+
* xib with
122149
* FDataSnapshots.
123150
* @param ref A Firebase reference to bind the datasource to
124-
* @param nibName The name of a xib file to create the layout for a UITableViewCell
151+
* @param nibName The name of a xib file to create the layout for a
152+
* UITableViewCell
125153
* @param identifier A string to use as a CellReuseIdentifier
126154
* @param tableView An instance of a UITableView to bind to
127-
* @return An instance of FirebaseTableViewDataSource that populates a custom xib with
155+
* @return An instance of FirebaseTableViewDataSource that populates a custom
156+
* xib with
128157
* FDataSnapshots
129158
*/
130159
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
@@ -133,13 +162,16 @@
133162
view:(__NON_NULL UITableView *)tableView;
134163

135164
/**
136-
* Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with a
165+
* Initialize an instance of FirebaseTableViewDataSource that populates
166+
* UITableViewCells with a
137167
* custom model class.
138168
* @param ref A Firebase reference to bind the datasource to
139-
* @param model A custom class that FDataSnapshots are coerced to, defaults to FDataSnapshot if nil
169+
* @param model A custom class that FDataSnapshots are coerced to, defaults to
170+
* FDataSnapshot if nil
140171
* @param identifier A string to use as a CellReuseIdentifier
141172
* @param tableView An instance of a UITableView to bind to
142-
* @return An instance of FirebaseTableViewDataSource that populates UITableViewCells with a custom
173+
* @return An instance of FirebaseTableViewDataSource that populates
174+
* UITableViewCells with a custom
143175
* model class
144176
*/
145177
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
@@ -148,14 +180,18 @@
148180
view:(__NON_NULL UITableView *)tableView;
149181

150182
/**
151-
* Initialize an instance of FirebaseTableViewDataSource that populates UITableViewCells with a
152-
* custom model class. Note that this method is used when using prototype cells, where the cells
183+
* Initialize an instance of FirebaseTableViewDataSource that populates
184+
* UITableViewCells with a
185+
* custom model class. Note that this method is used when using prototype cells,
186+
* where the cells
153187
* don't need to be registered in the class.
154188
* @param ref A Firebase reference to bind the datasource to
155-
* @param model A custom class that FDataSnapshots are coerced to, defaults to FDataSnapshot if nil
189+
* @param model A custom class that FDataSnapshots are coerced to, defaults to
190+
* FDataSnapshot if nil
156191
* @param identifier A string to use as a CellReuseIdentifier
157192
* @param tableView An instance of a UITableView to bind to
158-
* @return An instance of FirebaseTableViewDataSource that populates UITableViewCells with a custom
193+
* @return An instance of FirebaseTableViewDataSource that populates
194+
* UITableViewCells with a custom
159195
* model class
160196
*/
161197
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
@@ -164,15 +200,19 @@
164200
view:(__NON_NULL UITableView *)tableView;
165201

166202
/**
167-
* Initialize an instance of FirebaseTableViewDataSource that populates a custom subclass of
203+
* Initialize an instance of FirebaseTableViewDataSource that populates a custom
204+
* subclass of
168205
* UITableViewCell with a custom model class.
169206
* @param ref A Firebase reference to bind the datasource to
170-
* @param model A custom class that FDataSnapshots are coerced to, defaults to FDataSnapshot if nil
171-
* @param cell A subclass of UITableViewCell used to populate the UITableView, defaults to
207+
* @param model A custom class that FDataSnapshots are coerced to, defaults to
208+
* FDataSnapshot if nil
209+
* @param cell A subclass of UITableViewCell used to populate the UITableView,
210+
* defaults to
172211
* UITableViewCell if nil
173212
* @param identifier A string to use as a CellReuseIdentifier
174213
* @param tableView An instance of a UITableView to bind to
175-
* @return An instance of FirebaseTableViewDataSource that populates a custom subclass of
214+
* @return An instance of FirebaseTableViewDataSource that populates a custom
215+
* subclass of
176216
* UITableViewCell with a custom model class
177217
*/
178218
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
@@ -182,14 +222,18 @@
182222
view:(__NON_NULL UITableView *)tableView;
183223

184224
/**
185-
* Initialize an instance of FirebaseTableViewDataSource that populates a custom xib with a custom
225+
* Initialize an instance of FirebaseTableViewDataSource that populates a custom
226+
* xib with a custom
186227
* model class.
187228
* @param ref A Firebase reference to bind the datasource to
188-
* @param model A custom class that FDataSnapshots are coerced to, defaults to FDataSnapshot if nil
189-
* @param nibName The name of a xib file to create the layout for a UITableViewCell
229+
* @param model A custom class that FDataSnapshots are coerced to, defaults to
230+
* FDataSnapshot if nil
231+
* @param nibName The name of a xib file to create the layout for a
232+
* UITableViewCell
190233
* @param identifier A string to use as a CellReuseIdentifier
191234
* @param tableView An instance of a UITableView to bind to
192-
* @return An instance of FirebaseTableViewDataSource that populates a custom xib with a custom
235+
* @return An instance of FirebaseTableViewDataSource that populates a custom
236+
* xib with a custom
193237
* model class
194238
*/
195239
- (__NON_NULL instancetype)initWithRef:(__NON_NULL Firebase *)ref
@@ -199,12 +243,17 @@
199243
view:(__NON_NULL UITableView *)tableView;
200244

201245
/**
202-
* This method populates the fields of a UITableViewCell or subclass given a model object (or
246+
* This method populates the fields of a UITableViewCell or subclass given a
247+
* model object (or
203248
* FDataSnapshot).
204-
* @param callback A block which returns an initialized UITableViewCell (or subclass) and the
249+
* @param callback A block which returns an initialized UITableViewCell (or
250+
* subclass) and the
205251
* corresponding object to populate the cell with.
206252
*/
207-
- (void)populateCellWithBlock:(nonnull void (^)(__KINDOF UITableViewCell *__NON_NULL_PTR cell,
208-
__KINDOF NSObject *__NON_NULL_PTR object))callback;
253+
// clang-format off
254+
- (void)populateCellWithBlock:
255+
(nonnull void (^)(__KINDOF(UITableViewCell *)__NON_NULL_PTR cell,
256+
__KINDOF(NSObject *)__NON_NULL_PTR object))callback;
257+
// clang-format on
209258

210259
@end

FirebaseUI/API/FirebaseUI.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// clang-format off
2+
13
/*
24
* Firebase UI Bindings iOS Library
35
*
@@ -26,6 +28,8 @@
2628
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2729
*/
2830

31+
// clang-format on
32+
2933
#import <Foundation/Foundation.h>
3034

3135
#import <FirebaseUI/FirebaseArray.h>

FirebaseUI/Implementation/FirebaseArray.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// clang-format off
2+
13
/*
24
* Firebase UI Bindings iOS Library
35
*
@@ -7,8 +9,7 @@
79
* Redistribution and use in source and binary forms, with or without
810
* modification, are permitted provided that the following conditions are met:
911
*
10-
* 1. Redistributions of source code must retain the above copyright notice,
11-
*this
12+
* 1. Redistributions of source code must retain the above copyright notice, this
1213
* list of conditions and the following disclaimer.
1314
*
1415
* 2. Redistributions in binaryform must reproduce the above copyright notice,
@@ -19,17 +20,16 @@
1920
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2021
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
2122
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
22-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23-
*(INCLUDING,
23+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2424
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26-
*OF
27-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28-
*NEGLIGENCE
25+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
2927
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
3028
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3129
*/
3230

31+
// clang-format on
32+
3333
#import <Firebase/Firebase.h>
3434

3535
#import "FirebaseArray.h"

0 commit comments

Comments
 (0)