blob: 52e7d2e040a4197ffd7347db82f43668abb74ef6 [file] [log] [blame]
Thomas Van Lenten30650d82015-05-01 08:57:16 -04001// Protocol Buffers - Google's data interchange format
2// Copyright 2008 Google Inc. All rights reserved.
3// https://developers.google.com/protocol-buffers/
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// * Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11// * Redistributions in binary form must reproduce the above
12// copyright notice, this list of conditions and the following disclaimer
13// in the documentation and/or other materials provided with the
14// distribution.
15// * Neither the name of Google Inc. nor the names of its
16// contributors may be used to endorse or promote products derived from
17// this software without specific prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31#import <Foundation/Foundation.h>
32
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040033#import "GPBArray.h"
Thomas Van Lenten30650d82015-05-01 08:57:16 -040034#import "GPBMessage.h"
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040035#import "GPBRuntimeTypes.h"
Thomas Van Lenten30650d82015-05-01 08:57:16 -040036
37CF_EXTERN_C_BEGIN
38
Thomas Van Lenten8c889572015-06-16 16:45:14 -040039NS_ASSUME_NONNULL_BEGIN
40
Sergio Campamá32fadc02016-08-08 07:15:02 -070041/**
42 * Generates a string that should be a valid "TextFormat" for the C++ version
43 * of Protocol Buffers.
44 *
45 * @param message The message to generate from.
46 * @param lineIndent A string to use as the prefix for all lines generated. Can
47 * be nil if no extra indent is needed.
48 *
49 * @return An NSString with the TextFormat of the message.
50 **/
Thomas Van Lenten8c889572015-06-16 16:45:14 -040051NSString *GPBTextFormatForMessage(GPBMessage *message,
52 NSString * __nullable lineIndent);
Thomas Van Lenten36650a02016-03-07 12:07:03 -050053
Sergio Campamá32fadc02016-08-08 07:15:02 -070054/**
55 * Generates a string that should be a valid "TextFormat" for the C++ version
56 * of Protocol Buffers.
57 *
58 * @param unknownSet The unknown field set to generate from.
59 * @param lineIndent A string to use as the prefix for all lines generated. Can
60 * be nil if no extra indent is needed.
61 *
62 * @return An NSString with the TextFormat of the unknown field set.
63 **/
Thomas Van Lentenc27833b2015-12-07 10:49:30 -050064NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet * __nullable unknownSet,
Thomas Van Lenten8c889572015-06-16 16:45:14 -040065 NSString * __nullable lineIndent);
Thomas Van Lenten30650d82015-05-01 08:57:16 -040066
Sergio Campamá32fadc02016-08-08 07:15:02 -070067/**
68 * Checks if the given field number is set on a message.
69 *
70 * @param self The message to check.
71 * @param fieldNumber The field number to check.
72 *
73 * @return YES if the field number is set on the given message.
74 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040075BOOL GPBMessageHasFieldNumberSet(GPBMessage *self, uint32_t fieldNumber);
Sergio Campamá32fadc02016-08-08 07:15:02 -070076
77/**
78 * Checks if the given field is set on a message.
79 *
80 * @param self The message to check.
81 * @param field The field to check.
82 *
83 * @return YES if the field is set on the given message.
84 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040085BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field);
86
Sergio Campamá32fadc02016-08-08 07:15:02 -070087/**
88 * Clears the given field for the given message.
89 *
90 * @param self The message for which to clear the field.
91 * @param field The field to clear.
92 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040093void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field);
94
95//%PDDM-EXPAND GPB_ACCESSORS()
96// This block of code is generated, do not edit it directly.
97
98
99//
Sergio Campamá32fadc02016-08-08 07:15:02 -0700100// Get/Set a given field from/to a message.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400101//
102
103// Single Fields
104
Sergio Campamá32fadc02016-08-08 07:15:02 -0700105/**
106 * Gets the value of a bytes field.
107 *
108 * @param self The message from which to get the field.
109 * @param field The field to get.
110 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400111NSData *GPBGetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700112
113/**
114 * Sets the value of a bytes field.
115 *
116 * @param self The message into which to set the field.
117 * @param field The field to set.
118 * @param value The to set in the field.
119 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400120void GPBSetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field, NSData *value);
121
Sergio Campamá32fadc02016-08-08 07:15:02 -0700122/**
123 * Gets the value of a string field.
124 *
125 * @param self The message from which to get the field.
126 * @param field The field to get.
127 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400128NSString *GPBGetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700129
130/**
131 * Sets the value of a string field.
132 *
133 * @param self The message into which to set the field.
134 * @param field The field to set.
135 * @param value The to set in the field.
136 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400137void GPBSetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field, NSString *value);
138
Sergio Campamá32fadc02016-08-08 07:15:02 -0700139/**
140 * Gets the value of a message field.
141 *
142 * @param self The message from which to get the field.
143 * @param field The field to get.
144 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400145GPBMessage *GPBGetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700146
147/**
148 * Sets the value of a message field.
149 *
150 * @param self The message into which to set the field.
151 * @param field The field to set.
152 * @param value The to set in the field.
153 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400154void GPBSetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value);
155
Sergio Campamá32fadc02016-08-08 07:15:02 -0700156/**
157 * Gets the value of a group field.
158 *
159 * @param self The message from which to get the field.
160 * @param field The field to get.
161 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400162GPBMessage *GPBGetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700163
164/**
165 * Sets the value of a group field.
166 *
167 * @param self The message into which to set the field.
168 * @param field The field to set.
169 * @param value The to set in the field.
170 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400171void GPBSetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value);
172
Sergio Campamá32fadc02016-08-08 07:15:02 -0700173/**
174 * Gets the value of a bool field.
175 *
176 * @param self The message from which to get the field.
177 * @param field The field to get.
178 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400179BOOL GPBGetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700180
181/**
182 * Sets the value of a bool field.
183 *
184 * @param self The message into which to set the field.
185 * @param field The field to set.
186 * @param value The to set in the field.
187 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400188void GPBSetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field, BOOL value);
189
Sergio Campamá32fadc02016-08-08 07:15:02 -0700190/**
191 * Gets the value of an int32 field.
192 *
193 * @param self The message from which to get the field.
194 * @param field The field to get.
195 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400196int32_t GPBGetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700197
198/**
199 * Sets the value of an int32 field.
200 *
201 * @param self The message into which to set the field.
202 * @param field The field to set.
203 * @param value The to set in the field.
204 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400205void GPBSetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field, int32_t value);
206
Sergio Campamá32fadc02016-08-08 07:15:02 -0700207/**
208 * Gets the value of an uint32 field.
209 *
210 * @param self The message from which to get the field.
211 * @param field The field to get.
212 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400213uint32_t GPBGetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700214
215/**
216 * Sets the value of an uint32 field.
217 *
218 * @param self The message into which to set the field.
219 * @param field The field to set.
220 * @param value The to set in the field.
221 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400222void GPBSetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field, uint32_t value);
223
Sergio Campamá32fadc02016-08-08 07:15:02 -0700224/**
225 * Gets the value of an int64 field.
226 *
227 * @param self The message from which to get the field.
228 * @param field The field to get.
229 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400230int64_t GPBGetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700231
232/**
233 * Sets the value of an int64 field.
234 *
235 * @param self The message into which to set the field.
236 * @param field The field to set.
237 * @param value The to set in the field.
238 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400239void GPBSetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field, int64_t value);
240
Sergio Campamá32fadc02016-08-08 07:15:02 -0700241/**
242 * Gets the value of an uint64 field.
243 *
244 * @param self The message from which to get the field.
245 * @param field The field to get.
246 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400247uint64_t GPBGetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700248
249/**
250 * Sets the value of an uint64 field.
251 *
252 * @param self The message into which to set the field.
253 * @param field The field to set.
254 * @param value The to set in the field.
255 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400256void GPBSetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field, uint64_t value);
257
Sergio Campamá32fadc02016-08-08 07:15:02 -0700258/**
259 * Gets the value of a float field.
260 *
261 * @param self The message from which to get the field.
262 * @param field The field to get.
263 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400264float GPBGetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700265
266/**
267 * Sets the value of a float field.
268 *
269 * @param self The message into which to set the field.
270 * @param field The field to set.
271 * @param value The to set in the field.
272 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400273void GPBSetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field, float value);
274
Sergio Campamá32fadc02016-08-08 07:15:02 -0700275/**
276 * Gets the value of a double field.
277 *
278 * @param self The message from which to get the field.
279 * @param field The field to get.
280 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400281double GPBGetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700282
283/**
284 * Sets the value of a double field.
285 *
286 * @param self The message into which to set the field.
287 * @param field The field to set.
288 * @param value The to set in the field.
289 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400290void GPBSetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field, double value);
291
Sergio Campamá32fadc02016-08-08 07:15:02 -0700292/**
293 * Gets the given enum field of a message. For proto3, if the value isn't a
294 * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned.
295 * GPBGetMessageRawEnumField will bypass the check and return whatever value
296 * was set.
297 *
298 * @param self The message from which to get the field.
299 * @param field The field to get.
300 *
301 * @return The enum value for the given field.
302 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400303int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700304
305/**
306 * Set the given enum field of a message. You can only set values that are
307 * members of the enum.
308 *
309 * @param self The message into which to set the field.
310 * @param field The field to set.
311 * @param value The enum value to set in the field.
312 **/
313void GPBSetMessageEnumField(GPBMessage *self,
314 GPBFieldDescriptor *field,
315 int32_t value);
316
317/**
318 * Get the given enum field of a message. No check is done to ensure the value
319 * was defined in the enum.
320 *
321 * @param self The message from which to get the field.
322 * @param field The field to get.
323 *
324 * @return The raw enum value for the given field.
325 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400326int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700327
328/**
329 * Set the given enum field of a message. You can set the value to anything,
330 * even a value that is not a member of the enum.
331 *
332 * @param self The message into which to set the field.
333 * @param field The field to set.
334 * @param value The raw enum value to set in the field.
335 **/
336void GPBSetMessageRawEnumField(GPBMessage *self,
337 GPBFieldDescriptor *field,
338 int32_t value);
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400339
340// Repeated Fields
341
Sergio Campamá32fadc02016-08-08 07:15:02 -0700342/**
343 * Gets the value of a repeated field.
344 *
345 * @param self The message from which to get the field.
346 * @param field The repeated field to get.
347 *
348 * @return A GPB*Array or an NSMutableArray based on the field's type.
349 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400350id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700351
352/**
353 * Sets the value of a repeated field.
354 *
355 * @param self The message into which to set the field.
356 * @param field The field to set.
357 * @param array A GPB*Array or NSMutableArray based on the field's type.
358 **/
359void GPBSetMessageRepeatedField(GPBMessage *self,
360 GPBFieldDescriptor *field,
361 id array);
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400362
363// Map Fields
364
Sergio Campamá32fadc02016-08-08 07:15:02 -0700365/**
366 * Gets the value of a map<> field.
367 *
368 * @param self The message from which to get the field.
369 * @param field The repeated field to get.
370 *
371 * @return A GPB*Dictionary or NSMutableDictionary based on the field's type.
372 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400373id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700374
375/**
376 * Sets the value of a map<> field.
377 *
378 * @param self The message into which to set the field.
379 * @param field The field to set.
380 * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the
381 * field's type.
382 **/
383void GPBSetMessageMapField(GPBMessage *self,
384 GPBFieldDescriptor *field,
385 id dictionary);
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400386
387//%PDDM-EXPAND-END GPB_ACCESSORS()
388
Sergio Campamá32fadc02016-08-08 07:15:02 -0700389/**
390 * Returns an empty NSData to assign to byte fields when you wish to assign them
391 * to empty. Prevents allocating a lot of little [NSData data] objects.
392 **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400393NSData *GPBEmptyNSData(void) __attribute__((pure));
394
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400395NS_ASSUME_NONNULL_END
396
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400397CF_EXTERN_C_END
398
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400399
400//%PDDM-DEFINE GPB_ACCESSORS()
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400401//%
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400402//%//
Sergio Campamá32fadc02016-08-08 07:15:02 -0700403//%// Get/Set a given field from/to a message.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400404//%//
405//%
406//%// Single Fields
407//%
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500408//%GPB_ACCESSOR_SINGLE_FULL(Bytes, NSData, , *)
409//%GPB_ACCESSOR_SINGLE_FULL(String, NSString, , *)
410//%GPB_ACCESSOR_SINGLE_FULL(Message, GPBMessage, , *)
411//%GPB_ACCESSOR_SINGLE_FULL(Group, GPBMessage, , *)
412//%GPB_ACCESSOR_SINGLE(Bool, BOOL, )
413//%GPB_ACCESSOR_SINGLE(Int32, int32_t, n)
414//%GPB_ACCESSOR_SINGLE(UInt32, uint32_t, n)
415//%GPB_ACCESSOR_SINGLE(Int64, int64_t, n)
416//%GPB_ACCESSOR_SINGLE(UInt64, uint64_t, n)
417//%GPB_ACCESSOR_SINGLE(Float, float, )
418//%GPB_ACCESSOR_SINGLE(Double, double, )
Sergio Campamá32fadc02016-08-08 07:15:02 -0700419//%/**
420//% * Gets the given enum field of a message. For proto3, if the value isn't a
421//% * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned.
422//% * GPBGetMessageRawEnumField will bypass the check and return whatever value
423//% * was set.
424//% *
425//% * @param self The message from which to get the field.
426//% * @param field The field to get.
427//% *
428//% * @return The enum value for the given field.
429//% **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400430//%int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700431//%
432//%/**
433//% * Set the given enum field of a message. You can only set values that are
434//% * members of the enum.
435//% *
436//% * @param self The message into which to set the field.
437//% * @param field The field to set.
438//% * @param value The enum value to set in the field.
439//% **/
440//%void GPBSetMessageEnumField(GPBMessage *self,
441//% GPBFieldDescriptor *field,
442//% int32_t value);
443//%
444//%/**
445//% * Get the given enum field of a message. No check is done to ensure the value
446//% * was defined in the enum.
447//% *
448//% * @param self The message from which to get the field.
449//% * @param field The field to get.
450//% *
451//% * @return The raw enum value for the given field.
452//% **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400453//%int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700454//%
455//%/**
456//% * Set the given enum field of a message. You can set the value to anything,
457//% * even a value that is not a member of the enum.
458//% *
459//% * @param self The message into which to set the field.
460//% * @param field The field to set.
461//% * @param value The raw enum value to set in the field.
462//% **/
463//%void GPBSetMessageRawEnumField(GPBMessage *self,
464//% GPBFieldDescriptor *field,
465//% int32_t value);
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400466//%
467//%// Repeated Fields
468//%
Sergio Campamá32fadc02016-08-08 07:15:02 -0700469//%/**
470//% * Gets the value of a repeated field.
471//% *
472//% * @param self The message from which to get the field.
473//% * @param field The repeated field to get.
474//% *
475//% * @return A GPB*Array or an NSMutableArray based on the field's type.
476//% **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400477//%id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700478//%
479//%/**
480//% * Sets the value of a repeated field.
481//% *
482//% * @param self The message into which to set the field.
483//% * @param field The field to set.
484//% * @param array A GPB*Array or NSMutableArray based on the field's type.
485//% **/
486//%void GPBSetMessageRepeatedField(GPBMessage *self,
487//% GPBFieldDescriptor *field,
488//% id array);
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400489//%
490//%// Map Fields
491//%
Sergio Campamá32fadc02016-08-08 07:15:02 -0700492//%/**
493//% * Gets the value of a map<> field.
494//% *
495//% * @param self The message from which to get the field.
496//% * @param field The repeated field to get.
497//% *
498//% * @return A GPB*Dictionary or NSMutableDictionary based on the field's type.
499//% **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400500//%id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700501//%
502//%/**
503//% * Sets the value of a map<> field.
504//% *
505//% * @param self The message into which to set the field.
506//% * @param field The field to set.
507//% * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the
508//% * field's type.
509//% **/
510//%void GPBSetMessageMapField(GPBMessage *self,
511//% GPBFieldDescriptor *field,
512//% id dictionary);
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400513//%
514
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500515//%PDDM-DEFINE GPB_ACCESSOR_SINGLE(NAME, TYPE, AN)
516//%GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, )
517//%PDDM-DEFINE GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, TisP)
Sergio Campamá32fadc02016-08-08 07:15:02 -0700518//%/**
519//% * Gets the value of a##AN NAME$L field.
520//% *
521//% * @param self The message from which to get the field.
522//% * @param field The field to get.
523//% **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400524//%TYPE TisP##GPBGetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field);
Sergio Campamá32fadc02016-08-08 07:15:02 -0700525//%
526//%/**
527//% * Sets the value of a##AN NAME$L field.
528//% *
529//% * @param self The message into which to set the field.
530//% * @param field The field to set.
531//% * @param value The to set in the field.
532//% **/
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400533//%void GPBSetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field, TYPE TisP##value);
534//%