class Field
Defined at line 59 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
A protobuf field decoded by the protozero proto decoders. It exposes
convenience accessors with minimal debug checks.
This class is used both by the iterator-based ProtoDecoder and by the
one-shot TypedProtoDecoder.
If the field is not valid the accessors consistently return zero-integers or
null strings.
Public Members
static const uint32_t kMaxId
Public Methods
void SerializeAndAppendTo (std::string * dst)
Serializes the field back into a proto-encoded byte stream and appends it
to |dst|. |dst| is resized accordingly.
void SerializeAndAppendTo (std::vector<uint8_t> * dst)
Serializes the field back into a proto-encoded byte stream and appends it
to |dst|. |dst| is resized accordingly.
bool valid ()
Defined at line 61 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
uint32_t id ()
Defined at line 62 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
bool operator bool ()
Defined at line 63 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
proto_utils::ProtoWireType type ()
Defined at line 65 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
bool as_bool ()
Defined at line 74 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
uint32_t as_uint32 ()
Defined at line 79 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
int32_t as_int32 ()
Defined at line 85 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
int32_t as_sint32 ()
Defined at line 91 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
uint64_t as_uint64 ()
Defined at line 96 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
int64_t as_int64 ()
Defined at line 103 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
int64_t as_sint64 ()
Defined at line 110 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
float as_float ()
Defined at line 115 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
double as_double ()
Defined at line 123 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
ConstChars as_string ()
Defined at line 130 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
std::string as_std_string ()
Defined at line 136 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
ConstBytes as_bytes ()
Defined at line 138 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
const uint8_t * data ()
Defined at line 144 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
size_t size ()
Defined at line 150 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
uint64_t raw_int_value ()
Defined at line 156 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void initialize (uint32_t id, uint8_t type, uint64_t int_value, uint32_t size)
Defined at line 158 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (bool * val)
For use with templates. This is used by RepeatedFieldIterator::operator*().
Defined at line 169 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (uint32_t * val)
Defined at line 170 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (int32_t * val)
Defined at line 171 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (uint64_t * val)
Defined at line 172 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (int64_t * val)
Defined at line 173 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (float * val)
Defined at line 174 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (double * val)
Defined at line 175 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (std::string * val)
Defined at line 176 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (ConstChars * val)
Defined at line 177 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get (ConstBytes * val)
Defined at line 178 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get_signed (int32_t * val)
Defined at line 179 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
void get_signed (int64_t * val)
Defined at line 180 of file ../../third_party/perfetto/include/perfetto/protozero/field.h
template <typename T, typename = typename std::enable_if<std::is_enum<T>::value, T>::type>
void get (T * val)
For enum types.
Defined at line 185 of file ../../third_party/perfetto/include/perfetto/protozero/field.h