Lines Matching defs:val
54 ProtoOutputStream::write(uint64_t fieldId, double val)
59 case FIELD_TYPE_DOUBLE: writeDoubleImpl(id, (double)val); break;
60 case FIELD_TYPE_FLOAT: writeFloatImpl(id, (float)val); break;
61 case FIELD_TYPE_INT64: writeInt64Impl(id, (long long)val); break;
62 case FIELD_TYPE_UINT64: writeUint64Impl(id, (uint64_t)val); break;
63 case FIELD_TYPE_INT32: writeInt32Impl(id, (int)val); break;
64 case FIELD_TYPE_FIXED64: writeFixed64Impl(id, (uint64_t)val); break;
65 case FIELD_TYPE_FIXED32: writeFixed32Impl(id, (uint32_t)val); break;
66 case FIELD_TYPE_UINT32: writeUint32Impl(id, (uint32_t)val); break;
67 case FIELD_TYPE_SFIXED32: writeSFixed32Impl(id, (int)val); break;
68 case FIELD_TYPE_SFIXED64: writeSFixed64Impl(id, (long long)val); break;
69 case FIELD_TYPE_SINT32: writeZigzagInt32Impl(id, (int)val); break;
70 case FIELD_TYPE_SINT64: writeZigzagInt64Impl(id, (long long)val); break;
72 ALOGW("Field type %d is not supported when writing double val.",
80 ProtoOutputStream::write(uint64_t fieldId, float val)
85 case FIELD_TYPE_DOUBLE: writeDoubleImpl(id, (double)val); break;
86 case FIELD_TYPE_FLOAT: writeFloatImpl(id, (float)val); break;
87 case FIELD_TYPE_INT64: writeInt64Impl(id, (long long)val); break;
88 case FIELD_TYPE_UINT64: writeUint64Impl(id, (uint64_t)val); break;
89 case FIELD_TYPE_INT32: writeInt32Impl(id, (int)val); break;
90 case FIELD_TYPE_FIXED64: writeFixed64Impl(id, (uint64_t)val); break;
91 case FIELD_TYPE_FIXED32: writeFixed32Impl(id, (uint32_t)val); break;
92 case FIELD_TYPE_UINT32: writeUint32Impl(id, (uint32_t)val); break;
93 case FIELD_TYPE_SFIXED32: writeSFixed32Impl(id, (int)val); break;
94 case FIELD_TYPE_SFIXED64: writeSFixed64Impl(id, (long long)val); break;
95 case FIELD_TYPE_SINT32: writeZigzagInt32Impl(id, (int)val); break;
96 case FIELD_TYPE_SINT64: writeZigzagInt64Impl(id, (long long)val); break;
98 ALOGW("Field type %d is not supported when writing float val.",
106 ProtoOutputStream::write(uint64_t fieldId, int val)
111 case FIELD_TYPE_DOUBLE: writeDoubleImpl(id, (double)val); break;
112 case FIELD_TYPE_FLOAT: writeFloatImpl(id, (float)val); break;
113 case FIELD_TYPE_INT64: writeInt64Impl(id, (long long)val); break;
114 case FIELD_TYPE_UINT64: writeUint64Impl(id, (uint64_t)val); break;
115 case FIELD_TYPE_INT32: writeInt32Impl(id, (int)val); break;
116 case FIELD_TYPE_FIXED64: writeFixed64Impl(id, (uint64_t)val); break;
117 case FIELD_TYPE_FIXED32: writeFixed32Impl(id, (uint32_t)val); break;
118 case FIELD_TYPE_UINT32: writeUint32Impl(id, (uint32_t)val); break;
119 case FIELD_TYPE_SFIXED32: writeSFixed32Impl(id, (int)val); break;
120 case FIELD_TYPE_SFIXED64: writeSFixed64Impl(id, (long long)val); break;
121 case FIELD_TYPE_SINT32: writeZigzagInt32Impl(id, (int)val); break;
122 case FIELD_TYPE_SINT64: writeZigzagInt64Impl(id, (long long)val); break;
123 case FIELD_TYPE_ENUM: writeEnumImpl(id, (int)val); break;
124 case FIELD_TYPE_BOOL: writeBoolImpl(id, val != 0); break;
126 ALOGW("Field type %d is not supported when writing int val.",
134 ProtoOutputStream::write(uint64_t fieldId, long long val)
139 case FIELD_TYPE_DOUBLE: writeDoubleImpl(id, (double)val); break;
140 case FIELD_TYPE_FLOAT: writeFloatImpl(id, (float)val); break;
141 case FIELD_TYPE_INT64: writeInt64Impl(id, (long long)val); break;
142 case FIELD_TYPE_UINT64: writeUint64Impl(id, (uint64_t)val); break;
143 case FIELD_TYPE_INT32: writeInt32Impl(id, (int)val); break;
144 case FIELD_TYPE_FIXED64: writeFixed64Impl(id, (uint64_t)val); break;
145 case FIELD_TYPE_FIXED32: writeFixed32Impl(id, (uint32_t)val); break;
146 case FIELD_TYPE_UINT32: writeUint32Impl(id, (uint32_t)val); break;
147 case FIELD_TYPE_SFIXED32: writeSFixed32Impl(id, (int)val); break;
148 case FIELD_TYPE_SFIXED64: writeSFixed64Impl(id, (long long)val); break;
149 case FIELD_TYPE_SINT32: writeZigzagInt32Impl(id, (int)val); break;
150 case FIELD_TYPE_SINT64: writeZigzagInt64Impl(id, (long long)val); break;
151 case FIELD_TYPE_ENUM: writeEnumImpl(id, (int)val); break;
152 case FIELD_TYPE_BOOL: writeBoolImpl(id, val != 0); break;
154 ALOGW("Field type %d is not supported when writing long long val.",
162 ProtoOutputStream::write(uint64_t fieldId, bool val)
168 writeBoolImpl(id, val);
171 ALOGW("Field type %d is not supported when writing bool val.",
178 ProtoOutputStream::write(uint64_t fieldId, std::string val)
184 writeUtf8StringImpl(id, val.c_str(), val.size());
187 ALOGW("Field type %d is not supported when writing string val.",
194 ProtoOutputStream::write(uint64_t fieldId, const char* val, size_t size)
201 writeUtf8StringImpl(id, val, size);
205 writeMessageBytesImpl(id, val, size);
208 ALOGW("Field type %d is not supported when writing char[] val.",
543 ProtoOutputStream::writeDoubleImpl(uint32_t id, double val)
546 mBuffer.writeRawFixed64(bit_cast<double, uint64_t>(val));
550 ProtoOutputStream::writeFloatImpl(uint32_t id, float val)
553 mBuffer.writeRawFixed32(bit_cast<float, uint32_t>(val));
557 ProtoOutputStream::writeInt64Impl(uint32_t id, long long val)
560 mBuffer.writeRawVarint64((uint64_t)val);
564 ProtoOutputStream::writeInt32Impl(uint32_t id, int val)
567 mBuffer.writeRawVarint32((uint32_t)val);
571 ProtoOutputStream::writeUint64Impl(uint32_t id, uint64_t val)
574 mBuffer.writeRawVarint64(val);
578 ProtoOutputStream::writeUint32Impl(uint32_t id, uint32_t val)
581 mBuffer.writeRawVarint32(val);
585 ProtoOutputStream::writeFixed64Impl(uint32_t id, uint64_t val)
588 mBuffer.writeRawFixed64(val);
592 ProtoOutputStream::writeFixed32Impl(uint32_t id, uint32_t val)
595 mBuffer.writeRawFixed32(val);
599 ProtoOutputStream::writeSFixed64Impl(uint32_t id, long long val)
602 mBuffer.writeRawFixed64((uint64_t)val);
606 ProtoOutputStream::writeSFixed32Impl(uint32_t id, int val)
609 mBuffer.writeRawFixed32((uint32_t)val);
613 ProtoOutputStream::writeZigzagInt64Impl(uint32_t id, long long val)
616 mBuffer.writeRawVarint64((val << 1) ^ (val >> 63));
620 ProtoOutputStream::writeZigzagInt32Impl(uint32_t id, int val)
623 mBuffer.writeRawVarint32((val << 1) ^ (val >> 31));
627 ProtoOutputStream::writeEnumImpl(uint32_t id, int val)
630 mBuffer.writeRawVarint32((uint32_t) val);
634 ProtoOutputStream::writeBoolImpl(uint32_t id, bool val)
637 mBuffer.writeRawVarint32(val ? 1 : 0);
641 ProtoOutputStream::writeUtf8StringImpl(uint32_t id, const char* val, size_t size)
643 if (val == NULL) return;
646 mBuffer.writeRawByte((uint8_t)val[i]);
651 ProtoOutputStream::writeMessageBytesImpl(uint32_t id, const char* val, size_t size)
653 if (val == NULL) return;
656 mBuffer.writeRawByte(val[i]);