Go to the documentation of this file.
38 #ifndef GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
39 #define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
43 #include <unordered_map>
46 #include <google/protobuf/stubs/common.h>
47 #include <google/protobuf/message.h>
48 #include <google/protobuf/stubs/mutex.h>
49 #include <google/protobuf/reflection.h>
50 #include <google/protobuf/repeated_field.h>
53 #error "You cannot SWIG proto headers"
56 #include <google/protobuf/port_def.inc>
106 delegate_to_generated_factory_ = enable;
130 bool delegate_to_generated_factory_;
133 std::unordered_map<const Descriptor*, const TypeInfo*>
prototypes_;
134 mutable internal::WrappedMutex prototypes_mutex_;
148 std::vector<const Message*>
result;
152 for (
auto it = map_field.begin();
it != map_field.end(); ++
it) {
156 std::stable_sort(
result.begin(),
result.end(), comparator);
159 for (
size_t j = 1; j < static_cast<size_t>(map_size); j++) {
162 ?
"internal error in map key sorting"
163 :
"map keys are not unique");
178 switch (field_->cpp_type()) {
210 GOOGLE_LOG(DFATAL) <<
"Invalid key for map field.";
223 #include <google/protobuf/port_undef.inc>
225 #endif // GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
std::string GetString(const Message &message, const FieldDescriptor *field) const
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
uint32 GetUInt32(const Message &message, const FieldDescriptor *field) const
static std::vector< const Message * > Sort(const Message &message, int map_size, const Reflection *reflection, const FieldDescriptor *field)
RepeatedFieldRef< T > GetRepeatedFieldRef(const Message &message, const FieldDescriptor *field) const
GRPC_CUSTOM_DYNAMICMESSAGEFACTORY DynamicMessageFactory
bool GetBool(const Message &message, const FieldDescriptor *field) const
unsigned __int64 uint64_t
static const LogLevel ERROR
int32 GetInt32(const Message &message, const FieldDescriptor *field) const
MapEntryMessageComparator(const Descriptor *descriptor)
void SetDelegateToGeneratedFactory(bool enable)
const FieldDescriptor * field
int64 GetInt64(const Message &message, const FieldDescriptor *field) const
InternalDescriptorPool * pool
#define GOOGLE_LOG(LEVEL)
std::unordered_map< const Descriptor *, const TypeInfo * > prototypes_
bool operator()(const Message *a, const Message *b)
static const char descriptor[1336]
uint64 GetUInt64(const Message &message, const FieldDescriptor *field) const
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:18