Lines Matching +full:clang +full:- +full:format
1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
65 if (state->output == nil) {
67 [NSException raise:GPBCodedOutputStreamException_OutOfSpace format:@""];
69 if (state->position != 0) {
71 [state->output write:state->bytes maxLength:state->position];
72 if (written != (NSInteger)state->position) {
73 [NSException raise:GPBCodedOutputStreamException_WriteFailed format:@""];
75 state->position = 0;
80 if (state->position == state->size) {
83 state->bytes[state->position++] = value;
116 // Must sign-extend
128 uint32_t fieldNumber, GPBWireFormat format) {
129 GPBWriteRawVarint32(state, GPBWireFormatMakeTag(fieldNumber, format));
152 - (void)dealloc {
161 - (instancetype)initWithOutputStream:(NSOutputStream *)output {
166 - (instancetype)initWithData:(NSMutableData *)data {
173 - (instancetype)initWithOutputStream:(NSOutputStream *)output
197 // protos can turn on -Wdirect-ivar-access without issues.
198 #pragma clang diagnostic push
199 #pragma clang diagnostic ignored "-Wdirect-ivar-access"
201 - (void)writeDoubleNoTag:(double)value {
205 - (void)writeDouble:(int32_t)fieldNumber value:(double)value {
210 - (void)writeFloatNoTag:(float)value {
214 - (void)writeFloat:(int32_t)fieldNumber value:(float)value {
219 - (void)writeUInt64NoTag:(uint64_t)value {
223 - (void)writeUInt64:(int32_t)fieldNumber value:(uint64_t)value {
228 - (void)writeInt64NoTag:(int64_t)value {
232 - (void)writeInt64:(int32_t)fieldNumber value:(int64_t)value {
237 - (void)writeInt32NoTag:(int32_t)value {
241 - (void)writeInt32:(int32_t)fieldNumber value:(int32_t)value {
246 - (void)writeFixed64NoTag:(uint64_t)value {
250 - (void)writeFixed64:(int32_t)fieldNumber value:(uint64_t)value {
255 - (void)writeFixed32NoTag:(uint32_t)value {
259 - (void)writeFixed32:(int32_t)fieldNumber value:(uint32_t)value {
264 - (void)writeBoolNoTag:(BOOL)value {
268 - (void)writeBool:(int32_t)fieldNumber value:(BOOL)value {
273 - (void)writeStringNoTag:(const NSString *)value {
285 NSUInteger bufferBytesLeft = state_.size - state_.position;
321 - (void)writeString:(int32_t)fieldNumber value:(NSString *)value {
326 - (void)writeGroupNoTag:(int32_t)fieldNumber value:(GPBMessage *)value {
331 - (void)writeGroup:(int32_t)fieldNumber value:(GPBMessage *)value {
336 - (void)writeUnknownGroupNoTag:(int32_t)fieldNumber
342 - (void)writeUnknownGroup:(int32_t)fieldNumber
348 - (void)writeMessageNoTag:(GPBMessage *)value {
353 - (void)writeMessage:(int32_t)fieldNumber value:(GPBMessage *)value {
358 - (void)writeBytesNoTag:(NSData *)value {
363 - (void)writeBytes:(int32_t)fieldNumber value:(NSData *)value {
368 - (void)writeUInt32NoTag:(uint32_t)value {
372 - (void)writeUInt32:(int32_t)fieldNumber value:(uint32_t)value {
376 - (void)writeEnumNoTag:(int32_t)value {
380 - (void)writeEnum:(int32_t)fieldNumber value:(int32_t)value {
385 - (void)writeSFixed32NoTag:(int32_t)value {
389 - (void)writeSFixed32:(int32_t)fieldNumber value:(int32_t)value {
394 - (void)writeSFixed64NoTag:(int64_t)value {
398 - (void)writeSFixed64:(int32_t)fieldNumber value:(int64_t)value {
403 - (void)writeSInt32NoTag:(int32_t)value {
407 - (void)writeSInt32:(int32_t)fieldNumber value:(int32_t)value {
412 - (void)writeSInt64NoTag:(int64_t)value {
416 - (void)writeSInt64:(int32_t)fieldNumber value:(int64_t)value {
421 //%PDDM-DEFINE WRITE_PACKABLE_DEFNS(NAME, ARRAY_TYPE, TYPE, ACCESSOR_NAME)
422 //%- (void)write##NAME##Array:(int32_t)fieldNumber
446 //%PDDM-DEFINE WRITE_UNPACKABLE_DEFNS(NAME, TYPE)
447 //%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray *)values {
453 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Double, Double, double, )
455 // clang-format off
457 - (void)writeDoubleArray:(int32_t)fieldNumber
481 // clang-format on
482 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Float, Float, float, )
484 // clang-format off
486 - (void)writeFloatArray:(int32_t)fieldNumber
510 // clang-format on
511 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(UInt64, UInt64, uint64_t, )
513 // clang-format off
515 - (void)writeUInt64Array:(int32_t)fieldNumber
539 // clang-format on
540 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Int64, Int64, int64_t, )
542 // clang-format off
544 - (void)writeInt64Array:(int32_t)fieldNumber
568 // clang-format on
569 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Int32, Int32, int32_t, )
571 // clang-format off
573 - (void)writeInt32Array:(int32_t)fieldNumber
597 // clang-format on
598 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(UInt32, UInt32, uint32_t, )
600 // clang-format off
602 - (void)writeUInt32Array:(int32_t)fieldNumber
626 // clang-format on
627 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Fixed64, UInt64, uint64_t, )
629 // clang-format off
631 - (void)writeFixed64Array:(int32_t)fieldNumber
655 // clang-format on
656 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Fixed32, UInt32, uint32_t, )
658 // clang-format off
660 - (void)writeFixed32Array:(int32_t)fieldNumber
684 // clang-format on
685 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SInt32, Int32, int32_t, )
687 // clang-format off
689 - (void)writeSInt32Array:(int32_t)fieldNumber
713 // clang-format on
714 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SInt64, Int64, int64_t, )
716 // clang-format off
718 - (void)writeSInt64Array:(int32_t)fieldNumber
742 // clang-format on
743 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SFixed64, Int64, int64_t, )
745 // clang-format off
747 - (void)writeSFixed64Array:(int32_t)fieldNumber
771 // clang-format on
772 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(SFixed32, Int32, int32_t, )
774 // clang-format off
776 - (void)writeSFixed32Array:(int32_t)fieldNumber
800 // clang-format on
801 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Bool, Bool, BOOL, )
803 // clang-format off
805 - (void)writeBoolArray:(int32_t)fieldNumber
829 // clang-format on
830 //%PDDM-EXPAND WRITE_PACKABLE_DEFNS(Enum, Enum, int32_t, Raw)
832 // clang-format off
834 - (void)writeEnumArray:(int32_t)fieldNumber
858 // clang-format on
859 //%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(String, NSString)
861 // clang-format off
863 - (void)writeStringArray:(int32_t)fieldNumber values:(NSArray *)values {
869 // clang-format on
870 //%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(Message, GPBMessage)
872 // clang-format off
874 - (void)writeMessageArray:(int32_t)fieldNumber values:(NSArray *)values {
880 // clang-format on
881 //%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(Bytes, NSData)
883 // clang-format off
885 - (void)writeBytesArray:(int32_t)fieldNumber values:(NSArray *)values {
891 // clang-format on
892 //%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(Group, GPBMessage)
894 // clang-format off
896 - (void)writeGroupArray:(int32_t)fieldNumber values:(NSArray *)values {
902 // clang-format on
903 //%PDDM-EXPAND WRITE_UNPACKABLE_DEFNS(UnknownGroup, GPBUnknownFieldSet)
905 // clang-format off
907 - (void)writeUnknownGroupArray:(int32_t)fieldNumber values:(NSArray *)values {
913 // clang-format on
914 //%PDDM-EXPAND-END (19 expansions)
916 - (void)writeMessageSetExtension:(int32_t)fieldNumber
926 - (void)writeRawMessageSetExtension:(int32_t)fieldNumber value:(NSData *)value {
935 - (void)flush {
941 - (void)writeRawByte:(uint8_t)value {
945 - (void)writeRawData:(const NSData *)data {
949 - (void)writeRawPtr:(const void *)value
957 NSUInteger bufferBytesLeft = bufferLength - state_.position;
969 length -= bytesWritten;
985 [NSException raise:GPBCodedOutputStreamException_WriteFailed format:@""];
991 - (void)writeTag:(uint32_t)fieldNumber format:(GPBWireFormat)format {
992 GPBWriteTagWithFormat(&state_, fieldNumber, format);
995 - (void)writeRawVarint32:(int32_t)value {
999 - (void)writeRawVarintSizeTAs32:(size_t)value {
1004 - (void)writeRawVarint64:(int64_t)value {
1008 - (void)writeRawLittleEndian32:(int32_t)value {
1012 - (void)writeRawLittleEndian64:(int64_t)value {
1016 #pragma clang diagnostic pop
1042 // Must sign-extend.
1224 // value is treated as unsigned, so it won't be sign-extended if negative.