template <typename ExtendeeType, typename TypeTraitsType, FieldType field_type, bool is_packed>

class ExtensionIdentifier

Defined at line 1612 of file ../../third_party/protobuf/src/google/protobuf/extension_set.h

This is the type of actual extension objects. E.g. if you have:

extend Foo {

optional int32 bar = 1234;

}

then "bar" will be defined in C++ as:

ExtensionIdentifier

<Foo

, PrimitiveTypeTraits

<int32

_t>, 5, false> bar(1234);

Note that we could, in theory, supply the field number as a template

parameter, and thus make an instance of ExtensionIdentifier have no

actual contents. However, if we did that, then using an extension

identifier would not necessarily cause the compiler to output any sort

of reference to any symbol defined in the extension's .pb.o file. Some

linkers will actually drop object files that are not explicitly referenced,

but that would be bad because it would cause this extension to not be

registered at static initialization, and therefore using it would crash.

Public Methods

void ExtensionIdentifier<ExtendeeType, TypeTraitsType, field_type, is_packed> (int number, typename TypeTraits::InitType default_value)

Defined at line 1617 of file ../../third_party/protobuf/src/google/protobuf/extension_set.h

int number ()

Defined at line 1621 of file ../../third_party/protobuf/src/google/protobuf/extension_set.h

typename TypeTraits::ConstType default_value ()

Defined at line 1622 of file ../../third_party/protobuf/src/google/protobuf/extension_set.h

const typename TypeTraits::ConstType & default_value_ref ()

Defined at line 1626 of file ../../third_party/protobuf/src/google/protobuf/extension_set.h