Go to the documentation of this file.
36 #include <google/protobuf/port_def.inc>
75 int state =
state_.load(std::memory_order_acquire);
80 int state =
state_.load(std::memory_order_acquire);
99 switch (
state_.load(std::memory_order_acquire)) {
113 if (
state_.load(std::memory_order_relaxed) ==
CLEAN) {
119 Arena::CreateMessage<RepeatedPtrField<Message> >(
arena_);
154 : default_entry_(default_entry) {}
159 default_entry_(default_entry) {}
165 iter !=
map_.end(); ++iter) {
166 iter->second.DeleteData();
176 iter !=
map->end(); ++iter) {
177 iter->second.DeleteData();
192 return iter !=
map.end();
202 #define HANDLE_TYPE(CPPTYPE, TYPE) \
203 case FieldDescriptor::CPPTYPE_##CPPTYPE: { \
204 TYPE* value = new TYPE(); \
205 map_val->SetValue(value); \
234 if (iter ==
map->end()) {
237 val->CopyFrom(map_val);
242 val->CopyFrom(iter->second);
249 if (iter ==
map_.end()) {
254 iter->second.DeleteData();
274 if (iter ==
map_.end())
return;
285 other_field.
map_.begin();
286 other_it != other_field.
map_.end(); ++other_it) {
289 if (iter ==
map->end()) {
290 map_val = &
map_[other_it->first];
293 map_val = &iter->second;
299 switch (field_descriptor->
cpp_type()) {
338 other_it->second.GetMessageValue());
350 auto other_state = other_field->state_.load(std::memory_order_relaxed);
352 other_field->state_.store(this_state, std::memory_order_relaxed);
367 Arena::CreateMessage<RepeatedPtrField<Message> >(
453 iter !=
map->end(); ++iter) {
454 iter->second.DeleteData();
490 if (iter !=
map->end()) {
491 iter->second.DeleteData();
497 #define HANDLE_TYPE(CPPTYPE, TYPE, METHOD) \
498 case FieldDescriptor::CPPTYPE_##CPPTYPE: { \
499 TYPE* value = new TYPE; \
500 *value = reflection->Get##METHOD(*it, val_des); \
501 map_val.SetValue(value); \
531 size_t map_size =
map_.size();
534 size +=
sizeof(
it->first) * map_size;
535 size +=
sizeof(
it->second) * map_size;
541 switch (
it->second.type()) {
542 #define HANDLE_TYPE(CPPTYPE, TYPE) \
543 case FieldDescriptor::CPPTYPE_##CPPTYPE: { \
544 size += sizeof(TYPE) * map_size; \
558 while (
it !=
map_.end()) {
virtual int size() const =0
std::string GetString(const Message &message, const FieldDescriptor *field) const
unsigned long long int UInt64
virtual size_t SpaceUsedExcludingSelfNoLock() const
void SetBoolValue(bool value)
void SetBool(Message *message, const FieldDescriptor *field, bool value) const
internal::WrappedMutex mutex_
uint64 GetUInt64Value() const
uint32 GetUInt32(const Message &message, const FieldDescriptor *field) const
uint32 GetUInt32Value() const
void SetMapIteratorValue(MapIterator *map_iter) const override
bool InsertOrLookupMapValue(const MapKey &map_key, MapValueRef *val) override
void SetUInt64Value(uint64 value)
void SetStringValue(const std::string &val)
const Reflection * GetReflection() const
const RepeatedPtrFieldBase & GetRepeatedField() const
int32 GetInt32Value() const
bool GetBoolValue() const
virtual void CopyFrom(const Message &from)
uint32 GetUInt32Value() const
void SetDouble(Message *message, const FieldDescriptor *field, double value) const
GLsizei const GLchar *const * string
void SetInt64(Message *message, const FieldDescriptor *field, int64 value) const
void SetString(Message *message, const FieldDescriptor *field, const std::string &value) const
double GetDoubleValue() const
const Message & GetMessageValue() const
HANDLE_TYPE(int32, FieldDescriptor::CPPTYPE_INT32, -1)
bool GetBool(const Message &message, const FieldDescriptor *field) const
TypeWithSize< 4 >::Int Int32
size_t SpaceUsedExcludingSelfLong() const
void SetUInt32Value(uint32 value)
int32 GetInt32Value() const
void CopyFrom(const MapValueRef &other)
void SetUInt64(Message *message, const FieldDescriptor *field, uint64 value) const
FloatingPoint< double > Double
TypeWithSize< 4 >::UInt UInt32
static size_t begin(const upb_table *t)
uint64 GetUInt64Value() const
void CopyFrom(const MapKey &other)
const std::string & GetStringValue() const
FloatingPoint< float > Float
bool IsRepeatedFieldValid() const
const Map< MapKey, MapValueRef > & GetMap() const override
void SetFloatValue(float value)
void SetType(FieldDescriptor::CppType type)
RepeatedPtrField< Message > * repeated_field_
int64 GetInt64Value() const
void SyncRepeatedFieldWithMap() const
void SetEnumValue(int value)
void SetInt32(Message *message, const FieldDescriptor *field, int32 value) const
#define GOOGLE_LOG(LEVEL)
void SetUInt64Value(uint64 value)
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
void SetInt32Value(int32 value)
virtual void SyncRepeatedFieldWithMapNoLock() const
int64 GetInt64Value() const
void SetInt64Value(int64 value)
void MergeFrom(const MapFieldBase &other) override
int32 GetInt32(const Message &message, const FieldDescriptor *field) const
Message * MutableMessage(Message *message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
@ STATE_MODIFIED_REPEATED
void SetInt64Value(int64 value)
bool ContainsMapKey(const MapKey &map_key) const override
void SetInt32Value(int32 value)
const Descriptor * GetDescriptor() const
float GetFloatValue() const
const Message * default_entry_
void AllocateMapValue(MapValueRef *map_val)
const FieldDescriptor * FindFieldByName(const std::string &name) const
void SetEnumValue(Message *message, const FieldDescriptor *field, int value) const
RepeatedPtrFieldBase * MutableRepeatedField()
const std::string & GetStringValue() const
void SetValue(const void *val)
virtual void SyncMapWithRepeatedFieldNoLock() const
void SetDoubleValue(double value)
void SyncMapWithRepeatedField() const
void SyncRepeatedFieldWithMapNoLock() const override
void SetStringValue(const std::string &value)
int64 GetInt64(const Message &message, const FieldDescriptor *field) const
Message * New() const override=0
void Swap(MapFieldBase *other) override
Map< Key, T >::const_iterator & InternalGetIterator(const MapIterator *map_iter) const
bool DeleteMapValue(const MapKey &map_key) override
Map< MapKey, MapValueRef > map_
int size() const override
GLsizei const GLfloat * value
void SetBoolValue(bool value)
bool GetBoolValue() const
std::atomic< State > state_
void SetUInt32Value(uint32 value)
void SetFloat(Message *message, const FieldDescriptor *field, float value) const
GLenum GLuint GLenum GLsizei const GLchar * message
uint64 GetUInt64(const Message &message, const FieldDescriptor *field) const
size_t SpaceUsedExcludingSelfNoLock() const override
void SyncMapWithRepeatedFieldNoLock() const override
DynamicMapField(const Message *default_entry)
Map< MapKey, MapValueRef > * MutableMap() override
Message * MutableMessageValue()
~DynamicMapField() override
const Message & GetMessage(const Message &message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
void SetUInt32(Message *message, const FieldDescriptor *field, uint32 value) const
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:56