38 #ifndef GOOGLE_PROTOBUF_EXTENSION_SET_H__
39 #define GOOGLE_PROTOBUF_EXTENSION_SET_H__
55 class FieldDescriptor;
60 class UnknownFieldSet;
62 class CodedInputStream;
63 class CodedOutputStream;
91 inline ExtensionInfo(FieldType type_param,
bool isrepeated,
bool ispacked)
130 : containing_type_(containing_type) {}
141 class MessageSetFieldSkipper;
167 static void RegisterExtension(
const MessageLite* containing_type,
168 int number, FieldType type,
169 bool is_repeated,
bool is_packed);
170 static void RegisterEnumExtension(
const MessageLite* containing_type,
171 int number, FieldType type,
172 bool is_repeated,
bool is_packed,
174 static void RegisterMessageExtension(
const MessageLite* containing_type,
175 int number, FieldType type,
176 bool is_repeated,
bool is_packed,
183 void AppendToList(
const Descriptor* containing_type,
185 vector<const FieldDescriptor*>*
output)
const;
217 bool Has(
int number)
const;
218 int ExtensionSize(
int number)
const;
219 int NumExtensions()
const;
220 FieldType ExtensionType(
int number)
const;
221 void ClearExtension(
int number);
225 int32 GetInt32 (
int number,
int32 default_value)
const;
226 int64 GetInt64 (
int number,
int64 default_value)
const;
227 uint32 GetUInt32(
int number,
uint32 default_value)
const;
228 uint64 GetUInt64(
int number,
uint64 default_value)
const;
229 float GetFloat (
int number,
float default_value)
const;
230 double GetDouble(
int number,
double default_value)
const;
231 bool GetBool (
int number,
bool default_value)
const;
232 int GetEnum (
int number,
int default_value)
const;
233 const string & GetString (
int number,
const string& default_value)
const;
242 #define desc const FieldDescriptor* descriptor // avoid line wrapping
244 void SetInt64 (
int number, FieldType type,
int64 value,
desc);
245 void SetUInt32(
int number, FieldType type,
uint32 value,
desc);
246 void SetUInt64(
int number, FieldType type,
uint64 value,
desc);
247 void SetFloat (
int number, FieldType type,
float value,
desc);
248 void SetDouble(
int number, FieldType type,
double value,
desc);
249 void SetBool (
int number, FieldType type,
bool value,
desc);
250 void SetEnum (
int number, FieldType type,
int value,
desc);
251 void SetString(
int number, FieldType type,
const string& value,
desc);
252 string * MutableString (
int number, FieldType type,
desc);
253 MessageLite* MutableMessage(
int number, FieldType type,
260 void SetAllocatedMessage(
int number, FieldType type,
273 const void* GetRawRepeatedField(
int number,
const void* default_value)
const;
277 void* MutableRawRepeatedField(
int number, FieldType field_type,
284 void* MutableRawRepeatedField(
int number);
286 int32 GetRepeatedInt32 (
int number,
int index)
const;
287 int64 GetRepeatedInt64 (
int number,
int index)
const;
288 uint32 GetRepeatedUInt32(
int number,
int index)
const;
289 uint64 GetRepeatedUInt64(
int number,
int index)
const;
290 float GetRepeatedFloat (
int number,
int index)
const;
291 double GetRepeatedDouble(
int number,
int index)
const;
292 bool GetRepeatedBool (
int number,
int index)
const;
293 int GetRepeatedEnum (
int number,
int index)
const;
294 const string & GetRepeatedString (
int number,
int index)
const;
295 const MessageLite& GetRepeatedMessage(
int number,
int index)
const;
297 void SetRepeatedInt32 (
int number,
int index,
int32 value);
298 void SetRepeatedInt64 (
int number,
int index,
int64 value);
299 void SetRepeatedUInt32(
int number,
int index,
uint32 value);
300 void SetRepeatedUInt64(
int number,
int index,
uint64 value);
301 void SetRepeatedFloat (
int number,
int index,
float value);
302 void SetRepeatedDouble(
int number,
int index,
double value);
303 void SetRepeatedBool (
int number,
int index,
bool value);
304 void SetRepeatedEnum (
int number,
int index,
int value);
305 void SetRepeatedString(
int number,
int index,
const string& value);
306 string * MutableRepeatedString (
int number,
int index);
307 MessageLite* MutableRepeatedMessage(
int number,
int index);
309 #define desc const FieldDescriptor* descriptor // avoid line wrapping
310 void AddInt32 (
int number, FieldType type,
bool packed,
int32 value, desc);
311 void AddInt64 (
int number, FieldType type,
bool packed,
int64 value, desc);
312 void AddUInt32(
int number, FieldType type,
bool packed,
uint32 value, desc);
313 void AddUInt64(
int number, FieldType type,
bool packed,
uint64 value, desc);
314 void AddFloat (
int number, FieldType type,
bool packed,
float value, desc);
315 void AddDouble(
int number, FieldType type,
bool packed,
double value, desc);
316 void AddBool (
int number, FieldType type,
bool packed,
bool value, desc);
317 void AddEnum (
int number, FieldType type,
bool packed,
int value, desc);
318 void AddString(
int number, FieldType type,
const string& value, desc);
319 string * AddString (
int number, FieldType type, desc);
320 MessageLite* AddMessage(
int number, FieldType type,
321 const MessageLite& prototype, desc);
322 MessageLite* AddMessage(
const FieldDescriptor* descriptor,
323 MessageFactory* factory);
326 void RemoveLast(
int number);
327 MessageLite* ReleaseLast(
int number);
328 void SwapElements(
int number,
int index1,
int index2);
340 void MergeFrom(
const ExtensionSet& other);
341 void Swap(ExtensionSet* other);
342 void SwapExtension(ExtensionSet* other,
int number);
343 bool IsInitialized()
const;
347 bool ParseField(
uint32 tag, io::CodedInputStream*
input,
348 ExtensionFinder* extension_finder,
349 FieldSkipper* field_skipper);
357 bool ParseField(
uint32 tag, io::CodedInputStream*
input,
358 const MessageLite* containing_type);
359 bool ParseField(
uint32 tag, io::CodedInputStream*
input,
360 const Message* containing_type,
361 UnknownFieldSet* unknown_fields);
362 bool ParseField(
uint32 tag, io::CodedInputStream*
input,
363 const MessageLite* containing_type,
364 io::CodedOutputStream* unknown_fields);
368 bool ParseMessageSet(io::CodedInputStream*
input,
369 ExtensionFinder* extension_finder,
370 MessageSetFieldSkipper* field_skipper);
374 bool ParseMessageSet(io::CodedInputStream*
input,
375 const MessageLite* containing_type);
376 bool ParseMessageSet(io::CodedInputStream*
input,
377 const Message* containing_type,
378 UnknownFieldSet* unknown_fields);
384 void SerializeWithCachedSizes(
int start_field_number,
385 int end_field_number,
386 io::CodedOutputStream* output)
const;
393 uint8* SerializeWithCachedSizesToArray(
int start_field_number,
394 int end_field_number,
395 uint8* target)
const;
398 void SerializeMessageSetWithCachedSizes(io::CodedOutputStream* output)
const;
399 uint8* SerializeMessageSetWithCachedSizesToArray(
uint8* target)
const;
402 int ByteSize()
const;
405 int MessageSetByteSize()
const;
414 int SpaceUsedExcludingSelf()
const;
428 virtual void SetAllocatedMessage(
MessageLite *message) = 0;
431 virtual bool IsInitialized()
const = 0;
432 virtual int ByteSize()
const = 0;
433 virtual int SpaceUsed()
const = 0;
436 virtual void Clear() = 0;
438 virtual bool ReadMessage(
const MessageLite& prototype,
440 virtual void WriteMessage(
int number,
442 virtual uint8* WriteMessageToArray(
int number,
uint8* target)
const = 0;
506 void SerializeFieldWithCachedSizes(
509 uint8* SerializeFieldWithCachedSizesToArray(
511 uint8* target)
const;
512 void SerializeMessageSetItemWithCachedSizes(
515 uint8* SerializeMessageSetItemWithCachedSizesToArray(
517 uint8* target)
const;
518 int ByteSize(
int number)
const;
519 int MessageSetItemByteSize(
int number)
const;
523 int SpaceUsedExcludingSelf()
const;
533 bool* was_packed_on_wire);
539 bool FindExtensionInfoFromFieldNumber(
int wire_type,
int field_number,
542 bool* was_packed_on_wire);
549 bool was_packed_on_wire,
556 bool ParseFieldMaybeLazily(
int wire_type,
int field_number,
559 MessageSetFieldSkipper* field_skipper);
570 MessageSetFieldSkipper* field_skipper);
580 static inline int RepeatedMessage_SpaceUsedExcludingSelf(
601 const string&
value) {
607 AddString(number, type, descriptor)->assign(value);
669 template <
typename Type>
677 ConstType default_value);
678 static inline void Set(
int number, FieldType field_type,
682 template <
typename Type>
693 static inline void Add(
int number, FieldType field_type,
723 #define PROTOBUF_DEFINE_PRIMITIVE_TYPE(TYPE, METHOD) \
724 template<> inline TYPE PrimitiveTypeTraits<TYPE>::Get( \
725 int number, const ExtensionSet& set, TYPE default_value) { \
726 return set.Get##METHOD(number, default_value); \
728 template<> inline void PrimitiveTypeTraits<TYPE>::Set( \
729 int number, FieldType field_type, TYPE value, ExtensionSet* set) { \
730 set->Set##METHOD(number, field_type, value, NULL); \
733 template<> inline TYPE RepeatedPrimitiveTypeTraits<TYPE>::Get( \
734 int number, const ExtensionSet& set, int index) { \
735 return set.GetRepeated##METHOD(number, index); \
737 template<> inline void RepeatedPrimitiveTypeTraits<TYPE>::Set( \
738 int number, int index, TYPE value, ExtensionSet* set) { \
739 set->SetRepeated##METHOD(number, index, value); \
741 template<> inline void RepeatedPrimitiveTypeTraits<TYPE>::Add( \
742 int number, FieldType field_type, bool is_packed, \
743 TYPE value, ExtensionSet* set) { \
744 set->Add##METHOD(number, field_type, is_packed, value, NULL); \
746 template<> inline const RepeatedField<TYPE>* \
747 RepeatedPrimitiveTypeTraits<TYPE>::GetDefaultRepeatedField() { \
748 return RepeatedPrimitiveGenericTypeTraits:: \
749 default_repeated_field_##TYPE##_; \
751 template<> inline const RepeatedField<TYPE>& \
752 RepeatedPrimitiveTypeTraits<TYPE>::GetRepeated(int number, \
753 const ExtensionSet& set) { \
754 return *reinterpret_cast<const RepeatedField<TYPE>*>( \
755 set.GetRawRepeatedField( \
756 number, GetDefaultRepeatedField())); \
758 template<> inline RepeatedField<TYPE>* \
759 RepeatedPrimitiveTypeTraits<TYPE>::MutableRepeated(int number, \
760 FieldType field_type, \
762 ExtensionSet* set) { \
763 return reinterpret_cast<RepeatedField<TYPE>*>( \
764 set->MutableRawRepeatedField(number, field_type, is_packed, NULL)); \
775 #undef PROTOBUF_DEFINE_PRIMITIVE_TYPE
788 ConstType default_value) {
789 return set.
GetString(number, default_value);
791 static inline void Set(
int number, FieldType field_type,
795 static inline string*
Mutable(
int number, FieldType field_type,
813 static inline void Set(
int number,
int index,
820 static inline void Add(
int number, FieldType field_type,
821 bool ,
const string& value,
825 static inline string*
Add(
int number, FieldType field_type,
844 return default_repeated_field_;
858 template <
typename Type,
bool IsVal
id(
int)>
866 ConstType default_value) {
867 return static_cast<Type>(set.
GetEnum(number, default_value));
869 static inline void Set(
int number, FieldType field_type,
876 template <
typename Type,
bool IsVal
id(
int)>
888 static inline void Set(
int number,
int index,
893 static inline void Add(
int number, FieldType field_type,
896 set->
AddEnum(number, field_type, is_packed, value,
NULL);
910 FieldType field_type,
935 template <
typename Type>
943 ConstType default_value) {
944 return static_cast<const Type&
>(
947 static inline MutableType
Mutable(
int number, FieldType field_type,
949 return static_cast<Type*
>(
956 static inline MutableType
Release(
int number, FieldType ,
959 number, Type::default_instance()));
964 class RepeatedMessageGenericTypeTraits;
966 template <
typename Type>
981 static inline MutableType
Add(
int number, FieldType field_type,
983 return static_cast<Type*
>(
984 set->
AddMessage(number, field_type, Type::default_instance(),
NULL));
998 FieldType field_type,
1020 template<
typename Type>
inline
1044 template <
typename ExtendeeType,
typename TypeTraitsType,
1045 FieldType field_type,
bool is_packed>
1076 #define GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(CLASSNAME) \
1078 template <typename _proto_TypeTraits, \
1079 ::google::protobuf::internal::FieldType _field_type, \
1081 inline bool HasExtension( \
1082 const ::google::protobuf::internal::ExtensionIdentifier< \
1083 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) const { \
1084 return _extensions_.Has(id.number()); \
1087 template <typename _proto_TypeTraits, \
1088 ::google::protobuf::internal::FieldType _field_type, \
1090 inline void ClearExtension( \
1091 const ::google::protobuf::internal::ExtensionIdentifier< \
1092 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
1093 _extensions_.ClearExtension(id.number()); \
1096 template <typename _proto_TypeTraits, \
1097 ::google::protobuf::internal::FieldType _field_type, \
1099 inline int ExtensionSize( \
1100 const ::google::protobuf::internal::ExtensionIdentifier< \
1101 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) const { \
1102 return _extensions_.ExtensionSize(id.number()); \
1106 template <typename _proto_TypeTraits, \
1107 ::google::protobuf::internal::FieldType _field_type, \
1109 inline typename _proto_TypeTraits::Singular::ConstType GetExtension( \
1110 const ::google::protobuf::internal::ExtensionIdentifier< \
1111 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) const { \
1112 return _proto_TypeTraits::Get(id.number(), _extensions_, \
1113 id.default_value()); \
1116 template <typename _proto_TypeTraits, \
1117 ::google::protobuf::internal::FieldType _field_type, \
1119 inline typename _proto_TypeTraits::Singular::MutableType MutableExtension( \
1120 const ::google::protobuf::internal::ExtensionIdentifier< \
1121 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
1122 return _proto_TypeTraits::Mutable(id.number(), _field_type, \
1126 template <typename _proto_TypeTraits, \
1127 ::google::protobuf::internal::FieldType _field_type, \
1129 inline void SetExtension( \
1130 const ::google::protobuf::internal::ExtensionIdentifier< \
1131 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
1132 typename _proto_TypeTraits::Singular::ConstType value) { \
1133 _proto_TypeTraits::Set(id.number(), _field_type, value, &_extensions_); \
1136 template <typename _proto_TypeTraits, \
1137 ::google::protobuf::internal::FieldType _field_type, \
1139 inline void SetAllocatedExtension( \
1140 const ::google::protobuf::internal::ExtensionIdentifier< \
1141 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
1142 typename _proto_TypeTraits::Singular::MutableType value) { \
1143 _proto_TypeTraits::SetAllocated(id.number(), _field_type, \
1144 value, &_extensions_); \
1146 template <typename _proto_TypeTraits, \
1147 ::google::protobuf::internal::FieldType _field_type, \
1149 inline typename _proto_TypeTraits::Singular::MutableType ReleaseExtension( \
1150 const ::google::protobuf::internal::ExtensionIdentifier< \
1151 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
1152 return _proto_TypeTraits::Release(id.number(), _field_type, \
1157 template <typename _proto_TypeTraits, \
1158 ::google::protobuf::internal::FieldType _field_type, \
1160 inline typename _proto_TypeTraits::Repeated::ConstType GetExtension( \
1161 const ::google::protobuf::internal::ExtensionIdentifier< \
1162 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
1163 int index) const { \
1164 return _proto_TypeTraits::Get(id.number(), _extensions_, index); \
1167 template <typename _proto_TypeTraits, \
1168 ::google::protobuf::internal::FieldType _field_type, \
1170 inline typename _proto_TypeTraits::Repeated::MutableType MutableExtension( \
1171 const ::google::protobuf::internal::ExtensionIdentifier< \
1172 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
1174 return _proto_TypeTraits::Mutable(id.number(), index, &_extensions_); \
1177 template <typename _proto_TypeTraits, \
1178 ::google::protobuf::internal::FieldType _field_type, \
1180 inline void SetExtension( \
1181 const ::google::protobuf::internal::ExtensionIdentifier< \
1182 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
1183 int index, typename _proto_TypeTraits::Repeated::ConstType value) { \
1184 _proto_TypeTraits::Set(id.number(), index, value, &_extensions_); \
1187 template <typename _proto_TypeTraits, \
1188 ::google::protobuf::internal::FieldType _field_type, \
1190 inline typename _proto_TypeTraits::Repeated::MutableType AddExtension( \
1191 const ::google::protobuf::internal::ExtensionIdentifier< \
1192 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id) { \
1193 return _proto_TypeTraits::Add(id.number(), _field_type, &_extensions_); \
1196 template <typename _proto_TypeTraits, \
1197 ::google::protobuf::internal::FieldType _field_type, \
1199 inline void AddExtension( \
1200 const ::google::protobuf::internal::ExtensionIdentifier< \
1201 CLASSNAME, _proto_TypeTraits, _field_type, _is_packed>& id, \
1202 typename _proto_TypeTraits::Repeated::ConstType value) { \
1203 _proto_TypeTraits::Add(id.number(), _field_type, _is_packed, \
1204 value, &_extensions_); \
1207 template <typename _proto_TypeTraits, \
1208 ::google::protobuf::internal::FieldType _field_type, \
1210 inline const typename _proto_TypeTraits::Repeated::RepeatedFieldType& \
1211 GetRepeatedExtension( \
1212 const ::google::protobuf::internal::ExtensionIdentifier< \
1213 CLASSNAME, _proto_TypeTraits, _field_type, \
1214 _is_packed>& id) const { \
1215 return _proto_TypeTraits::GetRepeated(id.number(), _extensions_); \
1218 template <typename _proto_TypeTraits, \
1219 ::google::protobuf::internal::FieldType _field_type, \
1221 inline typename _proto_TypeTraits::Repeated::RepeatedFieldType* \
1222 MutableRepeatedExtension( \
1223 const ::google::protobuf::internal::ExtensionIdentifier< \
1224 CLASSNAME, _proto_TypeTraits, _field_type, \
1225 _is_packed>& id) { \
1226 return _proto_TypeTraits::MutableRepeated(id.number(), _field_type, \
1227 _is_packed, &_extensions_); \
1234 #endif // GOOGLE_PROTOBUF_EXTENSION_SET_H__
#define PROTOBUF_DEFINE_PRIMITIVE_TYPE(TYPE, METHOD)
Definition: extension_set.h:723
static const RepeatedField< int32 > * default_repeated_field_int32_
Definition: extension_set.h:714
EnumTypeTraits< Type, IsValid > Singular
Definition: extension_set.h:863
#define GOOGLE_DCHECK
Definition: common.h:752
static RepeatedPtrField< string > * MutableRepeated(int number, FieldType field_type, bool is_packed, ExtensionSet *set)
Definition: extension_set.h:836
string * MutableString(int number, FieldType type, desc)
LazyMessageExtension()
Definition: extension_set.h:421
RepeatedEnumTypeTraits< Type, IsValid > Repeated
Definition: extension_set.h:881
Type MutableType
Definition: extension_set.h:686
static void Add(int number, FieldType field_type, bool, const string &value, ExtensionSet *set)
Definition: extension_set.h:820
const string & GetString(int number, const string &default_value) const
static const RepeatedFieldType * GetDefaultRepeatedField()
Definition: extension_set.h:1022
bool EnumValidityFunc(int number)
Definition: extension_set.h:82
static const RepeatedField< Type > & GetRepeated(int number, const ExtensionSet &set)
Definition: extension_set.h:898
Definition: message_lite.h:77
bool is_packed
Definition: extension_set.h:493
Definition: extension_set.h:1046
static string * Mutable(int number, FieldType field_type, ExtensionSet *set)
Definition: extension_set.h:795
static const string & Get(int number, const ExtensionSet &set, ConstType default_value)
Definition: extension_set.h:787
Definition: extension_set.h:670
int64_t int64
Definition: Define.h:145
const string & ConstType
Definition: extension_set.h:803
static const RepeatedField< float > * default_repeated_field_float_
Definition: extension_set.h:719
Type ConstType
Definition: extension_set.h:861
static const RepeatedField< ConstType > & GetRepeated(int number, const ExtensionSet &set)
const void * GetRawRepeatedField(int number, const void *default_value) const
Definition: extension_set.h:89
string * MutableRepeatedString(int number, int index)
const MessageLite * message_prototype
Definition: extension_set.h:106
bool is_repeated
Definition: extension_set.h:96
const void * arg
Definition: extension_set.h:101
GeneratedExtensionFinder(const MessageLite *containing_type)
Definition: extension_set.h:129
string * MutableType
Definition: extension_set.h:804
int64 int64_value
Definition: extension_set.h:451
Definition: extension_set.h:127
LazyMessageExtension * lazymessage_value
Definition: extension_set.h:460
Definition: extension_set.h:446
void SetString(int number, FieldType type, const string &value, desc)
Definition: extension_set.h:595
MessageLite * MutableRepeatedMessage(int number, int index)
RepeatedField< double > * repeated_double_value
Definition: extension_set.h:467
RepeatedField< float > * repeated_float_value
Definition: extension_set.h:466
static const RepeatedPtrField< Type > & GetRepeated(int number, const ExtensionSet &set)
Definition: extension_set.h:986
Definition: descriptor.h:126
uint8_t uint8
Definition: common.h:175
static void Set(int number, FieldType field_type, const string &value, ExtensionSet *set)
Definition: extension_set.h:791
TypeTraits::ConstType default_value() const
Definition: extension_set.h:1054
static string * Mutable(int number, int index, ExtensionSet *set)
Definition: extension_set.h:817
RepeatedMessageTypeTraits< Type > Repeated
Definition: extension_set.h:971
RepeatedField< bool > * repeated_bool_value
Definition: extension_set.h:468
arena_t NULL
Definition: jemalloc_internal.h:624
RepeatedField< int64 > * repeated_int64_value
Definition: extension_set.h:463
static const RepeatedFieldType * default_repeated_field_
Definition: extension_set.h:850
Definition: message.h:720
static const RepeatedPtrField< string > & GetRepeated(int number, const ExtensionSet &set)
Definition: extension_set.h:830
int cached_size
Definition: extension_set.h:498
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
Definition: common.h:89
int GetRepeatedEnum(int number, int index) const
bool EnumValidityFuncWithArg(const void *arg, int number)
Definition: extension_set.h:86
EnumValidityCheck enum_validity_check
Definition: extension_set.h:105
std::map< int, Extension > extensions_
Definition: extension_set.h:589
virtual ~GeneratedExtensionFinder()
Definition: extension_set.h:131
RepeatedPtrField< Type > RepeatedFieldType
Definition: extension_set.h:973
unsigned char Bool
Definition: bzlib_private.h:42
RepeatedPtrField< string > RepeatedFieldType
Definition: extension_set.h:807
static Type Get(int number, const ExtensionSet &set, int index)
MessageLite * AddMessage(int number, FieldType type, const MessageLite &prototype, desc)
static void Set(int number, FieldType field_type, ConstType value, ExtensionSet *set)
Definition: extension_set.h:869
Type ConstType
Definition: extension_set.h:879
const MessageLite & GetMessage(int number, const MessageLite &default_value) const
Type MutableType
Definition: extension_set.h:880
#define desc
Definition: extension_set.h:309
EnumValidityFuncWithArg * func
Definition: extension_set.h:100
static ConstType Get(int number, const ExtensionSet &set, ConstType default_value)
Definition: extension_set.h:865
static string * Add(int number, FieldType field_type, ExtensionSet *set)
Definition: extension_set.h:825
static MutableType Add(int number, FieldType field_type, ExtensionSet *set)
Definition: extension_set.h:981
TypeTraits::ConstType default_value_
Definition: extension_set.h:1060
string * MutableType
Definition: extension_set.h:784
void SetEnum(int number, FieldType type, int value, desc)
static RepeatedField< Type > * MutableRepeated(int number, FieldType field_type, bool is_packed, ExtensionSet *set)
int32_t int32
Definition: common.h:172
static const RepeatedField< uint64 > * default_repeated_field_uint64_
Definition: extension_set.h:717
Definition: extension_set.h:781
PrimitiveTypeTraits< Type > Singular
Definition: extension_set.h:674
RepeatedField< Type > RepeatedFieldType
Definition: extension_set.h:689
StringTypeTraits Singular
Definition: extension_set.h:785
Type * MutableType
Definition: extension_set.h:939
bool bool_value
Definition: extension_set.h:456
Definition: extension_set.h:419
static ConstType Get(int number, const ExtensionSet &set, ConstType default_value)
Definition: extension_set.h:942
void SetAllocatedMessage(int number, FieldType type, const FieldDescriptor *descriptor, MessageLite *message)
static const RepeatedField< double > * default_repeated_field_double_
Definition: extension_set.h:718
Definition: descriptor.h:1167
static MutableType Mutable(int number, int index, ExtensionSet *set)
Definition: extension_set.h:978
ExtensionInfo(FieldType type_param, bool isrepeated, bool ispacked)
Definition: extension_set.h:91
Definition: coded_stream.h:621
Definition: extension_set.h:877
bool is_valid(octet_iterator start, octet_iterator end)
Definition: core.h:300
RepeatedField< int > * repeated_enum_value
Definition: extension_set.h:469
static const RepeatedField< bool > * default_repeated_field_bool_
Definition: extension_set.h:720
uint64 uint64_value
Definition: extension_set.h:453
RepeatedStringTypeTraits Repeated
Definition: extension_set.h:805
ExtensionInfo()
Definition: extension_set.h:90
Definition: extension_set.h:859
static ConstType Get(int number, const ExtensionSet &set, ConstType default_value)
Type ConstType
Definition: extension_set.h:672
FieldType type
Definition: extension_set.h:95
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: common.h:177
uint32_t uint32
Definition: Define.h:150
unsigned int UInt32
Definition: bzlib_private.h:45
uint64_t uint64
Definition: Define.h:149
static ConstType Get(int number, const ExtensionSet &set, int index)
Definition: extension_set.h:885
static RepeatedPtrField< Type > * MutableRepeated(int number, FieldType field_type, bool is_packed, ExtensionSet *set)
Definition: extension_set.h:997
static const RepeatedFieldType * GetDefaultRepeatedField()
Definition: extension_set.h:843
static const RepeatedFieldType * GetDefaultRepeatedField()
int GetEnum(int number, int default_value) const
uint32 uint32_value
Definition: extension_set.h:452
uint64_t uint64
Definition: common.h:178
FieldType type
Definition: extension_set.h:474
MessageTypeTraits< Type > Singular
Definition: extension_set.h:940
const FieldDescriptor * descriptor
Definition: extension_set.h:112
void DestroyDefaultRepeatedFields()
Definition: extension_set.h:157
Definition: repeated_field.h:250
static MutableType Release(int number, FieldType, ExtensionSet *set)
Definition: extension_set.h:956
Type * MutableType
Definition: extension_set.h:970
const MessageLite & GetRepeatedMessage(int number, int index) const
int32 int32_value
Definition: extension_set.h:450
MessageLite * MutableMessage(int number, FieldType type, const MessageLite &prototype, desc)
RepeatedField< Type > RepeatedFieldType
Definition: extension_set.h:883
static void Set(int number, FieldType field_type, ConstType value, ExtensionSet *set)
void AddString(int number, FieldType type, const string &value, desc)
Definition: document.h:390
#define LIBPROTOBUF_EXPORT
Definition: common.h:105
internal::NamedArg< char > arg(StringRef name, const T &arg)
Definition: format.h:3248
int Int32
Definition: bzlib_private.h:44
static MutableType Mutable(int number, FieldType field_type, ExtensionSet *set)
Definition: extension_set.h:947
int number() const
Definition: extension_set.h:1053
static const string & Get(int number, const ExtensionSet &set, int index)
Definition: extension_set.h:809
Definition: extension_set.h:1010
const Type & ConstType
Definition: extension_set.h:969
RepeatedField< int32 > * repeated_int32_value
Definition: extension_set.h:462
const FieldDescriptor * descriptor
Definition: extension_set.h:503
RepeatedPtrField< MessageLite > * repeated_message_value
Definition: extension_set.h:471
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:74
Definition: extension_set.h:99
static const RepeatedField< int64 > * default_repeated_field_int64_
Definition: extension_set.h:715
const MessageLite * containing_type_
Definition: extension_set.h:137
int64_t int64
Definition: common.h:173
static void SetAllocated(int number, FieldType field_type, MutableType message, ExtensionSet *set)
Definition: extension_set.h:952
float float_value
Definition: extension_set.h:454
Definition: extension_set.h:683
static ConstType Get(int number, const ExtensionSet &set, int index)
Definition: extension_set.h:975
Definition: descriptor.h:342
MessageLite * ReleaseMessage(int number, const MessageLite &prototype)
Type ConstType
Definition: extension_set.h:685
static const RepeatedFieldType * default_repeated_field_
Definition: extension_set.h:1017
static void Add(int number, FieldType field_type, bool is_packed, Type value, ExtensionSet *set)
uint8_t uint8
Definition: Define.h:152
static void Set(int number, int index, ConstType value, ExtensionSet *set)
Definition: extension_set.h:888
static RepeatedField< Type > * MutableRepeated(int number, FieldType field_type, bool is_packed, ExtensionSet *set)
Definition: extension_set.h:909
double double_value
Definition: extension_set.h:455
Definition: BnetFileGenerator.h:47
void * MutableRawRepeatedField(int number, FieldType field_type, bool packed, const FieldDescriptor *desc)
const Type & ConstType
Definition: extension_set.h:938
MessageLite * message_value
Definition: extension_set.h:459
const string & ConstType
Definition: extension_set.h:783
uint8 FieldType
Definition: extension_set.h:77
const FieldDescriptor value
Definition: descriptor.h:1522
Type MutableType
Definition: extension_set.h:673
void InitializeDefaultRepeatedFields()
Definition: extension_set.h:117
static void Add(int number, FieldType field_type, bool is_packed, ConstType value, ExtensionSet *set)
Definition: extension_set.h:893
void SetRepeatedString(int number, int index, const string &value)
Definition: extension_set.h:600
extension
Definition: descriptor.h:1476
static const RepeatedFieldType * GetDefaultRepeatedField()
Definition: extension_set.h:917
bool is_repeated
Definition: extension_set.h:475
ExtendeeType Extendee
Definition: extension_set.h:1049
Type
Type of JSON value.
Definition: rapidjson.h:642
Definition: extension_set.h:709
bool is_packed
Definition: extension_set.h:97
TypeTraitsType TypeTraits
Definition: extension_set.h:1048
static void Set(int number, int index, const string &value, ExtensionSet *set)
Definition: extension_set.h:813
const string & GetRepeatedString(int number, int index) const
const int number_
Definition: extension_set.h:1059
void AddEnum(int number, FieldType type, bool packed, int value, desc)
RepeatedPtrField< string > * repeated_string_value
Definition: extension_set.h:470
Definition: extension_set.h:801
RepeatedField< uint64 > * repeated_uint64_value
Definition: extension_set.h:465
static const RepeatedField< uint32 > * default_repeated_field_uint32_
Definition: extension_set.h:716
RepeatedField< uint32 > * repeated_uint32_value
Definition: extension_set.h:464
RepeatedPtrField< ::google::protobuf::MessageLite * > RepeatedFieldType
Definition: extension_set.h:1012
static void Set(int number, int index, Type value, ExtensionSet *set)
Definition: wire_format_lite.h:524
Definition: extension_set.h:936
Definition: extension_set.h:967
Type MutableType
Definition: extension_set.h:862
virtual ~LazyMessageExtension()
Definition: extension_set.h:422
RepeatedPrimitiveTypeTraits< Type > Repeated
Definition: extension_set.h:687
void SetRepeatedEnum(int number, int index, int value)
ExtensionIdentifier(int number, typename TypeTraits::ConstType default_value)
Definition: extension_set.h:1051
string * string_value
Definition: extension_set.h:458
int enum_value
Definition: extension_set.h:457