diff --git a/_lab/cpp/.gitignore b/_lab/cpp/.gitignore deleted file mode 100644 index f0da9d4d..00000000 --- a/_lab/cpp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -bin -build -src/protoconf/* \ No newline at end of file diff --git a/_lab/cpp/gen.sh b/_lab/cpp/gen.sh deleted file mode 100755 index 7d7e013f..00000000 --- a/_lab/cpp/gen.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -cd "$(git rev-parse --show-toplevel)" -PROTOC="./third_party/_submodules/protobuf/src/protoc" -PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="./_lab/cpp/src/protoconf" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" -mkdir -p "$PROTOCONF_OUT" -${PROTOC} \ ---cpp_out="$PROTOCONF_OUT" \ ---proto_path="$PROTOBUF_PROTO" \ ---proto_path="$TABLEAU_PROTO" \ ---proto_path="$PROTOCONF_IN" \ -"$PROTOCONF_IN"/* - -TABLEAU_IN="./third_party/_submodules/tableau/proto/tableau/protobuf" -TABLEAU_OUT="./_lab/cpp/src/" -# remove old generated files -rm -rfv "$TABLEAU_OUT/tableau" -mkdir -p "$TABLEAU_OUT/tableau" - -${PROTOC} \ ---cpp_out="$TABLEAU_OUT" \ ---proto_path="$PROTOBUF_PROTO" \ ---proto_path="$TABLEAU_PROTO" \ -"${TABLEAU_PROTO}/tableau/protobuf/tableau.proto" \ No newline at end of file diff --git a/_lab/cpp/src/CMakeLists.txt b/_lab/cpp/src/CMakeLists.txt deleted file mode 100644 index d1d00419..00000000 --- a/_lab/cpp/src/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -# set the project name -project(loader) -file(GLOB_RECURSE PROTO_SOURCE *.cc) -file(GLOB_RECURSE SOURCE *.cpp) - -# specify the C++ standard -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED True) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -fPIC -std=c++11 -Wno-deprecated -Wno-unused-variable -Wno-sign-compare -Wno-strict-aliasing -fno-strict-aliasing -DNDEBUG") - -# root dir define -SET(CMAKE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) -SET(THRID_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party) - -# google protobuf -SET(PROTOBUF_ROOT_DIR ${THRID_PARTY_DIR}/_submodules/protobuf/) -SET(PROTOBUF_DIR ${PROTOBUF_ROOT_DIR}/src/) -# SET(PROTOBUF_INCLUDE ${PROTOBUF_DIR}/google/protobuf) -SET(PROTOBUF_LIB ${PROTOBUF_DIR}/.libs/) - -# protoconf -SET(PROTOCONF_DIR ${TOOLS_DIR}/protoconf) -SET(PROTOCONF_TOOL ${PROTOCONF_DIR}/protoconf) - -# common include -SET(COMMON_INCLUDE_DIR - ${PROTOBUF_DIR} - ) - -# common lib -SET(COMMON_LIB - ${PROTOBUF_LIB}/libprotobuf.a - pthread - ) - -# inlcude -include_directories(${PROJECT_SOURCE_DIR} ${COMMON_INCLUDE_DIR}) - -# add the executable -add_executable(${PROJECT_NAME} ${PROTO_SOURCE} ${SOURCE}) -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../bin) -target_link_libraries(${PROJECT_NAME} ${COMMON_LIB}) \ No newline at end of file diff --git a/_lab/cpp/src/demo/common_conf.pb.cc b/_lab/cpp/src/demo/common_conf.pb.cc deleted file mode 100644 index 46fc89b9..00000000 --- a/_lab/cpp/src/demo/common_conf.pb.cc +++ /dev/null @@ -1,323 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common_conf.proto - -#include "common_conf.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG -namespace protoconf { -constexpr Item::Item( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : id_(0u) - , num_(0){} -struct ItemDefaultTypeInternal { - constexpr ItemDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ItemDefaultTypeInternal() {} - union { - Item _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ItemDefaultTypeInternal _Item_default_instance_; -} // namespace protoconf -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_common_5fconf_2eproto[1]; -static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_common_5fconf_2eproto[1]; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_common_5fconf_2eproto = nullptr; - -const uint32_t TableStruct_common_5fconf_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::Item, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::Item, id_), - PROTOBUF_FIELD_OFFSET(::protoconf::Item, num_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::protoconf::Item)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::protoconf::_Item_default_instance_), -}; - -const char descriptor_table_protodef_common_5fconf_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\021common_conf.proto\022\tprotoconf\032\036tableau/" - "protobuf/tableau.proto\"C\n\004Item\022#\n\002id\030\001 \001" - "(\rB\027\202\265\030\023\n\002Idz\r\032\013ItemConf.ID\022\026\n\003num\030\002 \001(\005" - "B\t\202\265\030\005\n\003Num*\237\001\n\tFruitType\022%\n\022FRUIT_TYPE_" - "UNKNOWN\020\000\032\r\202\265\030\t\n\007Unknown\022!\n\020FRUIT_TYPE_A" - "PPLE\020\001\032\013\202\265\030\007\n\005Apple\022#\n\021FRUIT_TYPE_ORANGE" - "\020\002\032\014\202\265\030\010\n\006Orange\022#\n\021FRUIT_TYPE_BANANA\020\003\032" - "\014\202\265\030\010\n\006BananaB>Z(from._internal_metadata_); - ::memcpy(&id_, &from.id_, - static_cast(reinterpret_cast(&num_) - - reinterpret_cast(&id_)) + sizeof(num_)); - // @@protoc_insertion_point(copy_constructor:protoconf.Item) -} - -inline void Item::SharedCtor() { -::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&id_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&num_) - - reinterpret_cast(&id_)) + sizeof(num_)); -} - -Item::~Item() { - // @@protoc_insertion_point(destructor:protoconf.Item) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void Item::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void Item::ArenaDtor(void* object) { - Item* _this = reinterpret_cast< Item* >(object); - (void)_this; -} -void Item::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Item::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void Item::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.Item) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&id_, 0, static_cast( - reinterpret_cast(&num_) - - reinterpret_cast(&id_)) + sizeof(num_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Item::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint32 id = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // int32 num = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Item::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.Item) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 id = 1 [(.tableau.field) = { - if (this->_internal_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), target); - } - - // int32 num = 2 [(.tableau.field) = { - if (this->_internal_num() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.Item) - return target; -} - -size_t Item::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.Item) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // uint32 id = 1 [(.tableau.field) = { - if (this->_internal_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); - } - - // int32 num = 2 [(.tableau.field) = { - if (this->_internal_num() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Item::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - Item::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Item::GetClassData() const { return &_class_data_; } - -void Item::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void Item::MergeFrom(const Item& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.Item) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_id() != 0) { - _internal_set_id(from._internal_id()); - } - if (from._internal_num() != 0) { - _internal_set_num(from._internal_num()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Item::CopyFrom(const Item& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.Item) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Item::IsInitialized() const { - return true; -} - -void Item::InternalSwap(Item* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Item, num_) - + sizeof(Item::num_) - - PROTOBUF_FIELD_OFFSET(Item, id_)>( - reinterpret_cast(&id_), - reinterpret_cast(&other->id_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Item::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_common_5fconf_2eproto_getter, &descriptor_table_common_5fconf_2eproto_once, - file_level_metadata_common_5fconf_2eproto[0]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::protoconf::Item* Arena::CreateMaybeMessage< ::protoconf::Item >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::Item >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/_lab/cpp/src/demo/common_conf.pb.h b/_lab/cpp/src/demo/common_conf.pb.h deleted file mode 100644 index 7608e99b..00000000 --- a/_lab/cpp/src/demo/common_conf.pb.h +++ /dev/null @@ -1,324 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common_conf.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_common_5fconf_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_common_5fconf_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3019000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3019003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include "tableau/protobuf/tableau.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_common_5fconf_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_common_5fconf_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_5fconf_2eproto; -namespace protoconf { -class Item; -struct ItemDefaultTypeInternal; -extern ItemDefaultTypeInternal _Item_default_instance_; -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> ::protoconf::Item* Arena::CreateMaybeMessage<::protoconf::Item>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace protoconf { - -enum FruitType : int { - FRUIT_TYPE_UNKNOWN = 0, - FRUIT_TYPE_APPLE = 1, - FRUIT_TYPE_ORANGE = 2, - FRUIT_TYPE_BANANA = 3, - FruitType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - FruitType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool FruitType_IsValid(int value); -constexpr FruitType FruitType_MIN = FRUIT_TYPE_UNKNOWN; -constexpr FruitType FruitType_MAX = FRUIT_TYPE_BANANA; -constexpr int FruitType_ARRAYSIZE = FruitType_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FruitType_descriptor(); -template -inline const std::string& FruitType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function FruitType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - FruitType_descriptor(), enum_t_value); -} -inline bool FruitType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FruitType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - FruitType_descriptor(), name, value); -} -// =================================================================== - -class Item final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.Item) */ { - public: - inline Item() : Item(nullptr) {} - ~Item() override; - explicit constexpr Item(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Item(const Item& from); - Item(Item&& from) noexcept - : Item() { - *this = ::std::move(from); - } - - inline Item& operator=(const Item& from) { - CopyFrom(from); - return *this; - } - inline Item& operator=(Item&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Item& default_instance() { - return *internal_default_instance(); - } - static inline const Item* internal_default_instance() { - return reinterpret_cast( - &_Item_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Item& a, Item& b) { - a.Swap(&b); - } - inline void Swap(Item* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Item* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Item* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Item& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const Item& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Item* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.Item"; - } - protected: - explicit Item(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kIdFieldNumber = 1, - kNumFieldNumber = 2, - }; - // uint32 id = 1 [(.tableau.field) = { - void clear_id(); - uint32_t id() const; - void set_id(uint32_t value); - private: - uint32_t _internal_id() const; - void _internal_set_id(uint32_t value); - public: - - // int32 num = 2 [(.tableau.field) = { - void clear_num(); - int32_t num() const; - void set_num(int32_t value); - private: - int32_t _internal_num() const; - void _internal_set_num(int32_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.Item) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - uint32_t id_; - int32_t num_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_common_5fconf_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Item - -// uint32 id = 1 [(.tableau.field) = { -inline void Item::clear_id() { - id_ = 0u; -} -inline uint32_t Item::_internal_id() const { - return id_; -} -inline uint32_t Item::id() const { - // @@protoc_insertion_point(field_get:protoconf.Item.id) - return _internal_id(); -} -inline void Item::_internal_set_id(uint32_t value) { - - id_ = value; -} -inline void Item::set_id(uint32_t value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:protoconf.Item.id) -} - -// int32 num = 2 [(.tableau.field) = { -inline void Item::clear_num() { - num_ = 0; -} -inline int32_t Item::_internal_num() const { - return num_; -} -inline int32_t Item::num() const { - // @@protoc_insertion_point(field_get:protoconf.Item.num) - return _internal_num(); -} -inline void Item::_internal_set_num(int32_t value) { - - num_ = value; -} -inline void Item::set_num(int32_t value) { - _internal_set_num(value); - // @@protoc_insertion_point(field_set:protoconf.Item.num) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protoconf - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::protoconf::FruitType> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::protoconf::FruitType>() { - return ::protoconf::FruitType_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_common_5fconf_2eproto diff --git a/_lab/cpp/src/demo/hero_conf.pb.cc b/_lab/cpp/src/demo/hero_conf.pb.cc deleted file mode 100644 index 33f78386..00000000 --- a/_lab/cpp/src/demo/hero_conf.pb.cc +++ /dev/null @@ -1,983 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: hero_conf.proto - -#include "hero_conf.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG -namespace protoconf { -constexpr HeroConf_HeroMapEntry_DoNotUse::HeroConf_HeroMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct HeroConf_HeroMapEntry_DoNotUseDefaultTypeInternal { - constexpr HeroConf_HeroMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~HeroConf_HeroMapEntry_DoNotUseDefaultTypeInternal() {} - union { - HeroConf_HeroMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeroConf_HeroMapEntry_DoNotUseDefaultTypeInternal _HeroConf_HeroMapEntry_DoNotUse_default_instance_; -constexpr HeroConf_Hero_AttrMapEntry_DoNotUse::HeroConf_Hero_AttrMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct HeroConf_Hero_AttrMapEntry_DoNotUseDefaultTypeInternal { - constexpr HeroConf_Hero_AttrMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~HeroConf_Hero_AttrMapEntry_DoNotUseDefaultTypeInternal() {} - union { - HeroConf_Hero_AttrMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeroConf_Hero_AttrMapEntry_DoNotUseDefaultTypeInternal _HeroConf_Hero_AttrMapEntry_DoNotUse_default_instance_; -constexpr HeroConf_Hero_Attr::HeroConf_Hero_Attr( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : title_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , attr_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct HeroConf_Hero_AttrDefaultTypeInternal { - constexpr HeroConf_Hero_AttrDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~HeroConf_Hero_AttrDefaultTypeInternal() {} - union { - HeroConf_Hero_Attr _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeroConf_Hero_AttrDefaultTypeInternal _HeroConf_Hero_Attr_default_instance_; -constexpr HeroConf_Hero::HeroConf_Hero( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : attr_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) - , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct HeroConf_HeroDefaultTypeInternal { - constexpr HeroConf_HeroDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~HeroConf_HeroDefaultTypeInternal() {} - union { - HeroConf_Hero _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeroConf_HeroDefaultTypeInternal _HeroConf_Hero_default_instance_; -constexpr HeroConf::HeroConf( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : hero_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}){} -struct HeroConfDefaultTypeInternal { - constexpr HeroConfDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~HeroConfDefaultTypeInternal() {} - union { - HeroConf _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeroConfDefaultTypeInternal _HeroConf_default_instance_; -} // namespace protoconf -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_hero_5fconf_2eproto[5]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_hero_5fconf_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_hero_5fconf_2eproto = nullptr; - -const uint32_t TableStruct_hero_5fconf_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_HeroMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_HeroMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_HeroMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_HeroMapEntry_DoNotUse, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_Attr, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_Attr, title_), - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero_Attr, attr_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero, name_), - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf_Hero, attr_map_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::HeroConf, hero_map_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 8, -1, sizeof(::protoconf::HeroConf_HeroMapEntry_DoNotUse)}, - { 10, 18, -1, sizeof(::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse)}, - { 20, -1, -1, sizeof(::protoconf::HeroConf_Hero_Attr)}, - { 28, -1, -1, sizeof(::protoconf::HeroConf_Hero)}, - { 36, -1, -1, sizeof(::protoconf::HeroConf)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::protoconf::_HeroConf_HeroMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_HeroConf_Hero_AttrMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_HeroConf_Hero_Attr_default_instance_), - reinterpret_cast(&::protoconf::_HeroConf_Hero_default_instance_), - reinterpret_cast(&::protoconf::_HeroConf_default_instance_), -}; - -const char descriptor_table_protodef_hero_5fconf_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\017hero_conf.proto\022\tprotoconf\032\036tableau/pr" - "otobuf/tableau.proto\"\251\003\n\010HeroConf\022@\n\010her" - "o_map\030\001 \003(\0132 .protoconf.HeroConf.HeroMap" - "EntryB\014\202\265\030\010\032\004Name \001\032H\n\014HeroMapEntry\022\013\n\003k" - "ey\030\001 \001(\t\022\'\n\005value\030\002 \001(\0132\030.protoconf.Hero" - "Conf.Hero:\0028\001\032\365\001\n\004Hero\022\030\n\004name\030\001 \001(\tB\n\202\265" - "\030\006\n\004Name\022F\n\010attr_map\030\002 \003(\0132%.protoconf.H" - "eroConf.Hero.AttrMapEntryB\r\202\265\030\t\032\005Title \001" - "\032M\n\014AttrMapEntry\022\013\n\003key\030\001 \001(\t\022,\n\005value\030\002" - " \001(\0132\035.protoconf.HeroConf.Hero.Attr:\0028\001\032" - "<\n\004Attr\022\032\n\005title\030\001 \001(\tB\013\202\265\030\007\n\005Title\022\030\n\004a" - "ttr\030\002 \001(\tB\n\202\265\030\006\n\004Attr:\031\202\265\030\025\n\010HeroConf\220\003\001" - "\232\003\005TitleBMZ(from._internal_metadata_); - title_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - title_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_title().empty()) { - title_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_title(), - GetArenaForAllocation()); - } - attr_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - attr_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_attr().empty()) { - attr_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_attr(), - GetArenaForAllocation()); - } - // @@protoc_insertion_point(copy_constructor:protoconf.HeroConf.Hero.Attr) -} - -inline void HeroConf_Hero_Attr::SharedCtor() { -title_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - title_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -attr_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - attr_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -HeroConf_Hero_Attr::~HeroConf_Hero_Attr() { - // @@protoc_insertion_point(destructor:protoconf.HeroConf.Hero.Attr) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void HeroConf_Hero_Attr::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - title_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - attr_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void HeroConf_Hero_Attr::ArenaDtor(void* object) { - HeroConf_Hero_Attr* _this = reinterpret_cast< HeroConf_Hero_Attr* >(object); - (void)_this; -} -void HeroConf_Hero_Attr::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void HeroConf_Hero_Attr::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void HeroConf_Hero_Attr::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.HeroConf.Hero.Attr) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - title_.ClearToEmpty(); - attr_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* HeroConf_Hero_Attr::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string title = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_title(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.HeroConf.Hero.Attr.title")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string attr = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_attr(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.HeroConf.Hero.Attr.attr")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* HeroConf_Hero_Attr::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.HeroConf.Hero.Attr) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string title = 1 [(.tableau.field) = { - if (!this->_internal_title().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_title().data(), static_cast(this->_internal_title().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.HeroConf.Hero.Attr.title"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_title(), target); - } - - // string attr = 2 [(.tableau.field) = { - if (!this->_internal_attr().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_attr().data(), static_cast(this->_internal_attr().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.HeroConf.Hero.Attr.attr"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_attr(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.HeroConf.Hero.Attr) - return target; -} - -size_t HeroConf_Hero_Attr::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.HeroConf.Hero.Attr) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string title = 1 [(.tableau.field) = { - if (!this->_internal_title().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_title()); - } - - // string attr = 2 [(.tableau.field) = { - if (!this->_internal_attr().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_attr()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeroConf_Hero_Attr::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - HeroConf_Hero_Attr::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeroConf_Hero_Attr::GetClassData() const { return &_class_data_; } - -void HeroConf_Hero_Attr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void HeroConf_Hero_Attr::MergeFrom(const HeroConf_Hero_Attr& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.HeroConf.Hero.Attr) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_title().empty()) { - _internal_set_title(from._internal_title()); - } - if (!from._internal_attr().empty()) { - _internal_set_attr(from._internal_attr()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void HeroConf_Hero_Attr::CopyFrom(const HeroConf_Hero_Attr& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.HeroConf.Hero.Attr) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool HeroConf_Hero_Attr::IsInitialized() const { - return true; -} - -void HeroConf_Hero_Attr::InternalSwap(HeroConf_Hero_Attr* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &title_, lhs_arena, - &other->title_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &attr_, lhs_arena, - &other->attr_, rhs_arena - ); -} - -::PROTOBUF_NAMESPACE_ID::Metadata HeroConf_Hero_Attr::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_hero_5fconf_2eproto_getter, &descriptor_table_hero_5fconf_2eproto_once, - file_level_metadata_hero_5fconf_2eproto[2]); -} - -// =================================================================== - -class HeroConf_Hero::_Internal { - public: -}; - -HeroConf_Hero::HeroConf_Hero(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - attr_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.HeroConf.Hero) -} -HeroConf_Hero::HeroConf_Hero(const HeroConf_Hero& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - attr_map_.MergeFrom(from.attr_map_); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), - GetArenaForAllocation()); - } - // @@protoc_insertion_point(copy_constructor:protoconf.HeroConf.Hero) -} - -inline void HeroConf_Hero::SharedCtor() { -name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -HeroConf_Hero::~HeroConf_Hero() { - // @@protoc_insertion_point(destructor:protoconf.HeroConf.Hero) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void HeroConf_Hero::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void HeroConf_Hero::ArenaDtor(void* object) { - HeroConf_Hero* _this = reinterpret_cast< HeroConf_Hero* >(object); - (void)_this; - _this->attr_map_. ~MapField(); -} -inline void HeroConf_Hero::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &HeroConf_Hero::ArenaDtor); - } -} -void HeroConf_Hero::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void HeroConf_Hero::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.HeroConf.Hero) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - attr_map_.Clear(); - name_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* HeroConf_Hero::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string name = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.HeroConf.Hero.name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // map attr_map = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&attr_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* HeroConf_Hero::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.HeroConf.Hero) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.HeroConf.Hero.name"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_name(), target); - } - - // map attr_map = 2 [(.tableau.field) = { - if (!this->_internal_attr_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - (void)p; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.HeroConf.Hero.AttrMapEntry.key"); - } - }; - - if (stream->IsSerializationDeterministic() && - this->_internal_attr_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_attr_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >::const_iterator - it = this->_internal_attr_map().begin(); - it != this->_internal_attr_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = HeroConf_Hero_AttrMapEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); - Utf8Check::Check(&(*items[static_cast(i)])); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >::const_iterator - it = this->_internal_attr_map().begin(); - it != this->_internal_attr_map().end(); ++it) { - target = HeroConf_Hero_AttrMapEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream); - Utf8Check::Check(&(*it)); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.HeroConf.Hero) - return target; -} - -size_t HeroConf_Hero::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.HeroConf.Hero) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map attr_map = 2 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_attr_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >::const_iterator - it = this->_internal_attr_map().begin(); - it != this->_internal_attr_map().end(); ++it) { - total_size += HeroConf_Hero_AttrMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string name = 1 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeroConf_Hero::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - HeroConf_Hero::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeroConf_Hero::GetClassData() const { return &_class_data_; } - -void HeroConf_Hero::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void HeroConf_Hero::MergeFrom(const HeroConf_Hero& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.HeroConf.Hero) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - attr_map_.MergeFrom(from.attr_map_); - if (!from._internal_name().empty()) { - _internal_set_name(from._internal_name()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void HeroConf_Hero::CopyFrom(const HeroConf_Hero& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.HeroConf.Hero) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool HeroConf_Hero::IsInitialized() const { - return true; -} - -void HeroConf_Hero::InternalSwap(HeroConf_Hero* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - attr_map_.InternalSwap(&other->attr_map_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &name_, lhs_arena, - &other->name_, rhs_arena - ); -} - -::PROTOBUF_NAMESPACE_ID::Metadata HeroConf_Hero::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_hero_5fconf_2eproto_getter, &descriptor_table_hero_5fconf_2eproto_once, - file_level_metadata_hero_5fconf_2eproto[3]); -} - -// =================================================================== - -class HeroConf::_Internal { - public: -}; - -HeroConf::HeroConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - hero_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.HeroConf) -} -HeroConf::HeroConf(const HeroConf& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - hero_map_.MergeFrom(from.hero_map_); - // @@protoc_insertion_point(copy_constructor:protoconf.HeroConf) -} - -inline void HeroConf::SharedCtor() { -} - -HeroConf::~HeroConf() { - // @@protoc_insertion_point(destructor:protoconf.HeroConf) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void HeroConf::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void HeroConf::ArenaDtor(void* object) { - HeroConf* _this = reinterpret_cast< HeroConf* >(object); - (void)_this; - _this->hero_map_. ~MapField(); -} -inline void HeroConf::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &HeroConf::ArenaDtor); - } -} -void HeroConf::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void HeroConf::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.HeroConf) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - hero_map_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* HeroConf::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // map hero_map = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&hero_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* HeroConf::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.HeroConf) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // map hero_map = 1 [(.tableau.field) = { - if (!this->_internal_hero_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - (void)p; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.HeroConf.HeroMapEntry.key"); - } - }; - - if (stream->IsSerializationDeterministic() && - this->_internal_hero_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_hero_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >::const_iterator - it = this->_internal_hero_map().begin(); - it != this->_internal_hero_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = HeroConf_HeroMapEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); - Utf8Check::Check(&(*items[static_cast(i)])); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >::const_iterator - it = this->_internal_hero_map().begin(); - it != this->_internal_hero_map().end(); ++it) { - target = HeroConf_HeroMapEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); - Utf8Check::Check(&(*it)); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.HeroConf) - return target; -} - -size_t HeroConf::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.HeroConf) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map hero_map = 1 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_hero_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >::const_iterator - it = this->_internal_hero_map().begin(); - it != this->_internal_hero_map().end(); ++it) { - total_size += HeroConf_HeroMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HeroConf::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - HeroConf::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HeroConf::GetClassData() const { return &_class_data_; } - -void HeroConf::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void HeroConf::MergeFrom(const HeroConf& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.HeroConf) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - hero_map_.MergeFrom(from.hero_map_); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void HeroConf::CopyFrom(const HeroConf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.HeroConf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool HeroConf::IsInitialized() const { - return true; -} - -void HeroConf::InternalSwap(HeroConf* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - hero_map_.InternalSwap(&other->hero_map_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata HeroConf::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_hero_5fconf_2eproto_getter, &descriptor_table_hero_5fconf_2eproto_once, - file_level_metadata_hero_5fconf_2eproto[4]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::protoconf::HeroConf_HeroMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::HeroConf_HeroMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::HeroConf_HeroMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::HeroConf_Hero_Attr* Arena::CreateMaybeMessage< ::protoconf::HeroConf_Hero_Attr >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::HeroConf_Hero_Attr >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::HeroConf_Hero* Arena::CreateMaybeMessage< ::protoconf::HeroConf_Hero >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::HeroConf_Hero >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::HeroConf* Arena::CreateMaybeMessage< ::protoconf::HeroConf >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::HeroConf >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/_lab/cpp/src/demo/hero_conf.pb.h b/_lab/cpp/src/demo/hero_conf.pb.h deleted file mode 100644 index b4fd4ceb..00000000 --- a/_lab/cpp/src/demo/hero_conf.pb.h +++ /dev/null @@ -1,892 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: hero_conf.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_hero_5fconf_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_hero_5fconf_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3019000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3019003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include -#include "tableau/protobuf/tableau.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_hero_5fconf_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_hero_5fconf_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[5] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_hero_5fconf_2eproto; -namespace protoconf { -class HeroConf; -struct HeroConfDefaultTypeInternal; -extern HeroConfDefaultTypeInternal _HeroConf_default_instance_; -class HeroConf_Hero; -struct HeroConf_HeroDefaultTypeInternal; -extern HeroConf_HeroDefaultTypeInternal _HeroConf_Hero_default_instance_; -class HeroConf_HeroMapEntry_DoNotUse; -struct HeroConf_HeroMapEntry_DoNotUseDefaultTypeInternal; -extern HeroConf_HeroMapEntry_DoNotUseDefaultTypeInternal _HeroConf_HeroMapEntry_DoNotUse_default_instance_; -class HeroConf_Hero_Attr; -struct HeroConf_Hero_AttrDefaultTypeInternal; -extern HeroConf_Hero_AttrDefaultTypeInternal _HeroConf_Hero_Attr_default_instance_; -class HeroConf_Hero_AttrMapEntry_DoNotUse; -struct HeroConf_Hero_AttrMapEntry_DoNotUseDefaultTypeInternal; -extern HeroConf_Hero_AttrMapEntry_DoNotUseDefaultTypeInternal _HeroConf_Hero_AttrMapEntry_DoNotUse_default_instance_; -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> ::protoconf::HeroConf* Arena::CreateMaybeMessage<::protoconf::HeroConf>(Arena*); -template<> ::protoconf::HeroConf_Hero* Arena::CreateMaybeMessage<::protoconf::HeroConf_Hero>(Arena*); -template<> ::protoconf::HeroConf_HeroMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::HeroConf_HeroMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::HeroConf_Hero_Attr* Arena::CreateMaybeMessage<::protoconf::HeroConf_Hero_Attr>(Arena*); -template<> ::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::HeroConf_Hero_AttrMapEntry_DoNotUse>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace protoconf { - -// =================================================================== - -class HeroConf_HeroMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - HeroConf_HeroMapEntry_DoNotUse(); - explicit constexpr HeroConf_HeroMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit HeroConf_HeroMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const HeroConf_HeroMapEntry_DoNotUse& other); - static const HeroConf_HeroMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_HeroConf_HeroMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "protoconf.HeroConf.HeroMapEntry.key"); - } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class HeroConf_Hero_AttrMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - HeroConf_Hero_AttrMapEntry_DoNotUse(); - explicit constexpr HeroConf_Hero_AttrMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit HeroConf_Hero_AttrMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const HeroConf_Hero_AttrMapEntry_DoNotUse& other); - static const HeroConf_Hero_AttrMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_HeroConf_Hero_AttrMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "protoconf.HeroConf.Hero.AttrMapEntry.key"); - } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class HeroConf_Hero_Attr final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.HeroConf.Hero.Attr) */ { - public: - inline HeroConf_Hero_Attr() : HeroConf_Hero_Attr(nullptr) {} - ~HeroConf_Hero_Attr() override; - explicit constexpr HeroConf_Hero_Attr(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeroConf_Hero_Attr(const HeroConf_Hero_Attr& from); - HeroConf_Hero_Attr(HeroConf_Hero_Attr&& from) noexcept - : HeroConf_Hero_Attr() { - *this = ::std::move(from); - } - - inline HeroConf_Hero_Attr& operator=(const HeroConf_Hero_Attr& from) { - CopyFrom(from); - return *this; - } - inline HeroConf_Hero_Attr& operator=(HeroConf_Hero_Attr&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const HeroConf_Hero_Attr& default_instance() { - return *internal_default_instance(); - } - static inline const HeroConf_Hero_Attr* internal_default_instance() { - return reinterpret_cast( - &_HeroConf_Hero_Attr_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(HeroConf_Hero_Attr& a, HeroConf_Hero_Attr& b) { - a.Swap(&b); - } - inline void Swap(HeroConf_Hero_Attr* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(HeroConf_Hero_Attr* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeroConf_Hero_Attr* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const HeroConf_Hero_Attr& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const HeroConf_Hero_Attr& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(HeroConf_Hero_Attr* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.HeroConf.Hero.Attr"; - } - protected: - explicit HeroConf_Hero_Attr(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTitleFieldNumber = 1, - kAttrFieldNumber = 2, - }; - // string title = 1 [(.tableau.field) = { - void clear_title(); - const std::string& title() const; - template - void set_title(ArgT0&& arg0, ArgT... args); - std::string* mutable_title(); - PROTOBUF_NODISCARD std::string* release_title(); - void set_allocated_title(std::string* title); - private: - const std::string& _internal_title() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_title(const std::string& value); - std::string* _internal_mutable_title(); - public: - - // string attr = 2 [(.tableau.field) = { - void clear_attr(); - const std::string& attr() const; - template - void set_attr(ArgT0&& arg0, ArgT... args); - std::string* mutable_attr(); - PROTOBUF_NODISCARD std::string* release_attr(); - void set_allocated_attr(std::string* attr); - private: - const std::string& _internal_attr() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_attr(const std::string& value); - std::string* _internal_mutable_attr(); - public: - - // @@protoc_insertion_point(class_scope:protoconf.HeroConf.Hero.Attr) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr title_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr attr_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_hero_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class HeroConf_Hero final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.HeroConf.Hero) */ { - public: - inline HeroConf_Hero() : HeroConf_Hero(nullptr) {} - ~HeroConf_Hero() override; - explicit constexpr HeroConf_Hero(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeroConf_Hero(const HeroConf_Hero& from); - HeroConf_Hero(HeroConf_Hero&& from) noexcept - : HeroConf_Hero() { - *this = ::std::move(from); - } - - inline HeroConf_Hero& operator=(const HeroConf_Hero& from) { - CopyFrom(from); - return *this; - } - inline HeroConf_Hero& operator=(HeroConf_Hero&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const HeroConf_Hero& default_instance() { - return *internal_default_instance(); - } - static inline const HeroConf_Hero* internal_default_instance() { - return reinterpret_cast( - &_HeroConf_Hero_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(HeroConf_Hero& a, HeroConf_Hero& b) { - a.Swap(&b); - } - inline void Swap(HeroConf_Hero* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(HeroConf_Hero* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeroConf_Hero* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const HeroConf_Hero& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const HeroConf_Hero& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(HeroConf_Hero* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.HeroConf.Hero"; - } - protected: - explicit HeroConf_Hero(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef HeroConf_Hero_Attr Attr; - - // accessors ------------------------------------------------------- - - enum : int { - kAttrMapFieldNumber = 2, - kNameFieldNumber = 1, - }; - // map attr_map = 2 [(.tableau.field) = { - int attr_map_size() const; - private: - int _internal_attr_map_size() const; - public: - void clear_attr_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >& - _internal_attr_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >* - _internal_mutable_attr_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >& - attr_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >* - mutable_attr_map(); - - // string name = 1 [(.tableau.field) = { - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // @@protoc_insertion_point(class_scope:protoconf.HeroConf.Hero) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - HeroConf_Hero_AttrMapEntry_DoNotUse, - std::string, ::protoconf::HeroConf_Hero_Attr, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> attr_map_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_hero_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class HeroConf final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.HeroConf) */ { - public: - inline HeroConf() : HeroConf(nullptr) {} - ~HeroConf() override; - explicit constexpr HeroConf(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeroConf(const HeroConf& from); - HeroConf(HeroConf&& from) noexcept - : HeroConf() { - *this = ::std::move(from); - } - - inline HeroConf& operator=(const HeroConf& from) { - CopyFrom(from); - return *this; - } - inline HeroConf& operator=(HeroConf&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const HeroConf& default_instance() { - return *internal_default_instance(); - } - static inline const HeroConf* internal_default_instance() { - return reinterpret_cast( - &_HeroConf_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(HeroConf& a, HeroConf& b) { - a.Swap(&b); - } - inline void Swap(HeroConf* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(HeroConf* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeroConf* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const HeroConf& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const HeroConf& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(HeroConf* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.HeroConf"; - } - protected: - explicit HeroConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef HeroConf_Hero Hero; - - // accessors ------------------------------------------------------- - - enum : int { - kHeroMapFieldNumber = 1, - }; - // map hero_map = 1 [(.tableau.field) = { - int hero_map_size() const; - private: - int _internal_hero_map_size() const; - public: - void clear_hero_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >& - _internal_hero_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >* - _internal_mutable_hero_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >& - hero_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >* - mutable_hero_map(); - - // @@protoc_insertion_point(class_scope:protoconf.HeroConf) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - HeroConf_HeroMapEntry_DoNotUse, - std::string, ::protoconf::HeroConf_Hero, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> hero_map_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_hero_5fconf_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// HeroConf_Hero_Attr - -// string title = 1 [(.tableau.field) = { -inline void HeroConf_Hero_Attr::clear_title() { - title_.ClearToEmpty(); -} -inline const std::string& HeroConf_Hero_Attr::title() const { - // @@protoc_insertion_point(field_get:protoconf.HeroConf.Hero.Attr.title) - return _internal_title(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeroConf_Hero_Attr::set_title(ArgT0&& arg0, ArgT... args) { - - title_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.HeroConf.Hero.Attr.title) -} -inline std::string* HeroConf_Hero_Attr::mutable_title() { - std::string* _s = _internal_mutable_title(); - // @@protoc_insertion_point(field_mutable:protoconf.HeroConf.Hero.Attr.title) - return _s; -} -inline const std::string& HeroConf_Hero_Attr::_internal_title() const { - return title_.Get(); -} -inline void HeroConf_Hero_Attr::_internal_set_title(const std::string& value) { - - title_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* HeroConf_Hero_Attr::_internal_mutable_title() { - - return title_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* HeroConf_Hero_Attr::release_title() { - // @@protoc_insertion_point(field_release:protoconf.HeroConf.Hero.Attr.title) - return title_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void HeroConf_Hero_Attr::set_allocated_title(std::string* title) { - if (title != nullptr) { - - } else { - - } - title_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), title, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (title_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - title_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.HeroConf.Hero.Attr.title) -} - -// string attr = 2 [(.tableau.field) = { -inline void HeroConf_Hero_Attr::clear_attr() { - attr_.ClearToEmpty(); -} -inline const std::string& HeroConf_Hero_Attr::attr() const { - // @@protoc_insertion_point(field_get:protoconf.HeroConf.Hero.Attr.attr) - return _internal_attr(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeroConf_Hero_Attr::set_attr(ArgT0&& arg0, ArgT... args) { - - attr_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.HeroConf.Hero.Attr.attr) -} -inline std::string* HeroConf_Hero_Attr::mutable_attr() { - std::string* _s = _internal_mutable_attr(); - // @@protoc_insertion_point(field_mutable:protoconf.HeroConf.Hero.Attr.attr) - return _s; -} -inline const std::string& HeroConf_Hero_Attr::_internal_attr() const { - return attr_.Get(); -} -inline void HeroConf_Hero_Attr::_internal_set_attr(const std::string& value) { - - attr_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* HeroConf_Hero_Attr::_internal_mutable_attr() { - - return attr_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* HeroConf_Hero_Attr::release_attr() { - // @@protoc_insertion_point(field_release:protoconf.HeroConf.Hero.Attr.attr) - return attr_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void HeroConf_Hero_Attr::set_allocated_attr(std::string* attr) { - if (attr != nullptr) { - - } else { - - } - attr_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), attr, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (attr_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - attr_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.HeroConf.Hero.Attr.attr) -} - -// ------------------------------------------------------------------- - -// HeroConf_Hero - -// string name = 1 [(.tableau.field) = { -inline void HeroConf_Hero::clear_name() { - name_.ClearToEmpty(); -} -inline const std::string& HeroConf_Hero::name() const { - // @@protoc_insertion_point(field_get:protoconf.HeroConf.Hero.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeroConf_Hero::set_name(ArgT0&& arg0, ArgT... args) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.HeroConf.Hero.name) -} -inline std::string* HeroConf_Hero::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:protoconf.HeroConf.Hero.name) - return _s; -} -inline const std::string& HeroConf_Hero::_internal_name() const { - return name_.Get(); -} -inline void HeroConf_Hero::_internal_set_name(const std::string& value) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* HeroConf_Hero::_internal_mutable_name() { - - return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* HeroConf_Hero::release_name() { - // @@protoc_insertion_point(field_release:protoconf.HeroConf.Hero.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void HeroConf_Hero::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.HeroConf.Hero.name) -} - -// map attr_map = 2 [(.tableau.field) = { -inline int HeroConf_Hero::_internal_attr_map_size() const { - return attr_map_.size(); -} -inline int HeroConf_Hero::attr_map_size() const { - return _internal_attr_map_size(); -} -inline void HeroConf_Hero::clear_attr_map() { - attr_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >& -HeroConf_Hero::_internal_attr_map() const { - return attr_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >& -HeroConf_Hero::attr_map() const { - // @@protoc_insertion_point(field_map:protoconf.HeroConf.Hero.attr_map) - return _internal_attr_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >* -HeroConf_Hero::_internal_mutable_attr_map() { - return attr_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero_Attr >* -HeroConf_Hero::mutable_attr_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.HeroConf.Hero.attr_map) - return _internal_mutable_attr_map(); -} - -// ------------------------------------------------------------------- - -// HeroConf - -// map hero_map = 1 [(.tableau.field) = { -inline int HeroConf::_internal_hero_map_size() const { - return hero_map_.size(); -} -inline int HeroConf::hero_map_size() const { - return _internal_hero_map_size(); -} -inline void HeroConf::clear_hero_map() { - hero_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >& -HeroConf::_internal_hero_map() const { - return hero_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >& -HeroConf::hero_map() const { - // @@protoc_insertion_point(field_map:protoconf.HeroConf.hero_map) - return _internal_hero_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >* -HeroConf::_internal_mutable_hero_map() { - return hero_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::HeroConf_Hero >* -HeroConf::mutable_hero_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.HeroConf.hero_map) - return _internal_mutable_hero_map(); -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protoconf - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_hero_5fconf_2eproto diff --git a/_lab/cpp/src/demo/hero_conf.pc.cc b/_lab/cpp/src/demo/hero_conf.pc.cc deleted file mode 100644 index 5a3a0df6..00000000 --- a/_lab/cpp/src/demo/hero_conf.pc.cc +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 -// source: hero_conf.proto - -#include "hero_conf.pc.h" - -namespace tableau { -const std::string HeroConf::kProtoName = "HeroConf"; - -bool HeroConf::Load(const std::string& dir, Format fmt, const LoadOptions* options /* = nullptr */) { - bool ok = LoadMessage(dir, data_, fmt, options); - return ok ? ProcessAfterLoad() : false; -} - -bool HeroConf::ProcessAfterLoad() { - // OrderedMap init. - for (auto&& item1 : data_.hero_map()) { - ordered_map_[item1.first] = Hero_OrderedMapValue(Hero_Attr_OrderedMap(), &item1.second); - auto&& ordered_map1 = ordered_map_[item1.first].first; - for (auto&& item2 : item1.second.attr_map()) { - ordered_map1[item2.first] = &item2.second; - } - } - - // Index init. - // Index: Title - for (auto&& item1 : data_.hero_map()) { - for (auto&& item2 : item1.second.attr_map()) { - index_attr_map_[item2.second.title()].push_back(&item2.second); - } - } - - return true; -} - -const protoconf::HeroConf::Hero* HeroConf::Get(const std::string& name) const { - auto iter = data_.hero_map().find(name); - if (iter == data_.hero_map().end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::HeroConf::Hero::Attr* HeroConf::Get(const std::string& name, const std::string& title) const { - const auto* conf = Get(name); - if (conf == nullptr) { - return nullptr; - } - auto iter = conf->attr_map().find(title); - if (iter == conf->attr_map().end()) { - return nullptr; - } - return &iter->second; -} - -const HeroConf::Hero_OrderedMap* HeroConf::GetOrderedMap() const { - return &ordered_map_; -} - -const HeroConf::Hero_Attr_OrderedMap* HeroConf::GetOrderedMap(const std::string& name) const { - const auto* conf = GetOrderedMap(); - if (conf == nullptr) { - return nullptr; - } - - auto iter = conf->find(name); - if (iter == conf->end()) { - return nullptr; - } - return &iter->second.first; -} - -// Index: Title -const HeroConf::Index_AttrMap& HeroConf::FindAttr() const { return index_attr_map_ ;} - -const HeroConf::Index_AttrVector* HeroConf::FindAttr(const std::string& title) const { - auto iter = index_attr_map_.find(title); - if (iter == index_attr_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::HeroConf::Hero::Attr* HeroConf::FindFirstAttr(const std::string& title) const { - auto conf = FindAttr(title); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - - -} // namespace tableau diff --git a/_lab/cpp/src/demo/hero_conf.pc.h b/_lab/cpp/src/demo/hero_conf.pc.h deleted file mode 100644 index a196905d..00000000 --- a/_lab/cpp/src/demo/hero_conf.pc.h +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 -// source: hero_conf.proto - -#pragma once -#include - -#include "hub.pc.h" -#include "hero_conf.pb.h" - -namespace tableau { -class HeroConf : public Messager { - public: - static const std::string& Name() { return kProtoName; }; - virtual bool Load(const std::string& dir, Format fmt, const LoadOptions* options = nullptr) override; - const protoconf::HeroConf& Data() const { return data_; }; - - private: - virtual bool ProcessAfterLoad() override final; - - public: - const protoconf::HeroConf::Hero* Get(const std::string& name) const; - const protoconf::HeroConf::Hero::Attr* Get(const std::string& name, const std::string& title) const; - - private: - static const std::string kProtoName; - protoconf::HeroConf data_; - - // OrderedMap accessers. - public: - using Hero_Attr_OrderedMap = std::map; - const Hero_Attr_OrderedMap* GetOrderedMap(const std::string& name) const; - - using Hero_OrderedMapValue = std::pair; - using Hero_OrderedMap = std::map; - const Hero_OrderedMap* GetOrderedMap() const; - - private: - Hero_OrderedMap ordered_map_; - - // Index accessers. - // Index: Title - public: - using Index_AttrVector = std::vector; - using Index_AttrMap = std::unordered_map; - const Index_AttrMap& FindAttr() const; - const Index_AttrVector* FindAttr(const std::string& title) const; - const protoconf::HeroConf::Hero::Attr* FindFirstAttr(const std::string& title) const; - - private: - Index_AttrMap index_attr_map_; - -}; - -} // namespace tableau - -namespace protoconf { -// Here are some type aliases for easy use. -using HeroConfMgr = tableau::HeroConf; -} // namespace protoconf diff --git a/_lab/cpp/src/demo/hub.pc.cc b/_lab/cpp/src/demo/hub.pc.cc deleted file mode 100644 index 3de6a370..00000000 --- a/_lab/cpp/src/demo/hub.pc.cc +++ /dev/null @@ -1,391 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#include "hub.pc.h" - -#include -#include -#include - -#include -#include -#include - -#include "logger.pc.h" -#include "registry.pc.h" - -namespace tableau { -static thread_local std::string g_err_msg; -const std::string& GetErrMsg() { return g_err_msg; } - -const std::string kJSONExt = ".json"; -const std::string kTextExt = ".txt"; -const std::string kBinExt = ".bin"; - -Format Ext2Format(const std::string& ext) { - if (ext == kJSONExt) { - return Format::kJSON; - } - if (ext == kTextExt) { - return Format::kText; - } - if (ext == kBinExt) { - return Format::kBin; - } - return Format::kUnknown; -} - -const std::string& Format2Ext(Format fmt) { - switch (fmt) { - case Format::kJSON: - return kJSONExt; - case Format::kText: - return kTextExt; - case Format::kBin: - return kBinExt; - default: - g_err_msg = "unsupported format: " + std::to_string(static_cast(fmt)); - return kEmpty; - } -} - -// refer: https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/stubs/logging.h -void ProtobufLogHandler(google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) { - static const std::unordered_map kLevelMap = {{google::protobuf::LOGLEVEL_INFO, log::kInfo}, - {google::protobuf::LOGLEVEL_WARNING, log::kWarn}, - {google::protobuf::LOGLEVEL_ERROR, log::kError}, - {google::protobuf::LOGLEVEL_FATAL, log::kFatal}}; - log::Level lvl = log::kWarn; // default - auto iter = kLevelMap.find(level); - if (iter != kLevelMap.end()) { - lvl = iter->second; - } - ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), lvl, "[libprotobuf %s:%d] %s", filename, line, message.c_str()); -} - -bool Message2JSON(const google::protobuf::Message& message, std::string& json) { - google::protobuf::util::JsonPrintOptions options; - options.add_whitespace = true; - options.always_print_primitive_fields = true; - options.preserve_proto_field_names = true; - return google::protobuf::util::MessageToJsonString(message, &json, options).ok(); -} - -bool JSON2Message(const std::string& json, google::protobuf::Message& message, - const LoadOptions* options /* = nullptr */) { - google::protobuf::util::Status status; - if (options != nullptr) { - google::protobuf::util::JsonParseOptions parse_options; - parse_options.ignore_unknown_fields = options->ignore_unknown_fields; - status = google::protobuf::util::JsonStringToMessage(json, &message, parse_options); - } else { - status = google::protobuf::util::JsonStringToMessage(json, &message); - } - if (!status.ok()) { - g_err_msg = "failed to parse " + GetProtoName(message) + kJSONExt + ": " + status.ToString(); - return false; - } - return true; -} - -bool Text2Message(const std::string& text, google::protobuf::Message& message) { - if (!google::protobuf::TextFormat::ParseFromString(text, &message)) { - g_err_msg = "failed to parse " + GetProtoName(message) + kTextExt; - return false; - } - return true; -} -bool Bin2Message(const std::string& bin, google::protobuf::Message& message) { - if (!message.ParseFromString(bin)) { - g_err_msg = "failed to parse " + GetProtoName(message) + kBinExt; - return false; - } - return true; -} - -const std::string& GetProtoName(const google::protobuf::Message& message) { - const auto* md = message.GetDescriptor(); - return md != nullptr ? md->name() : kEmpty; -} - -bool ReadFile(const std::string& filename, std::string& content) { - std::ifstream file(filename); - if (!file.is_open()) { - g_err_msg = "failed to open " + filename + ": " + strerror(errno); - return false; - } - std::stringstream ss; - ss << file.rdbuf(); - content = ss.str(); - return true; -} - -bool LoadMessage(const std::string& dir, google::protobuf::Message& message, Format fmt, - const LoadOptions* options /* = nullptr*/) { - message.Clear(); - std::string path; - std::string name = GetProtoName(message); - if (options) { - auto iter = options->paths.find(name); - if (iter != options->paths.end()) { - // path specified explicitly, then use it directly - path = iter->second; - fmt = Ext2Format(util::GetExt(iter->second)); - } - } - // Support 3 formats: json, text, and bin - if (path.empty()) { - switch (fmt) { - case Format::kJSON: { - path = dir + name + kJSONExt; - break; - } - case Format::kText: { - path = dir + name + kTextExt; - break; - } - case Format::kBin: { - path = dir + name + kBinExt; - break; - } - default: { - g_err_msg = "unsupported format: %d" + std::to_string(static_cast(fmt)); - return false; - } - } - } - std::string content; - bool ok = ReadFile(path, content); - if (!ok) { - return false; - } - switch (fmt) { - case Format::kJSON: { - return JSON2Message(content, message, options); - } - case Format::kText: { - return Text2Message(content, message); - } - case Format::kBin: { - return Bin2Message(content, message); - } - default: { - g_err_msg = "unsupported format: %d" + std::to_string(static_cast(fmt)); - return false; - } - } -} - -bool StoreMessage(const std::string& dir, google::protobuf::Message& message, Format fmt) { - // TODO: write protobuf message to file, support 3 formats: json, text, and bin. - return false; -} - -bool Hub::Load(const std::string& dir, Filter filter /* = nullptr */, Format fmt /* = Format::kJSON */, - const LoadOptions* options /* = nullptr */) { - auto msger_container = LoadNewMessagerContainer(dir, filter, fmt, options); - if (!msger_container) { - return false; - } - bool ok = internal::Postprocess(options->postprocessor, msger_container); - if (!ok) { - return false; - } - SetMessagerContainer(msger_container); - return true; -} - -bool Hub::AsyncLoad(const std::string& dir, Filter filter /* = nullptr */, Format fmt /* = Format::kJSON */, - const LoadOptions* options /* = nullptr */) { - auto msger_container = LoadNewMessagerContainer(dir, filter, fmt, options); - if (!msger_container) { - return false; - } - bool ok = internal::Postprocess(options->postprocessor, msger_container); - if (!ok) { - return false; - } - sched_->Dispatch(std::bind(&Hub::SetMessagerContainer, this, msger_container)); - return true; -} - -int Hub::LoopOnce() { return sched_->LoopOnce(); } -void Hub::InitScheduler() { - sched_ = new internal::Scheduler(); - sched_->Current(); -} - -MessagerContainer Hub::LoadNewMessagerContainer(const std::string& dir, Filter filter /* = nullptr */, - Format fmt /* = Format::kJSON */, - const LoadOptions* options /* = nullptr */) { - // intercept protobuf error logs - auto old_handler = google::protobuf::SetLogHandler(ProtobufLogHandler); - - auto msger_container = NewMessagerContainer(filter); - for (auto iter : *msger_container) { - auto&& name = iter.first; - ATOM_DEBUG("loading %s", name.c_str()); - bool ok = iter.second->Load(dir, fmt, options); - if (!ok) { - ATOM_ERROR("load %s failed: %s", name.c_str(), GetErrMsg().c_str()); - // restore to old protobuf log hanlder - google::protobuf::SetLogHandler(old_handler); - return nullptr; - } - ATOM_DEBUG("loaded %s", name.c_str()); - } - - // restore to old protobuf log hanlder - google::protobuf::SetLogHandler(old_handler); - return msger_container; -} - -MessagerContainer Hub::NewMessagerContainer(Filter filter) { - MessagerContainer msger_container = std::make_shared(); - for (auto&& it : Registry::registrar) { - if (filter == nullptr || filter(it.first)) { - (*msger_container)[it.first] = it.second(); - } - } - return msger_container; -} - -void Hub::SetMessagerContainer(MessagerContainer msger_container) { - // replace with thread-safe guarantee. - std::unique_lock lock(mutex_); - msger_container_ = msger_container; -} - -MessagerContainer Hub::GetMessagerContainerWithProvider() const { - if (msger_container_provider_ != nullptr) { - return msger_container_provider_(); - } - return msger_container_; -} - -const std::shared_ptr Hub::GetMessager(const std::string& name) const { - auto container = GetMessagerContainerWithProvider(); - if (container) { - auto it = container->find(name); - if (it != container->end()) { - return it->second; - } - } - return nullptr; -} - -namespace internal { -// Thread-local storage (TLS) -thread_local Scheduler* tls_sched = nullptr; -Scheduler& Scheduler::Current() { - if (tls_sched == nullptr) tls_sched = new Scheduler; - return *tls_sched; -} - -int Scheduler::LoopOnce() { - AssertInLoopThread(); - - int count = 0; - std::vector jobs; - { - // scoped for auto-release lock. - // wake up immediately when there are pending tasks. - std::unique_lock lock(mutex_); - jobs.swap(jobs_); - } - for (auto&& job : jobs) { - job(); - } - count += jobs.size(); - return count; -} - -void Scheduler::Post(const Job& job) { - std::unique_lock lock(mutex_); - jobs_.push_back(job); -} - -void Scheduler::Dispatch(const Job& job) { - if (IsLoopThread()) { - job(); // run it immediately - } else { - Post(job); // post and run it at next loop - } -} - -bool Scheduler::IsLoopThread() const { return thread_id_ == std::this_thread::get_id(); } -void Scheduler::AssertInLoopThread() const { - if (!IsLoopThread()) { - abort(); - } -} - -bool Postprocess(Postprocessor postprocessor, MessagerContainer container) { - // create a temporary hub with messager container for post process - Hub hub(container); - - // messager-level postprocess - for (auto iter : *container) { - auto msger = iter.second; - bool ok = msger->ProcessAfterLoadAll(hub); - if (!ok) { - g_err_msg = "hub call ProcessAfterLoadAll failed, messager: " + msger->Name(); - return false; - } - } - - // hub-level postprocess - if (postprocessor != nullptr) { - bool ok = postprocessor(hub); - if (!ok) { - g_err_msg = "hub call Postprocesser failed, you'd better check your custom 'postprocessor' load option"; - return false; - } - } - - return true; -} - -} // namespace internal - -namespace util { -int Mkdir(const std::string& path) { - std::string path_ = path + "/"; - struct stat info; - for (size_t pos = path_.find('/', 0); pos != std::string::npos; pos = path_.find('/', pos)) { - ++pos; - auto sub_dir = path_.substr(0, pos); - if (stat(sub_dir.c_str(), &info) == 0 && info.st_mode & S_IFDIR) { - continue; - } - int status = mkdir(sub_dir.c_str(), 0755); - if (status != 0) { - std::cerr << "system error: " << strerror(errno) << std::endl; - return -1; - } - } - return 0; -} - -std::string GetDir(const std::string& path) { - std::size_t pos = path.find_last_of("/\\"); - if (pos != std::string::npos) { - return path.substr(0, pos); - } - return kEmpty; -} - -std::string GetExt(const std::string& path) { - std::size_t pos = path.find_last_of("."); - if (pos != std::string::npos) { - return path.substr(pos); - } - return kEmpty; -} - -} // namespace util - -} // namespace tableau - diff --git a/_lab/cpp/src/demo/hub.pc.h b/_lab/cpp/src/demo/hub.pc.h deleted file mode 100644 index 058d912b..00000000 --- a/_lab/cpp/src/demo/hub.pc.h +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#pragma once -#include - -#include -#include -#include -#include -#include -#include - -namespace tableau { -enum class Format { - kUnknown, - kJSON, - kText, - kBin, -}; - -extern const std::string kJSONExt; -extern const std::string kTextExt; -extern const std::string kBinExt; - -static const std::string kEmpty = ""; -const std::string& GetErrMsg(); - -class Messager; -class Hub; - -using MessagerMap = std::unordered_map>; -using MessagerContainer = std::shared_ptr; -using Filter = std::function; -using MessagerContainerProvider = std::function; -using Postprocessor = std::function; - -struct LoadOptions { - // Whether to ignore unknown JSON fields during parsing. - // - // Refer https://protobuf.dev/reference/cpp/api-docs/google.protobuf.util.json_util/#JsonParseOptions. - bool ignore_unknown_fields = false; - // Paths maps each messager name to a corresponding config file path. - // If a messager name is existed, then the messager will be parsed from - // the config file directly. - // NOTE: only JSON, bin, and text formats are supported. - std::unordered_map paths; - // postprocessor is called after loading all configurations. - Postprocessor postprocessor; -}; - -// Convert file extension to Format type. -// NOTE: ext includes dot ".", such as: -// - kJSONExt:".json" -// - kTextExt".txt" -// - kBinExt".bin" -Format Ext2Format(const std::string& ext); -// Empty string will be returned if an unsupported enum value has been passed, -// and the error message can be obtained by GetErrMsg(). -const std::string& Format2Ext(Format fmt); -bool Message2JSON(const google::protobuf::Message& message, std::string& json); -bool JSON2Message(const std::string& json, google::protobuf::Message& message, const LoadOptions* options = nullptr); -bool Text2Message(const std::string& text, google::protobuf::Message& message); -bool Bin2Message(const std::string& bin, google::protobuf::Message& message); -void ProtobufLogHandler(google::protobuf::LogLevel level, const char* filename, int line, const std::string& message); -const std::string& GetProtoName(const google::protobuf::Message& message); -bool LoadMessage(const std::string& dir, google::protobuf::Message& message, Format fmt = Format::kJSON, - const LoadOptions* options = nullptr); - -namespace internal { -class Scheduler { - public: - typedef std::function Job; - - public: - Scheduler() : thread_id_(std::this_thread::get_id()) {} - static Scheduler& Current(); - // thread-safety - void Post(const Job& job); - void Dispatch(const Job& job); - int LoopOnce(); - bool IsLoopThread() const; - void AssertInLoopThread() const; - - private: - std::thread::id thread_id_; - std::mutex mutex_; - std::vector jobs_; -}; - -bool Postprocess(Postprocessor postprocessor, MessagerContainer container); - -} // namespace internal - -class Messager { - public: - virtual ~Messager() = default; - static const std::string& Name() { return kEmpty; }; - virtual bool Load(const std::string& dir, Format fmt, const LoadOptions* options = nullptr) = 0; - - protected: - // callback after this messager loaded. - virtual bool ProcessAfterLoad() { return true; }; - - public: - // callback after all messagers loaded. - virtual bool ProcessAfterLoadAll(const Hub& hub) { return true; }; -}; - -class Hub { - public: - Hub() = default; - Hub(MessagerContainer container) { SetMessagerContainer(container); } - /***** Synchronous Loading *****/ - // Load messagers from dir using the specified format, and store them in MessagerContainer. - bool Load(const std::string& dir, Filter filter = nullptr, Format fmt = Format::kJSON, - const LoadOptions* options = nullptr); - - /***** Asynchronous Loading *****/ - // Load configs into temp MessagerContainer, and you should call LoopOnce() in you app's main loop, - // in order to take the temp MessagerContainer into effect. - bool AsyncLoad(const std::string& dir, Filter filter = nullptr, Format fmt = Format::kJSON, - const LoadOptions* options = nullptr); - int LoopOnce(); - // You'd better initialize the scheduler in the main thread. - void InitScheduler(); - - /***** MessagerContainer *****/ - MessagerContainer GetMessagerContainer() const { return msger_container_; } - void SetMessagerContainerProvider(MessagerContainerProvider provider) { msger_container_provider_ = provider; } - - /***** Access APIs *****/ - template - const std::shared_ptr Get() const; - - template - const U* Get(Args... args) const; - - template - const U* GetOrderedMap(Args... args) const; - - private: - MessagerContainer LoadNewMessagerContainer(const std::string& dir, Filter filter = nullptr, - Format fmt = Format::kJSON, const LoadOptions* options = nullptr); - MessagerContainer NewMessagerContainer(Filter filter = nullptr); - void SetMessagerContainer(MessagerContainer msger_container); - MessagerContainer GetMessagerContainerWithProvider() const; - const std::shared_ptr GetMessager(const std::string& name) const; - - private: - // For thread-safe guarantee during configuration updating. - std::mutex mutex_; - // All messagers' container. - MessagerContainer msger_container_; - // Provide custom MessagerContainer. For keeping configuration access - // consistent in a coroutine or a transaction. - MessagerContainerProvider msger_container_provider_; - // Loading scheduler. - internal::Scheduler* sched_ = nullptr; -}; - -template -const std::shared_ptr Hub::Get() const { - auto msg = GetMessager(T::Name()); - return std::dynamic_pointer_cast(msg); -} - -template -const U* Hub::Get(Args... args) const { - auto msg = GetMessager(T::Name()); - auto msger = std::dynamic_pointer_cast(msg); - return msger ? msger->Get(args...) : nullptr; -} - -template -const U* Hub::GetOrderedMap(Args... args) const { - auto msg = GetMessager(T::Name()); - auto msger = std::dynamic_pointer_cast(msg); - return msger ? msger->GetOrderedMap(args...) : nullptr; -} - -namespace util { - -// Combine hash values -// -// References: -// - https://stackoverflow.com/questions/2590677/how-do-i-combine-hash-values-in-c0x -// - https://stackoverflow.com/questions/17016175/c-unordered-map-using-a-custom-class-type-as-the-key -inline void HashCombine(std::size_t& seed) {} - -template -inline void HashCombine(std::size_t& seed, const T& v, O... others) { - std::hash hasher; - seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - HashCombine(seed, others...); -} - -template -inline std::size_t SugaredHashCombine(const T& v, O... others) { - std::size_t seed = 0; // start with a hash value 0 - HashCombine(seed, v, others...); - return seed; -} - -// Mkdir makes dir recursively. -int Mkdir(const std::string& path); -// GetDir returns all but the last element of path, typically the path's -// directory. -std::string GetDir(const std::string& path); -// GetExt returns the file name extension used by path. -// The extension is the suffix beginning at the final dot -// in the final element of path; it is empty if there is -// no dot. -std::string GetExt(const std::string& path); - -} // namespace util - -} // namespace tableau - diff --git a/_lab/cpp/src/demo/item_conf.pb.cc b/_lab/cpp/src/demo/item_conf.pb.cc deleted file mode 100644 index 596a57d0..00000000 --- a/_lab/cpp/src/demo/item_conf.pb.cc +++ /dev/null @@ -1,1167 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: item_conf.proto - -#include "item_conf.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG -namespace protoconf { -constexpr ItemConf_ItemMapEntry_DoNotUse::ItemConf_ItemMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ItemConf_ItemMapEntry_DoNotUseDefaultTypeInternal { - constexpr ItemConf_ItemMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ItemConf_ItemMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ItemConf_ItemMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ItemConf_ItemMapEntry_DoNotUseDefaultTypeInternal _ItemConf_ItemMapEntry_DoNotUse_default_instance_; -constexpr ItemConf_Item::ItemConf_Item( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : param_list_() - , _param_list_cached_byte_size_(0) - , ext_type_list_() - , _ext_type_list_cached_byte_size_(0) - , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , path_(nullptr) - , expiry_(nullptr) - , duration_(nullptr) - , id_(0u) - , type_(0) -{} -struct ItemConf_ItemDefaultTypeInternal { - constexpr ItemConf_ItemDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ItemConf_ItemDefaultTypeInternal() {} - union { - ItemConf_Item _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ItemConf_ItemDefaultTypeInternal _ItemConf_Item_default_instance_; -constexpr ItemConf::ItemConf( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : item_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}){} -struct ItemConfDefaultTypeInternal { - constexpr ItemConfDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ItemConfDefaultTypeInternal() {} - union { - ItemConf _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ItemConfDefaultTypeInternal _ItemConf_default_instance_; -constexpr Path::Path( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : dir_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} -struct PathDefaultTypeInternal { - constexpr PathDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~PathDefaultTypeInternal() {} - union { - Path _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PathDefaultTypeInternal _Path_default_instance_; -} // namespace protoconf -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_item_5fconf_2eproto[4]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_item_5fconf_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_item_5fconf_2eproto = nullptr; - -const uint32_t TableStruct_item_5fconf_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_ItemMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_ItemMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_ItemMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_ItemMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, id_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, name_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, path_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, expiry_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, duration_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, type_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, param_list_), - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf_Item, ext_type_list_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ItemConf, item_map_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::Path, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::Path, dir_), - PROTOBUF_FIELD_OFFSET(::protoconf::Path, name_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 8, -1, sizeof(::protoconf::ItemConf_ItemMapEntry_DoNotUse)}, - { 10, -1, -1, sizeof(::protoconf::ItemConf_Item)}, - { 24, -1, -1, sizeof(::protoconf::ItemConf)}, - { 31, -1, -1, sizeof(::protoconf::Path)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::protoconf::_ItemConf_ItemMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ItemConf_Item_default_instance_), - reinterpret_cast(&::protoconf::_ItemConf_default_instance_), - reinterpret_cast(&::protoconf::_Path_default_instance_), -}; - -const char descriptor_table_protodef_item_5fconf_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\017item_conf.proto\022\tprotoconf\032\036google/pro" - "tobuf/duration.proto\032\037google/protobuf/ti" - "mestamp.proto\032\036tableau/protobuf/tableau." - "proto\032\021common_conf.proto\"\371\004\n\010ItemConf\022>\n" - "\010item_map\030\001 \003(\0132 .protoconf.ItemConf.Ite" - "mMapEntryB\n\202\265\030\006\032\002ID \001\032H\n\014ItemMapEntry\022\013\n" - "\003key\030\001 \001(\r\022\'\n\005value\030\002 \001(\0132\030.protoconf.It" - "emConf.Item:\0028\001\032\345\002\n\004Item\022\024\n\002id\030\001 \001(\rB\010\202\265" - "\030\004\n\002ID\022\030\n\004name\030\002 \001(\tB\n\202\265\030\006\n\004Name\022)\n\004path" - "\030\004 \001(\0132\017.protoconf.PathB\n\202\265\030\006\n\004Path\0228\n\006e" - "xpiry\030\005 \001(\0132\032.google.protobuf.TimestampB" - "\014\202\265\030\010\n\006Expiry\022;\n\010duration\030\006 \001(\0132\031.google" - ".protobuf.DurationB\016\202\265\030\n\n\010Duration\022.\n\004ty" - "pe\030\007 \001(\0162\024.protoconf.FruitTypeB\n\202\265\030\006\n\004Ty" - "pe\022\037\n\nparam_list\030\010 \003(\005B\013\202\265\030\007\n\005Param\022:\n\re" - "xt_type_list\030\t \003(\0162\024.protoconf.FruitType" - "B\r\202\265\030\t\n\007ExtType:{\202\265\030w\n\010ItemConf\220\003\001\232\003\004Typ" - "e\232\003\016Param@ItemInfo\232\003\023ExtType@ItemExtInfo" - "\232\003\023(ID,Name)@AwardItem\232\003#(ID,Type,Param," - "ExtType)@SpecialItem\"!\n\004Path\022\013\n\003dir\030\001 \001(" - "\t\022\014\n\004name\030\002 \001(\tBMZpath_; -} -const ::PROTOBUF_NAMESPACE_ID::Timestamp& -ItemConf_Item::_Internal::expiry(const ItemConf_Item* msg) { - return *msg->expiry_; -} -const ::PROTOBUF_NAMESPACE_ID::Duration& -ItemConf_Item::_Internal::duration(const ItemConf_Item* msg) { - return *msg->duration_; -} -void ItemConf_Item::clear_expiry() { - if (GetArenaForAllocation() == nullptr && expiry_ != nullptr) { - delete expiry_; - } - expiry_ = nullptr; -} -void ItemConf_Item::clear_duration() { - if (GetArenaForAllocation() == nullptr && duration_ != nullptr) { - delete duration_; - } - duration_ = nullptr; -} -ItemConf_Item::ItemConf_Item(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - param_list_(arena), - ext_type_list_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ItemConf.Item) -} -ItemConf_Item::ItemConf_Item(const ItemConf_Item& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - param_list_(from.param_list_), - ext_type_list_(from.ext_type_list_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), - GetArenaForAllocation()); - } - if (from._internal_has_path()) { - path_ = new ::protoconf::Path(*from.path_); - } else { - path_ = nullptr; - } - if (from._internal_has_expiry()) { - expiry_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from.expiry_); - } else { - expiry_ = nullptr; - } - if (from._internal_has_duration()) { - duration_ = new ::PROTOBUF_NAMESPACE_ID::Duration(*from.duration_); - } else { - duration_ = nullptr; - } - ::memcpy(&id_, &from.id_, - static_cast(reinterpret_cast(&type_) - - reinterpret_cast(&id_)) + sizeof(type_)); - // @@protoc_insertion_point(copy_constructor:protoconf.ItemConf.Item) -} - -inline void ItemConf_Item::SharedCtor() { -name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&path_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&type_) - - reinterpret_cast(&path_)) + sizeof(type_)); -} - -ItemConf_Item::~ItemConf_Item() { - // @@protoc_insertion_point(destructor:protoconf.ItemConf.Item) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ItemConf_Item::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete path_; - if (this != internal_default_instance()) delete expiry_; - if (this != internal_default_instance()) delete duration_; -} - -void ItemConf_Item::ArenaDtor(void* object) { - ItemConf_Item* _this = reinterpret_cast< ItemConf_Item* >(object); - (void)_this; -} -void ItemConf_Item::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void ItemConf_Item::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ItemConf_Item::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ItemConf.Item) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - param_list_.Clear(); - ext_type_list_.Clear(); - name_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && path_ != nullptr) { - delete path_; - } - path_ = nullptr; - if (GetArenaForAllocation() == nullptr && expiry_ != nullptr) { - delete expiry_; - } - expiry_ = nullptr; - if (GetArenaForAllocation() == nullptr && duration_ != nullptr) { - delete duration_; - } - duration_ = nullptr; - ::memset(&id_, 0, static_cast( - reinterpret_cast(&type_) - - reinterpret_cast(&id_)) + sizeof(type_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ItemConf_Item::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint32 id = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string name = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.ItemConf.Item.name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .protoconf.Path path = 4 [(.tableau.field) = { - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_path(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .google.protobuf.Timestamp expiry = 5 [(.tableau.field) = { - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { - ptr = ctx->ParseMessage(_internal_mutable_expiry(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .google.protobuf.Duration duration = 6 [(.tableau.field) = { - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { - ptr = ctx->ParseMessage(_internal_mutable_duration(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .protoconf.FruitType type = 7 [(.tableau.field) = { - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_type(static_cast<::protoconf::FruitType>(val)); - } else - goto handle_unusual; - continue; - // repeated int32 param_list = 8 [(.tableau.field) = { - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_param_list(), ptr, ctx); - CHK_(ptr); - } else if (static_cast(tag) == 64) { - _internal_add_param_list(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .protoconf.FruitType ext_type_list = 9 [(.tableau.field) = { - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { - ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_ext_type_list(), ptr, ctx); - CHK_(ptr); - } else if (static_cast(tag) == 72) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_add_ext_type_list(static_cast<::protoconf::FruitType>(val)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ItemConf_Item::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ItemConf.Item) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 id = 1 [(.tableau.field) = { - if (this->_internal_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), target); - } - - // string name = 2 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ItemConf.Item.name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_name(), target); - } - - // .protoconf.Path path = 4 [(.tableau.field) = { - if (this->_internal_has_path()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 4, _Internal::path(this), target, stream); - } - - // .google.protobuf.Timestamp expiry = 5 [(.tableau.field) = { - if (this->_internal_has_expiry()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 5, _Internal::expiry(this), target, stream); - } - - // .google.protobuf.Duration duration = 6 [(.tableau.field) = { - if (this->_internal_has_duration()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 6, _Internal::duration(this), target, stream); - } - - // .protoconf.FruitType type = 7 [(.tableau.field) = { - if (this->_internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 7, this->_internal_type(), target); - } - - // repeated int32 param_list = 8 [(.tableau.field) = { - { - int byte_size = _param_list_cached_byte_size_.load(std::memory_order_relaxed); - if (byte_size > 0) { - target = stream->WriteInt32Packed( - 8, _internal_param_list(), byte_size, target); - } - } - - // repeated .protoconf.FruitType ext_type_list = 9 [(.tableau.field) = { - { - int byte_size = _ext_type_list_cached_byte_size_.load(std::memory_order_relaxed); - if (byte_size > 0) { - target = stream->WriteEnumPacked( - 9, ext_type_list_, byte_size, target); - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ItemConf.Item) - return target; -} - -size_t ItemConf_Item::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ItemConf.Item) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated int32 param_list = 8 [(.tableau.field) = { - { - size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - Int32Size(this->param_list_); - if (data_size > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - static_cast(data_size)); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); - _param_list_cached_byte_size_.store(cached_size, - std::memory_order_relaxed); - total_size += data_size; - } - - // repeated .protoconf.FruitType ext_type_list = 9 [(.tableau.field) = { - { - size_t data_size = 0; - unsigned int count = static_cast(this->_internal_ext_type_list_size());for (unsigned int i = 0; i < count; i++) { - data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( - this->_internal_ext_type_list(static_cast(i))); - } - if (data_size > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - static_cast(data_size)); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); - _ext_type_list_cached_byte_size_.store(cached_size, - std::memory_order_relaxed); - total_size += data_size; - } - - // string name = 2 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - // .protoconf.Path path = 4 [(.tableau.field) = { - if (this->_internal_has_path()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *path_); - } - - // .google.protobuf.Timestamp expiry = 5 [(.tableau.field) = { - if (this->_internal_has_expiry()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *expiry_); - } - - // .google.protobuf.Duration duration = 6 [(.tableau.field) = { - if (this->_internal_has_duration()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *duration_); - } - - // uint32 id = 1 [(.tableau.field) = { - if (this->_internal_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); - } - - // .protoconf.FruitType type = 7 [(.tableau.field) = { - if (this->_internal_type() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ItemConf_Item::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ItemConf_Item::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ItemConf_Item::GetClassData() const { return &_class_data_; } - -void ItemConf_Item::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ItemConf_Item::MergeFrom(const ItemConf_Item& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ItemConf.Item) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - param_list_.MergeFrom(from.param_list_); - ext_type_list_.MergeFrom(from.ext_type_list_); - if (!from._internal_name().empty()) { - _internal_set_name(from._internal_name()); - } - if (from._internal_has_path()) { - _internal_mutable_path()->::protoconf::Path::MergeFrom(from._internal_path()); - } - if (from._internal_has_expiry()) { - _internal_mutable_expiry()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_expiry()); - } - if (from._internal_has_duration()) { - _internal_mutable_duration()->::PROTOBUF_NAMESPACE_ID::Duration::MergeFrom(from._internal_duration()); - } - if (from._internal_id() != 0) { - _internal_set_id(from._internal_id()); - } - if (from._internal_type() != 0) { - _internal_set_type(from._internal_type()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ItemConf_Item::CopyFrom(const ItemConf_Item& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ItemConf.Item) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ItemConf_Item::IsInitialized() const { - return true; -} - -void ItemConf_Item::InternalSwap(ItemConf_Item* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - param_list_.InternalSwap(&other->param_list_); - ext_type_list_.InternalSwap(&other->ext_type_list_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &name_, lhs_arena, - &other->name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(ItemConf_Item, type_) - + sizeof(ItemConf_Item::type_) - - PROTOBUF_FIELD_OFFSET(ItemConf_Item, path_)>( - reinterpret_cast(&path_), - reinterpret_cast(&other->path_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ItemConf_Item::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_item_5fconf_2eproto_getter, &descriptor_table_item_5fconf_2eproto_once, - file_level_metadata_item_5fconf_2eproto[1]); -} - -// =================================================================== - -class ItemConf::_Internal { - public: -}; - -ItemConf::ItemConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - item_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ItemConf) -} -ItemConf::ItemConf(const ItemConf& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - item_map_.MergeFrom(from.item_map_); - // @@protoc_insertion_point(copy_constructor:protoconf.ItemConf) -} - -inline void ItemConf::SharedCtor() { -} - -ItemConf::~ItemConf() { - // @@protoc_insertion_point(destructor:protoconf.ItemConf) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ItemConf::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void ItemConf::ArenaDtor(void* object) { - ItemConf* _this = reinterpret_cast< ItemConf* >(object); - (void)_this; - _this->item_map_. ~MapField(); -} -inline void ItemConf::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &ItemConf::ArenaDtor); - } -} -void ItemConf::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ItemConf::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ItemConf) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - item_map_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ItemConf::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // map item_map = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&item_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ItemConf::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ItemConf) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // map item_map = 1 [(.tableau.field) = { - if (!this->_internal_item_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint32_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_item_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_item_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >::const_iterator - it = this->_internal_item_map().begin(); - it != this->_internal_item_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ItemConf_ItemMapEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >::const_iterator - it = this->_internal_item_map().begin(); - it != this->_internal_item_map().end(); ++it) { - target = ItemConf_ItemMapEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ItemConf) - return target; -} - -size_t ItemConf::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ItemConf) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map item_map = 1 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_item_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >::const_iterator - it = this->_internal_item_map().begin(); - it != this->_internal_item_map().end(); ++it) { - total_size += ItemConf_ItemMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ItemConf::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ItemConf::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ItemConf::GetClassData() const { return &_class_data_; } - -void ItemConf::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ItemConf::MergeFrom(const ItemConf& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ItemConf) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - item_map_.MergeFrom(from.item_map_); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ItemConf::CopyFrom(const ItemConf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ItemConf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ItemConf::IsInitialized() const { - return true; -} - -void ItemConf::InternalSwap(ItemConf* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - item_map_.InternalSwap(&other->item_map_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ItemConf::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_item_5fconf_2eproto_getter, &descriptor_table_item_5fconf_2eproto_once, - file_level_metadata_item_5fconf_2eproto[2]); -} - -// =================================================================== - -class Path::_Internal { - public: -}; - -Path::Path(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.Path) -} -Path::Path(const Path& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - dir_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - dir_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_dir().empty()) { - dir_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_dir(), - GetArenaForAllocation()); - } - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), - GetArenaForAllocation()); - } - // @@protoc_insertion_point(copy_constructor:protoconf.Path) -} - -inline void Path::SharedCtor() { -dir_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - dir_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -Path::~Path() { - // @@protoc_insertion_point(destructor:protoconf.Path) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void Path::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - dir_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Path::ArenaDtor(void* object) { - Path* _this = reinterpret_cast< Path* >(object); - (void)_this; -} -void Path::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Path::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void Path::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.Path) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - dir_.ClearToEmpty(); - name_.ClearToEmpty(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Path::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // string dir = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_dir(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.Path.dir")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string name = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.Path.name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Path::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.Path) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string dir = 1; - if (!this->_internal_dir().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_dir().data(), static_cast(this->_internal_dir().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.Path.dir"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_dir(), target); - } - - // string name = 2; - if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.Path.name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_name(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.Path) - return target; -} - -size_t Path::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.Path) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string dir = 1; - if (!this->_internal_dir().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_dir()); - } - - // string name = 2; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Path::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - Path::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Path::GetClassData() const { return &_class_data_; } - -void Path::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void Path::MergeFrom(const Path& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.Path) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_dir().empty()) { - _internal_set_dir(from._internal_dir()); - } - if (!from._internal_name().empty()) { - _internal_set_name(from._internal_name()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Path::CopyFrom(const Path& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.Path) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Path::IsInitialized() const { - return true; -} - -void Path::InternalSwap(Path* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &dir_, lhs_arena, - &other->dir_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &name_, lhs_arena, - &other->name_, rhs_arena - ); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Path::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_item_5fconf_2eproto_getter, &descriptor_table_item_5fconf_2eproto_once, - file_level_metadata_item_5fconf_2eproto[3]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::protoconf::ItemConf_ItemMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ItemConf_ItemMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ItemConf_ItemMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ItemConf_Item* Arena::CreateMaybeMessage< ::protoconf::ItemConf_Item >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ItemConf_Item >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ItemConf* Arena::CreateMaybeMessage< ::protoconf::ItemConf >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ItemConf >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::Path* Arena::CreateMaybeMessage< ::protoconf::Path >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::Path >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/_lab/cpp/src/demo/item_conf.pb.h b/_lab/cpp/src/demo/item_conf.pb.h deleted file mode 100644 index a8719401..00000000 --- a/_lab/cpp/src/demo/item_conf.pb.h +++ /dev/null @@ -1,1325 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: item_conf.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_item_5fconf_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_item_5fconf_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3019000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3019003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include -#include -#include -#include "tableau/protobuf/tableau.pb.h" -#include "common_conf.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_item_5fconf_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_item_5fconf_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_item_5fconf_2eproto; -namespace protoconf { -class ItemConf; -struct ItemConfDefaultTypeInternal; -extern ItemConfDefaultTypeInternal _ItemConf_default_instance_; -class ItemConf_Item; -struct ItemConf_ItemDefaultTypeInternal; -extern ItemConf_ItemDefaultTypeInternal _ItemConf_Item_default_instance_; -class ItemConf_ItemMapEntry_DoNotUse; -struct ItemConf_ItemMapEntry_DoNotUseDefaultTypeInternal; -extern ItemConf_ItemMapEntry_DoNotUseDefaultTypeInternal _ItemConf_ItemMapEntry_DoNotUse_default_instance_; -class Path; -struct PathDefaultTypeInternal; -extern PathDefaultTypeInternal _Path_default_instance_; -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> ::protoconf::ItemConf* Arena::CreateMaybeMessage<::protoconf::ItemConf>(Arena*); -template<> ::protoconf::ItemConf_Item* Arena::CreateMaybeMessage<::protoconf::ItemConf_Item>(Arena*); -template<> ::protoconf::ItemConf_ItemMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ItemConf_ItemMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::Path* Arena::CreateMaybeMessage<::protoconf::Path>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace protoconf { - -// =================================================================== - -class ItemConf_ItemMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ItemConf_ItemMapEntry_DoNotUse(); - explicit constexpr ItemConf_ItemMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ItemConf_ItemMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ItemConf_ItemMapEntry_DoNotUse& other); - static const ItemConf_ItemMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ItemConf_ItemMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ItemConf_Item final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ItemConf.Item) */ { - public: - inline ItemConf_Item() : ItemConf_Item(nullptr) {} - ~ItemConf_Item() override; - explicit constexpr ItemConf_Item(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ItemConf_Item(const ItemConf_Item& from); - ItemConf_Item(ItemConf_Item&& from) noexcept - : ItemConf_Item() { - *this = ::std::move(from); - } - - inline ItemConf_Item& operator=(const ItemConf_Item& from) { - CopyFrom(from); - return *this; - } - inline ItemConf_Item& operator=(ItemConf_Item&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ItemConf_Item& default_instance() { - return *internal_default_instance(); - } - static inline const ItemConf_Item* internal_default_instance() { - return reinterpret_cast( - &_ItemConf_Item_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(ItemConf_Item& a, ItemConf_Item& b) { - a.Swap(&b); - } - inline void Swap(ItemConf_Item* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ItemConf_Item* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ItemConf_Item* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ItemConf_Item& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ItemConf_Item& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ItemConf_Item* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ItemConf.Item"; - } - protected: - explicit ItemConf_Item(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kParamListFieldNumber = 8, - kExtTypeListFieldNumber = 9, - kNameFieldNumber = 2, - kPathFieldNumber = 4, - kExpiryFieldNumber = 5, - kDurationFieldNumber = 6, - kIdFieldNumber = 1, - kTypeFieldNumber = 7, - }; - // repeated int32 param_list = 8 [(.tableau.field) = { - int param_list_size() const; - private: - int _internal_param_list_size() const; - public: - void clear_param_list(); - private: - int32_t _internal_param_list(int index) const; - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& - _internal_param_list() const; - void _internal_add_param_list(int32_t value); - ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* - _internal_mutable_param_list(); - public: - int32_t param_list(int index) const; - void set_param_list(int index, int32_t value); - void add_param_list(int32_t value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& - param_list() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* - mutable_param_list(); - - // repeated .protoconf.FruitType ext_type_list = 9 [(.tableau.field) = { - int ext_type_list_size() const; - private: - int _internal_ext_type_list_size() const; - public: - void clear_ext_type_list(); - private: - ::protoconf::FruitType _internal_ext_type_list(int index) const; - void _internal_add_ext_type_list(::protoconf::FruitType value); - ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_ext_type_list(); - public: - ::protoconf::FruitType ext_type_list(int index) const; - void set_ext_type_list(int index, ::protoconf::FruitType value); - void add_ext_type_list(::protoconf::FruitType value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField& ext_type_list() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_ext_type_list(); - - // string name = 2 [(.tableau.field) = { - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // .protoconf.Path path = 4 [(.tableau.field) = { - bool has_path() const; - private: - bool _internal_has_path() const; - public: - void clear_path(); - const ::protoconf::Path& path() const; - PROTOBUF_NODISCARD ::protoconf::Path* release_path(); - ::protoconf::Path* mutable_path(); - void set_allocated_path(::protoconf::Path* path); - private: - const ::protoconf::Path& _internal_path() const; - ::protoconf::Path* _internal_mutable_path(); - public: - void unsafe_arena_set_allocated_path( - ::protoconf::Path* path); - ::protoconf::Path* unsafe_arena_release_path(); - - // .google.protobuf.Timestamp expiry = 5 [(.tableau.field) = { - bool has_expiry() const; - private: - bool _internal_has_expiry() const; - public: - void clear_expiry(); - const ::PROTOBUF_NAMESPACE_ID::Timestamp& expiry() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Timestamp* release_expiry(); - ::PROTOBUF_NAMESPACE_ID::Timestamp* mutable_expiry(); - void set_allocated_expiry(::PROTOBUF_NAMESPACE_ID::Timestamp* expiry); - private: - const ::PROTOBUF_NAMESPACE_ID::Timestamp& _internal_expiry() const; - ::PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_expiry(); - public: - void unsafe_arena_set_allocated_expiry( - ::PROTOBUF_NAMESPACE_ID::Timestamp* expiry); - ::PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_expiry(); - - // .google.protobuf.Duration duration = 6 [(.tableau.field) = { - bool has_duration() const; - private: - bool _internal_has_duration() const; - public: - void clear_duration(); - const ::PROTOBUF_NAMESPACE_ID::Duration& duration() const; - PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Duration* release_duration(); - ::PROTOBUF_NAMESPACE_ID::Duration* mutable_duration(); - void set_allocated_duration(::PROTOBUF_NAMESPACE_ID::Duration* duration); - private: - const ::PROTOBUF_NAMESPACE_ID::Duration& _internal_duration() const; - ::PROTOBUF_NAMESPACE_ID::Duration* _internal_mutable_duration(); - public: - void unsafe_arena_set_allocated_duration( - ::PROTOBUF_NAMESPACE_ID::Duration* duration); - ::PROTOBUF_NAMESPACE_ID::Duration* unsafe_arena_release_duration(); - - // uint32 id = 1 [(.tableau.field) = { - void clear_id(); - uint32_t id() const; - void set_id(uint32_t value); - private: - uint32_t _internal_id() const; - void _internal_set_id(uint32_t value); - public: - - // .protoconf.FruitType type = 7 [(.tableau.field) = { - void clear_type(); - ::protoconf::FruitType type() const; - void set_type(::protoconf::FruitType value); - private: - ::protoconf::FruitType _internal_type() const; - void _internal_set_type(::protoconf::FruitType value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.ItemConf.Item) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > param_list_; - mutable std::atomic _param_list_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::RepeatedField ext_type_list_; - mutable std::atomic _ext_type_list_cached_byte_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::protoconf::Path* path_; - ::PROTOBUF_NAMESPACE_ID::Timestamp* expiry_; - ::PROTOBUF_NAMESPACE_ID::Duration* duration_; - uint32_t id_; - int type_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_item_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ItemConf final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ItemConf) */ { - public: - inline ItemConf() : ItemConf(nullptr) {} - ~ItemConf() override; - explicit constexpr ItemConf(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ItemConf(const ItemConf& from); - ItemConf(ItemConf&& from) noexcept - : ItemConf() { - *this = ::std::move(from); - } - - inline ItemConf& operator=(const ItemConf& from) { - CopyFrom(from); - return *this; - } - inline ItemConf& operator=(ItemConf&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ItemConf& default_instance() { - return *internal_default_instance(); - } - static inline const ItemConf* internal_default_instance() { - return reinterpret_cast( - &_ItemConf_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(ItemConf& a, ItemConf& b) { - a.Swap(&b); - } - inline void Swap(ItemConf* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ItemConf* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ItemConf* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ItemConf& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ItemConf& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ItemConf* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ItemConf"; - } - protected: - explicit ItemConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef ItemConf_Item Item; - - // accessors ------------------------------------------------------- - - enum : int { - kItemMapFieldNumber = 1, - }; - // map item_map = 1 [(.tableau.field) = { - int item_map_size() const; - private: - int _internal_item_map_size() const; - public: - void clear_item_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >& - _internal_item_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >* - _internal_mutable_item_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >& - item_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >* - mutable_item_map(); - - // @@protoc_insertion_point(class_scope:protoconf.ItemConf) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ItemConf_ItemMapEntry_DoNotUse, - uint32_t, ::protoconf::ItemConf_Item, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> item_map_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_item_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class Path final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.Path) */ { - public: - inline Path() : Path(nullptr) {} - ~Path() override; - explicit constexpr Path(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Path(const Path& from); - Path(Path&& from) noexcept - : Path() { - *this = ::std::move(from); - } - - inline Path& operator=(const Path& from) { - CopyFrom(from); - return *this; - } - inline Path& operator=(Path&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Path& default_instance() { - return *internal_default_instance(); - } - static inline const Path* internal_default_instance() { - return reinterpret_cast( - &_Path_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(Path& a, Path& b) { - a.Swap(&b); - } - inline void Swap(Path* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Path* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Path* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Path& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const Path& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Path* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.Path"; - } - protected: - explicit Path(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kDirFieldNumber = 1, - kNameFieldNumber = 2, - }; - // string dir = 1; - void clear_dir(); - const std::string& dir() const; - template - void set_dir(ArgT0&& arg0, ArgT... args); - std::string* mutable_dir(); - PROTOBUF_NODISCARD std::string* release_dir(); - void set_allocated_dir(std::string* dir); - private: - const std::string& _internal_dir() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_dir(const std::string& value); - std::string* _internal_mutable_dir(); - public: - - // string name = 2; - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // @@protoc_insertion_point(class_scope:protoconf.Path) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dir_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_item_5fconf_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ItemConf_Item - -// uint32 id = 1 [(.tableau.field) = { -inline void ItemConf_Item::clear_id() { - id_ = 0u; -} -inline uint32_t ItemConf_Item::_internal_id() const { - return id_; -} -inline uint32_t ItemConf_Item::id() const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.id) - return _internal_id(); -} -inline void ItemConf_Item::_internal_set_id(uint32_t value) { - - id_ = value; -} -inline void ItemConf_Item::set_id(uint32_t value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:protoconf.ItemConf.Item.id) -} - -// string name = 2 [(.tableau.field) = { -inline void ItemConf_Item::clear_name() { - name_.ClearToEmpty(); -} -inline const std::string& ItemConf_Item::name() const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ItemConf_Item::set_name(ArgT0&& arg0, ArgT... args) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.ItemConf.Item.name) -} -inline std::string* ItemConf_Item::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:protoconf.ItemConf.Item.name) - return _s; -} -inline const std::string& ItemConf_Item::_internal_name() const { - return name_.Get(); -} -inline void ItemConf_Item::_internal_set_name(const std::string& value) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* ItemConf_Item::_internal_mutable_name() { - - return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* ItemConf_Item::release_name() { - // @@protoc_insertion_point(field_release:protoconf.ItemConf.Item.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void ItemConf_Item::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.ItemConf.Item.name) -} - -// .protoconf.Path path = 4 [(.tableau.field) = { -inline bool ItemConf_Item::_internal_has_path() const { - return this != internal_default_instance() && path_ != nullptr; -} -inline bool ItemConf_Item::has_path() const { - return _internal_has_path(); -} -inline void ItemConf_Item::clear_path() { - if (GetArenaForAllocation() == nullptr && path_ != nullptr) { - delete path_; - } - path_ = nullptr; -} -inline const ::protoconf::Path& ItemConf_Item::_internal_path() const { - const ::protoconf::Path* p = path_; - return p != nullptr ? *p : reinterpret_cast( - ::protoconf::_Path_default_instance_); -} -inline const ::protoconf::Path& ItemConf_Item::path() const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.path) - return _internal_path(); -} -inline void ItemConf_Item::unsafe_arena_set_allocated_path( - ::protoconf::Path* path) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(path_); - } - path_ = path; - if (path) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protoconf.ItemConf.Item.path) -} -inline ::protoconf::Path* ItemConf_Item::release_path() { - - ::protoconf::Path* temp = path_; - path_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::protoconf::Path* ItemConf_Item::unsafe_arena_release_path() { - // @@protoc_insertion_point(field_release:protoconf.ItemConf.Item.path) - - ::protoconf::Path* temp = path_; - path_ = nullptr; - return temp; -} -inline ::protoconf::Path* ItemConf_Item::_internal_mutable_path() { - - if (path_ == nullptr) { - auto* p = CreateMaybeMessage<::protoconf::Path>(GetArenaForAllocation()); - path_ = p; - } - return path_; -} -inline ::protoconf::Path* ItemConf_Item::mutable_path() { - ::protoconf::Path* _msg = _internal_mutable_path(); - // @@protoc_insertion_point(field_mutable:protoconf.ItemConf.Item.path) - return _msg; -} -inline void ItemConf_Item::set_allocated_path(::protoconf::Path* path) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete path_; - } - if (path) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::protoconf::Path>::GetOwningArena(path); - if (message_arena != submessage_arena) { - path = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, path, submessage_arena); - } - - } else { - - } - path_ = path; - // @@protoc_insertion_point(field_set_allocated:protoconf.ItemConf.Item.path) -} - -// .google.protobuf.Timestamp expiry = 5 [(.tableau.field) = { -inline bool ItemConf_Item::_internal_has_expiry() const { - return this != internal_default_instance() && expiry_ != nullptr; -} -inline bool ItemConf_Item::has_expiry() const { - return _internal_has_expiry(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& ItemConf_Item::_internal_expiry() const { - const ::PROTOBUF_NAMESPACE_ID::Timestamp* p = expiry_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Timestamp& ItemConf_Item::expiry() const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.expiry) - return _internal_expiry(); -} -inline void ItemConf_Item::unsafe_arena_set_allocated_expiry( - ::PROTOBUF_NAMESPACE_ID::Timestamp* expiry) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(expiry_); - } - expiry_ = expiry; - if (expiry) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protoconf.ItemConf.Item.expiry) -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ItemConf_Item::release_expiry() { - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = expiry_; - expiry_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ItemConf_Item::unsafe_arena_release_expiry() { - // @@protoc_insertion_point(field_release:protoconf.ItemConf.Item.expiry) - - ::PROTOBUF_NAMESPACE_ID::Timestamp* temp = expiry_; - expiry_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ItemConf_Item::_internal_mutable_expiry() { - - if (expiry_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(GetArenaForAllocation()); - expiry_ = p; - } - return expiry_; -} -inline ::PROTOBUF_NAMESPACE_ID::Timestamp* ItemConf_Item::mutable_expiry() { - ::PROTOBUF_NAMESPACE_ID::Timestamp* _msg = _internal_mutable_expiry(); - // @@protoc_insertion_point(field_mutable:protoconf.ItemConf.Item.expiry) - return _msg; -} -inline void ItemConf_Item::set_allocated_expiry(::PROTOBUF_NAMESPACE_ID::Timestamp* expiry) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(expiry_); - } - if (expiry) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< - ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(expiry)); - if (message_arena != submessage_arena) { - expiry = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, expiry, submessage_arena); - } - - } else { - - } - expiry_ = expiry; - // @@protoc_insertion_point(field_set_allocated:protoconf.ItemConf.Item.expiry) -} - -// .google.protobuf.Duration duration = 6 [(.tableau.field) = { -inline bool ItemConf_Item::_internal_has_duration() const { - return this != internal_default_instance() && duration_ != nullptr; -} -inline bool ItemConf_Item::has_duration() const { - return _internal_has_duration(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Duration& ItemConf_Item::_internal_duration() const { - const ::PROTOBUF_NAMESPACE_ID::Duration* p = duration_; - return p != nullptr ? *p : reinterpret_cast( - ::PROTOBUF_NAMESPACE_ID::_Duration_default_instance_); -} -inline const ::PROTOBUF_NAMESPACE_ID::Duration& ItemConf_Item::duration() const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.duration) - return _internal_duration(); -} -inline void ItemConf_Item::unsafe_arena_set_allocated_duration( - ::PROTOBUF_NAMESPACE_ID::Duration* duration) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(duration_); - } - duration_ = duration; - if (duration) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:protoconf.ItemConf.Item.duration) -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* ItemConf_Item::release_duration() { - - ::PROTOBUF_NAMESPACE_ID::Duration* temp = duration_; - duration_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* ItemConf_Item::unsafe_arena_release_duration() { - // @@protoc_insertion_point(field_release:protoconf.ItemConf.Item.duration) - - ::PROTOBUF_NAMESPACE_ID::Duration* temp = duration_; - duration_ = nullptr; - return temp; -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* ItemConf_Item::_internal_mutable_duration() { - - if (duration_ == nullptr) { - auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Duration>(GetArenaForAllocation()); - duration_ = p; - } - return duration_; -} -inline ::PROTOBUF_NAMESPACE_ID::Duration* ItemConf_Item::mutable_duration() { - ::PROTOBUF_NAMESPACE_ID::Duration* _msg = _internal_mutable_duration(); - // @@protoc_insertion_point(field_mutable:protoconf.ItemConf.Item.duration) - return _msg; -} -inline void ItemConf_Item::set_allocated_duration(::PROTOBUF_NAMESPACE_ID::Duration* duration) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(duration_); - } - if (duration) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< - ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(duration)); - if (message_arena != submessage_arena) { - duration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, duration, submessage_arena); - } - - } else { - - } - duration_ = duration; - // @@protoc_insertion_point(field_set_allocated:protoconf.ItemConf.Item.duration) -} - -// .protoconf.FruitType type = 7 [(.tableau.field) = { -inline void ItemConf_Item::clear_type() { - type_ = 0; -} -inline ::protoconf::FruitType ItemConf_Item::_internal_type() const { - return static_cast< ::protoconf::FruitType >(type_); -} -inline ::protoconf::FruitType ItemConf_Item::type() const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.type) - return _internal_type(); -} -inline void ItemConf_Item::_internal_set_type(::protoconf::FruitType value) { - - type_ = value; -} -inline void ItemConf_Item::set_type(::protoconf::FruitType value) { - _internal_set_type(value); - // @@protoc_insertion_point(field_set:protoconf.ItemConf.Item.type) -} - -// repeated int32 param_list = 8 [(.tableau.field) = { -inline int ItemConf_Item::_internal_param_list_size() const { - return param_list_.size(); -} -inline int ItemConf_Item::param_list_size() const { - return _internal_param_list_size(); -} -inline void ItemConf_Item::clear_param_list() { - param_list_.Clear(); -} -inline int32_t ItemConf_Item::_internal_param_list(int index) const { - return param_list_.Get(index); -} -inline int32_t ItemConf_Item::param_list(int index) const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.param_list) - return _internal_param_list(index); -} -inline void ItemConf_Item::set_param_list(int index, int32_t value) { - param_list_.Set(index, value); - // @@protoc_insertion_point(field_set:protoconf.ItemConf.Item.param_list) -} -inline void ItemConf_Item::_internal_add_param_list(int32_t value) { - param_list_.Add(value); -} -inline void ItemConf_Item::add_param_list(int32_t value) { - _internal_add_param_list(value); - // @@protoc_insertion_point(field_add:protoconf.ItemConf.Item.param_list) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& -ItemConf_Item::_internal_param_list() const { - return param_list_; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& -ItemConf_Item::param_list() const { - // @@protoc_insertion_point(field_list:protoconf.ItemConf.Item.param_list) - return _internal_param_list(); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* -ItemConf_Item::_internal_mutable_param_list() { - return ¶m_list_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* -ItemConf_Item::mutable_param_list() { - // @@protoc_insertion_point(field_mutable_list:protoconf.ItemConf.Item.param_list) - return _internal_mutable_param_list(); -} - -// repeated .protoconf.FruitType ext_type_list = 9 [(.tableau.field) = { -inline int ItemConf_Item::_internal_ext_type_list_size() const { - return ext_type_list_.size(); -} -inline int ItemConf_Item::ext_type_list_size() const { - return _internal_ext_type_list_size(); -} -inline void ItemConf_Item::clear_ext_type_list() { - ext_type_list_.Clear(); -} -inline ::protoconf::FruitType ItemConf_Item::_internal_ext_type_list(int index) const { - return static_cast< ::protoconf::FruitType >(ext_type_list_.Get(index)); -} -inline ::protoconf::FruitType ItemConf_Item::ext_type_list(int index) const { - // @@protoc_insertion_point(field_get:protoconf.ItemConf.Item.ext_type_list) - return _internal_ext_type_list(index); -} -inline void ItemConf_Item::set_ext_type_list(int index, ::protoconf::FruitType value) { - ext_type_list_.Set(index, value); - // @@protoc_insertion_point(field_set:protoconf.ItemConf.Item.ext_type_list) -} -inline void ItemConf_Item::_internal_add_ext_type_list(::protoconf::FruitType value) { - ext_type_list_.Add(value); -} -inline void ItemConf_Item::add_ext_type_list(::protoconf::FruitType value) { - _internal_add_ext_type_list(value); - // @@protoc_insertion_point(field_add:protoconf.ItemConf.Item.ext_type_list) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& -ItemConf_Item::ext_type_list() const { - // @@protoc_insertion_point(field_list:protoconf.ItemConf.Item.ext_type_list) - return ext_type_list_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* -ItemConf_Item::_internal_mutable_ext_type_list() { - return &ext_type_list_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* -ItemConf_Item::mutable_ext_type_list() { - // @@protoc_insertion_point(field_mutable_list:protoconf.ItemConf.Item.ext_type_list) - return _internal_mutable_ext_type_list(); -} - -// ------------------------------------------------------------------- - -// ItemConf - -// map item_map = 1 [(.tableau.field) = { -inline int ItemConf::_internal_item_map_size() const { - return item_map_.size(); -} -inline int ItemConf::item_map_size() const { - return _internal_item_map_size(); -} -inline void ItemConf::clear_item_map() { - item_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >& -ItemConf::_internal_item_map() const { - return item_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >& -ItemConf::item_map() const { - // @@protoc_insertion_point(field_map:protoconf.ItemConf.item_map) - return _internal_item_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >* -ItemConf::_internal_mutable_item_map() { - return item_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ItemConf_Item >* -ItemConf::mutable_item_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ItemConf.item_map) - return _internal_mutable_item_map(); -} - -// ------------------------------------------------------------------- - -// Path - -// string dir = 1; -inline void Path::clear_dir() { - dir_.ClearToEmpty(); -} -inline const std::string& Path::dir() const { - // @@protoc_insertion_point(field_get:protoconf.Path.dir) - return _internal_dir(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Path::set_dir(ArgT0&& arg0, ArgT... args) { - - dir_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.Path.dir) -} -inline std::string* Path::mutable_dir() { - std::string* _s = _internal_mutable_dir(); - // @@protoc_insertion_point(field_mutable:protoconf.Path.dir) - return _s; -} -inline const std::string& Path::_internal_dir() const { - return dir_.Get(); -} -inline void Path::_internal_set_dir(const std::string& value) { - - dir_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Path::_internal_mutable_dir() { - - return dir_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Path::release_dir() { - // @@protoc_insertion_point(field_release:protoconf.Path.dir) - return dir_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void Path::set_allocated_dir(std::string* dir) { - if (dir != nullptr) { - - } else { - - } - dir_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), dir, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (dir_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - dir_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.Path.dir) -} - -// string name = 2; -inline void Path::clear_name() { - name_.ClearToEmpty(); -} -inline const std::string& Path::name() const { - // @@protoc_insertion_point(field_get:protoconf.Path.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Path::set_name(ArgT0&& arg0, ArgT... args) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.Path.name) -} -inline std::string* Path::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:protoconf.Path.name) - return _s; -} -inline const std::string& Path::_internal_name() const { - return name_.Get(); -} -inline void Path::_internal_set_name(const std::string& value) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Path::_internal_mutable_name() { - - return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Path::release_name() { - // @@protoc_insertion_point(field_release:protoconf.Path.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void Path::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.Path.name) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protoconf - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_item_5fconf_2eproto diff --git a/_lab/cpp/src/demo/item_conf.pc.cc b/_lab/cpp/src/demo/item_conf.pc.cc deleted file mode 100644 index 0a9919a7..00000000 --- a/_lab/cpp/src/demo/item_conf.pc.cc +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 -// source: item_conf.proto - -#include "item_conf.pc.h" - -namespace tableau { -const std::string ItemConf::kProtoName = "ItemConf"; - -bool ItemConf::Load(const std::string& dir, Format fmt, const LoadOptions* options /* = nullptr */) { - bool ok = LoadMessage(dir, data_, fmt, options); - return ok ? ProcessAfterLoad() : false; -} - -bool ItemConf::ProcessAfterLoad() { - // OrderedMap init. - for (auto&& item1 : data_.item_map()) { - ordered_map_[item1.first] = &item1.second; - } - - // Index init. - // Index: Type - for (auto&& item1 : data_.item_map()) { - index_item_map_[static_cast(item1.second.type())].push_back(&item1.second); - } - - // Index: Param@ItemInfo - for (auto&& item1 : data_.item_map()) { - for (auto&& item2 : item1.second.param_list()) { - index_item_info_map_[item2].push_back(&item1.second); - } - } - - // Index: ExtType@ItemExtInfo - for (auto&& item1 : data_.item_map()) { - for (auto&& item2 : item1.second.ext_type_list()) { - index_item_ext_info_map_[static_cast(item2)].push_back(&item1.second); - } - } - - // Index: (ID,Name)@AwardItem - for (auto&& item1 : data_.item_map()) { - Index_AwardItemKey key{item1.second.id(), item1.second.name()}; - index_award_item_map_[key].push_back(&item1.second); - } - - // Index: (ID,Type,Param,ExtType)@SpecialItem - for (auto&& item1 : data_.item_map()) { - for (auto&& index_item2 : item1.second.param_list()) { - for (auto&& index_item3 : item1.second.ext_type_list()) { - Index_SpecialItemKey key{item1.second.id(), static_cast(item1.second.type()), index_item2, static_cast(index_item3)}; - index_special_item_map_[key].push_back(&item1.second); - } - } - } - - return true; -} - -const protoconf::ItemConf::Item* ItemConf::Get(uint32_t id) const { - auto iter = data_.item_map().find(id); - if (iter == data_.item_map().end()) { - return nullptr; - } - return &iter->second; -} - -const ItemConf::Item_OrderedMap* ItemConf::GetOrderedMap() const { - return &ordered_map_; -} - -// Index: Type -const ItemConf::Index_ItemMap& ItemConf::FindItem() const { return index_item_map_ ;} - -const ItemConf::Index_ItemVector* ItemConf::FindItem(protoconf::FruitType type) const { - auto iter = index_item_map_.find(static_cast(type)); - if (iter == index_item_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ItemConf::Item* ItemConf::FindFirstItem(protoconf::FruitType type) const { - auto conf = FindItem(type); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - -// Index: Param@ItemInfo -const ItemConf::Index_ItemInfoMap& ItemConf::FindItemInfo() const { return index_item_info_map_ ;} - -const ItemConf::Index_ItemInfoVector* ItemConf::FindItemInfo(int32_t param) const { - auto iter = index_item_info_map_.find(param); - if (iter == index_item_info_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ItemConf::Item* ItemConf::FindFirstItemInfo(int32_t param) const { - auto conf = FindItemInfo(param); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - -// Index: ExtType@ItemExtInfo -const ItemConf::Index_ItemExtInfoMap& ItemConf::FindItemExtInfo() const { return index_item_ext_info_map_ ;} - -const ItemConf::Index_ItemExtInfoVector* ItemConf::FindItemExtInfo(protoconf::FruitType ext_type) const { - auto iter = index_item_ext_info_map_.find(static_cast(ext_type)); - if (iter == index_item_ext_info_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ItemConf::Item* ItemConf::FindFirstItemExtInfo(protoconf::FruitType ext_type) const { - auto conf = FindItemExtInfo(ext_type); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - -// Index: (ID,Name)@AwardItem -const ItemConf::Index_AwardItemMap& ItemConf::FindAwardItem() const { return index_award_item_map_ ;} - -const ItemConf::Index_AwardItemVector* ItemConf::FindAwardItem(const Index_AwardItemKey& key) const { - auto iter = index_award_item_map_.find(key); - if (iter == index_award_item_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ItemConf::Item* ItemConf::FindFirstAwardItem(const Index_AwardItemKey& key) const { - auto conf = FindAwardItem(key); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - -// Index: (ID,Type,Param,ExtType)@SpecialItem -const ItemConf::Index_SpecialItemMap& ItemConf::FindSpecialItem() const { return index_special_item_map_ ;} - -const ItemConf::Index_SpecialItemVector* ItemConf::FindSpecialItem(const Index_SpecialItemKey& key) const { - auto iter = index_special_item_map_.find(key); - if (iter == index_special_item_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ItemConf::Item* ItemConf::FindFirstSpecialItem(const Index_SpecialItemKey& key) const { - auto conf = FindSpecialItem(key); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - - -} // namespace tableau diff --git a/_lab/cpp/src/demo/item_conf.pc.h b/_lab/cpp/src/demo/item_conf.pc.h deleted file mode 100644 index c209be15..00000000 --- a/_lab/cpp/src/demo/item_conf.pc.h +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 -// source: item_conf.proto - -#pragma once -#include - -#include "hub.pc.h" -#include "item_conf.pb.h" - -namespace tableau { -class ItemConf : public Messager { - public: - static const std::string& Name() { return kProtoName; }; - virtual bool Load(const std::string& dir, Format fmt, const LoadOptions* options = nullptr) override; - const protoconf::ItemConf& Data() const { return data_; }; - - private: - virtual bool ProcessAfterLoad() override final; - - public: - const protoconf::ItemConf::Item* Get(uint32_t id) const; - - private: - static const std::string kProtoName; - protoconf::ItemConf data_; - - // OrderedMap accessers. - public: - using Item_OrderedMap = std::map; - const Item_OrderedMap* GetOrderedMap() const; - - private: - Item_OrderedMap ordered_map_; - - // Index accessers. - // Index: Type - public: - using Index_ItemVector = std::vector; - using Index_ItemMap = std::unordered_map; - const Index_ItemMap& FindItem() const; - const Index_ItemVector* FindItem(protoconf::FruitType type) const; - const protoconf::ItemConf::Item* FindFirstItem(protoconf::FruitType type) const; - - private: - Index_ItemMap index_item_map_; - - // Index: Param@ItemInfo - public: - using Index_ItemInfoVector = std::vector; - using Index_ItemInfoMap = std::unordered_map; - const Index_ItemInfoMap& FindItemInfo() const; - const Index_ItemInfoVector* FindItemInfo(int32_t param) const; - const protoconf::ItemConf::Item* FindFirstItemInfo(int32_t param) const; - - private: - Index_ItemInfoMap index_item_info_map_; - - // Index: ExtType@ItemExtInfo - public: - using Index_ItemExtInfoVector = std::vector; - using Index_ItemExtInfoMap = std::unordered_map; - const Index_ItemExtInfoMap& FindItemExtInfo() const; - const Index_ItemExtInfoVector* FindItemExtInfo(protoconf::FruitType ext_type) const; - const protoconf::ItemConf::Item* FindFirstItemExtInfo(protoconf::FruitType ext_type) const; - - private: - Index_ItemExtInfoMap index_item_ext_info_map_; - - // Index: (ID,Name)@AwardItem - public: - struct Index_AwardItemKey { - uint32_t id; - std::string name; - bool operator==(const Index_AwardItemKey& other) const { - return id == other.id && name == other.name; - } - }; - struct Index_AwardItemKeyHasher { - std::size_t operator()(const Index_AwardItemKey& key) const { - return util::SugaredHashCombine(key.id, key.name); - } - }; - using Index_AwardItemVector = std::vector; - using Index_AwardItemMap = std::unordered_map; - const Index_AwardItemMap& FindAwardItem() const; - const Index_AwardItemVector* FindAwardItem(const Index_AwardItemKey& key) const; - const protoconf::ItemConf::Item* FindFirstAwardItem(const Index_AwardItemKey& key) const; - - private: - Index_AwardItemMap index_award_item_map_; - - // Index: (ID,Type,Param,ExtType)@SpecialItem - public: - struct Index_SpecialItemKey { - uint32_t id; - protoconf::FruitType type; - int32_t param; - protoconf::FruitType ext_type; - bool operator==(const Index_SpecialItemKey& other) const { - return id == other.id && type == other.type && param == other.param && ext_type == other.ext_type; - } - }; - struct Index_SpecialItemKeyHasher { - std::size_t operator()(const Index_SpecialItemKey& key) const { - return util::SugaredHashCombine(key.id, static_cast(key.type), key.param, static_cast(key.ext_type)); - } - }; - using Index_SpecialItemVector = std::vector; - using Index_SpecialItemMap = std::unordered_map; - const Index_SpecialItemMap& FindSpecialItem() const; - const Index_SpecialItemVector* FindSpecialItem(const Index_SpecialItemKey& key) const; - const protoconf::ItemConf::Item* FindFirstSpecialItem(const Index_SpecialItemKey& key) const; - - private: - Index_SpecialItemMap index_special_item_map_; - -}; - -} // namespace tableau - -namespace protoconf { -// Here are some type aliases for easy use. -using ItemConfMgr = tableau::ItemConf; -} // namespace protoconf diff --git a/_lab/cpp/src/demo/logger.pc.cc b/_lab/cpp/src/demo/logger.pc.cc deleted file mode 100644 index 8fa18ef7..00000000 --- a/_lab/cpp/src/demo/logger.pc.cc +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#include "logger.pc.h" - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "hub.pc.h" - -#define gettid() syscall(SYS_gettid) - -namespace tableau { -namespace log { - -// clang-format off -static const std::unordered_map kLevelMap = { - {kTrace, "TRACE"}, - {kDebug, "DEBUG"}, - {kInfo, "INFO"}, - {kWarn, "WARN"}, - {kError, "ERROR"}, - {kFatal, "FATAL"} -}; -// clang-format on - -static Logger* g_default_logger; - -Logger* DefaultLogger() { - if (g_default_logger == nullptr) { - g_default_logger = new Logger(); - } - return g_default_logger; -} - -void SetDefaultLogger(Logger* logger) { - if (g_default_logger != nullptr) { - delete g_default_logger; - } - g_default_logger = logger; -} - -int Logger::Init(const std::string& path, Level level) { - std::string dir = path.substr(0, path.find_last_of('/')); - // prepare the specified directory - int status = util::Mkdir(dir); - if (status == -1) { - return status; - } - ofs_.open(path, std::ofstream::out | std::ofstream::app); - os_ = &ofs_; // use file stream as output stream - level_ = level; - return 0; -} - -void Logger::Log(const SourceLocation& loc, Level level, const char* format, ...) { - if (level < level_) { - return; - } - // scoped auto-release lock. - std::unique_lock lock(mutex_); - static thread_local char content[1024] = {0}; - va_list ap; - va_start(ap, format); - vsnprintf(content, sizeof(content), format, ap); - va_end(ap); - - LevelInfo level_info{level, kLevelMap.at(static_cast(level))}; - writer_(os_, loc, level_info, content); -} - -void DefaultWrite(std::ostream* os, const SourceLocation& loc, const LevelInfo& lvl, const std::string& content) { - // clang-format off - *os << NowStr() << "|" - // << std::this_thread::get_id() << "|" - << gettid() << "|" - << lvl.name << "|" - << loc.filename << ":" << loc.line << "|" - << loc.funcname << "|" - << content - << std::endl << std::flush; - // clang-format on -} - -const char* NowStr() { - static char fmt[64], buf[64]; - struct timeval tv; - struct tm* tm; - - gettimeofday(&tv, NULL); - if ((tm = localtime(&tv.tv_sec)) != NULL) { - // strftime(fmt, sizeof fmt, "%Y-%m-%d %H:%M:%S.%%06u %z", tm); - strftime(fmt, sizeof fmt, "%Y-%m-%d %H:%M:%S.%%06u", tm); - snprintf(buf, sizeof buf, fmt, tv.tv_usec); - } - return buf; -} - -} // namespace log -} // namespace tableau - diff --git a/_lab/cpp/src/demo/logger.pc.h b/_lab/cpp/src/demo/logger.pc.h deleted file mode 100644 index 6ee0e4fc..00000000 --- a/_lab/cpp/src/demo/logger.pc.h +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#pragma once -#include -#include - -#include -#include -#include -#include - -namespace tableau { -namespace log { -enum Level : int { - kTrace = 0, - kDebug = 1, - kInfo = 2, - kWarn = 3, - kError = 4, - kFatal = 5, -}; - -struct LevelInfo { - Level level; - const std::string& name; -}; - -struct SourceLocation { - SourceLocation() = default; - SourceLocation(const char* filename_in, int line_in, const char* funcname_in) - : filename{filename_in}, line{line_in}, funcname{funcname_in} {} - - bool empty() const { return line == 0; } - const char* filename{nullptr}; - int line{0}; - const char* funcname{nullptr}; -}; - -using Writer = std::function; -// Default write: write the log to output stream. -void DefaultWrite(std::ostream* os, const SourceLocation& loc, const LevelInfo& level, const std::string& content); - -// A simple multi-threaded logger. -class Logger { - public: - Logger() { - // default: write to stdout - os_ = &std::cout; - writer_ = DefaultWrite; - } - ~Logger() { - ofs_.close(); - } - // Init the logger with the specified path. - // NOTE: no guarantee of thread-safety. - int Init(const std::string& path, Level level); - // Set the writer for writing log. - void SetWriter(Writer writer) { writer_ = writer; } - // Log with guarantee of thread-safety. - void Log(const SourceLocation& loc, Level level, const char* format, ...); - - private: - Level level_ = kTrace; - std::ofstream ofs_; - std::ostream* os_ = nullptr; - std::mutex mutex_; - Writer writer_; -}; - -const char* NowStr(); -Logger* DefaultLogger(); -void SetDefaultLogger(Logger* logger); - -} // namespace log -} // namespace tableau - -#define ATOM_LOGGER_CALL(logger, level, ...) \ - (logger)->Log(tableau::log::SourceLocation{__FILE__, __LINE__, static_cast(__FUNCTION__)}, level, \ - __VA_ARGS__) - -#define ATOM_TRACE(...) ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), tableau::log::kTrace, __VA_ARGS__) -#define ATOM_DEBUG(...) ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), tableau::log::kDebug, __VA_ARGS__) -#define ATOM_INFO(...) ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), tableau::log::kInfo, __VA_ARGS__) -#define ATOM_WARN(...) ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), tableau::log::kWarn, __VA_ARGS__) -#define ATOM_ERROR(...) ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), tableau::log::kError, __VA_ARGS__) -#define ATOM_FATAL(...) ATOM_LOGGER_CALL(tableau::log::DefaultLogger(), tableau::log::kFatal, __VA_ARGS__) - diff --git a/_lab/cpp/src/demo/registry.pc.cc b/_lab/cpp/src/demo/registry.pc.cc deleted file mode 100644 index 6e6e6ced..00000000 --- a/_lab/cpp/src/demo/registry.pc.cc +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#include "registry.pc.h" - -namespace tableau { -Registrar Registry::registrar = Registrar(); -void Registry::Init() { - InitShard0(); - InitShard1(); -} -} // namespace tableau diff --git a/_lab/cpp/src/demo/registry.pc.h b/_lab/cpp/src/demo/registry.pc.h deleted file mode 100644 index 630fe3e9..00000000 --- a/_lab/cpp/src/demo/registry.pc.h +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#pragma once -#include "hub.pc.h" -namespace tableau { -using MessagerGenerator = std::function()>; -// messager name -> messager generator -using Registrar = std::unordered_map; -class Registry { - public: - static void Init(); - static void InitShard0(); - static void InitShard1(); - - template - static void Register(); - - static Registrar registrar; -}; - -template -void Registry::Register() { - registrar[T::Name()] = []() { return std::make_shared(); }; -} - -} // namespace tableau diff --git a/_lab/cpp/src/demo/registry_shard0.pc.cc b/_lab/cpp/src/demo/registry_shard0.pc.cc deleted file mode 100644 index 19be9b28..00000000 --- a/_lab/cpp/src/demo/registry_shard0.pc.cc +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#include "registry.pc.h" - -#include "hero_conf.pc.h" -#include "item_conf.pc.h" - -namespace tableau { -void Registry::InitShard0() { - Register(); - Register(); -} -} // namespace tableau diff --git a/_lab/cpp/src/demo/registry_shard1.pc.cc b/_lab/cpp/src/demo/registry_shard1.pc.cc deleted file mode 100644 index 3d4c536b..00000000 --- a/_lab/cpp/src/demo/registry_shard1.pc.cc +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 - -#include "registry.pc.h" - -#include "test_conf.pc.h" - -namespace tableau { -void Registry::InitShard1() { - Register(); - Register(); - Register(); -} -} // namespace tableau diff --git a/_lab/cpp/src/demo/test_conf.pb.cc b/_lab/cpp/src/demo/test_conf.pb.cc deleted file mode 100644 index 3e17d2ff..00000000 --- a/_lab/cpp/src/demo/test_conf.pb.cc +++ /dev/null @@ -1,2803 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: test_conf.proto - -#include "test_conf.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include - -PROTOBUF_PRAGMA_INIT_SEG -namespace protoconf { -constexpr ActivityConf_ActivityMapEntry_DoNotUse::ActivityConf_ActivityMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ActivityConf_ActivityMapEntry_DoNotUseDefaultTypeInternal { - constexpr ActivityConf_ActivityMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConf_ActivityMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ActivityConf_ActivityMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConf_ActivityMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_ActivityMapEntry_DoNotUse_default_instance_; -constexpr ActivityConf_Activity_ChapterMapEntry_DoNotUse::ActivityConf_Activity_ChapterMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ActivityConf_Activity_ChapterMapEntry_DoNotUseDefaultTypeInternal { - constexpr ActivityConf_Activity_ChapterMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConf_Activity_ChapterMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ActivityConf_Activity_ChapterMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConf_Activity_ChapterMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_Activity_ChapterMapEntry_DoNotUse_default_instance_; -constexpr ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUseDefaultTypeInternal { - constexpr ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse_default_instance_; -constexpr ActivityConf_Activity_Chapter::ActivityConf_Activity_Chapter( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : section_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) - , chapter_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , chapter_id_(0u) - , award_id_(0u){} -struct ActivityConf_Activity_ChapterDefaultTypeInternal { - constexpr ActivityConf_Activity_ChapterDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConf_Activity_ChapterDefaultTypeInternal() {} - union { - ActivityConf_Activity_Chapter _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConf_Activity_ChapterDefaultTypeInternal _ActivityConf_Activity_Chapter_default_instance_; -constexpr ActivityConf_Activity::ActivityConf_Activity( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : chapter_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) - , activity_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , activity_id_(uint64_t{0u}){} -struct ActivityConf_ActivityDefaultTypeInternal { - constexpr ActivityConf_ActivityDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConf_ActivityDefaultTypeInternal() {} - union { - ActivityConf_Activity _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConf_ActivityDefaultTypeInternal _ActivityConf_Activity_default_instance_; -constexpr ActivityConf_BonusMapEntry_DoNotUse::ActivityConf_BonusMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ActivityConf_BonusMapEntry_DoNotUseDefaultTypeInternal { - constexpr ActivityConf_BonusMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConf_BonusMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ActivityConf_BonusMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConf_BonusMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_BonusMapEntry_DoNotUse_default_instance_; -constexpr ActivityConf::ActivityConf( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : activity_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) - , bonus_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) - , theme_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , cost_item_id_(0){} -struct ActivityConfDefaultTypeInternal { - constexpr ActivityConfDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ActivityConfDefaultTypeInternal() {} - union { - ActivityConf _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ActivityConfDefaultTypeInternal _ActivityConf_default_instance_; -constexpr Section_SectionRankMapEntry_DoNotUse::Section_SectionRankMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct Section_SectionRankMapEntry_DoNotUseDefaultTypeInternal { - constexpr Section_SectionRankMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~Section_SectionRankMapEntry_DoNotUseDefaultTypeInternal() {} - union { - Section_SectionRankMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Section_SectionRankMapEntry_DoNotUseDefaultTypeInternal _Section_SectionRankMapEntry_DoNotUse_default_instance_; -constexpr Section::Section( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : section_item_list_() - , section_rank_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) - , section_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , section_id_(0u){} -struct SectionDefaultTypeInternal { - constexpr SectionDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~SectionDefaultTypeInternal() {} - union { - Section _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SectionDefaultTypeInternal _Section_default_instance_; -constexpr ChapterConf_ChapterMapEntry_DoNotUse::ChapterConf_ChapterMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ChapterConf_ChapterMapEntry_DoNotUseDefaultTypeInternal { - constexpr ChapterConf_ChapterMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ChapterConf_ChapterMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ChapterConf_ChapterMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ChapterConf_ChapterMapEntry_DoNotUseDefaultTypeInternal _ChapterConf_ChapterMapEntry_DoNotUse_default_instance_; -constexpr ChapterConf_Chapter::ChapterConf_Chapter( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , id_(uint64_t{0u}){} -struct ChapterConf_ChapterDefaultTypeInternal { - constexpr ChapterConf_ChapterDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ChapterConf_ChapterDefaultTypeInternal() {} - union { - ChapterConf_Chapter _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ChapterConf_ChapterDefaultTypeInternal _ChapterConf_Chapter_default_instance_; -constexpr ChapterConf::ChapterConf( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : chapter_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}){} -struct ChapterConfDefaultTypeInternal { - constexpr ChapterConfDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ChapterConfDefaultTypeInternal() {} - union { - ChapterConf _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ChapterConfDefaultTypeInternal _ChapterConf_default_instance_; -constexpr ThemeConf_ThemeMapEntry_DoNotUse::ThemeConf_ThemeMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} -struct ThemeConf_ThemeMapEntry_DoNotUseDefaultTypeInternal { - constexpr ThemeConf_ThemeMapEntry_DoNotUseDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ThemeConf_ThemeMapEntry_DoNotUseDefaultTypeInternal() {} - union { - ThemeConf_ThemeMapEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ThemeConf_ThemeMapEntry_DoNotUseDefaultTypeInternal _ThemeConf_ThemeMapEntry_DoNotUse_default_instance_; -constexpr ThemeConf_Theme::ThemeConf_Theme( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , value_(uint64_t{0u}){} -struct ThemeConf_ThemeDefaultTypeInternal { - constexpr ThemeConf_ThemeDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ThemeConf_ThemeDefaultTypeInternal() {} - union { - ThemeConf_Theme _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ThemeConf_ThemeDefaultTypeInternal _ThemeConf_Theme_default_instance_; -constexpr ThemeConf::ThemeConf( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : theme_map_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}){} -struct ThemeConfDefaultTypeInternal { - constexpr ThemeConfDefaultTypeInternal() - : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} - ~ThemeConfDefaultTypeInternal() {} - union { - ThemeConf _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ThemeConfDefaultTypeInternal _ThemeConf_default_instance_; -} // namespace protoconf -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_test_5fconf_2eproto[15]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_test_5fconf_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_test_5fconf_2eproto = nullptr; - -const uint32_t TableStruct_test_5fconf_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_ActivityMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_ActivityMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_ActivityMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_ActivityMapEntry_DoNotUse, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter, chapter_id_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter, chapter_name_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter, award_id_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity_Chapter, section_map_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity, activity_id_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity, activity_name_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_Activity, chapter_map_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_BonusMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_BonusMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_BonusMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf_BonusMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf, activity_map_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf, bonus_map_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf, theme_name_), - PROTOBUF_FIELD_OFFSET(::protoconf::ActivityConf, cost_item_id_), - PROTOBUF_FIELD_OFFSET(::protoconf::Section_SectionRankMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::Section_SectionRankMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::Section_SectionRankMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::Section_SectionRankMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::Section, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::Section, section_id_), - PROTOBUF_FIELD_OFFSET(::protoconf::Section, section_name_), - PROTOBUF_FIELD_OFFSET(::protoconf::Section, section_item_list_), - PROTOBUF_FIELD_OFFSET(::protoconf::Section, section_rank_map_), - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_ChapterMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_ChapterMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_ChapterMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_ChapterMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_Chapter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_Chapter, id_), - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf_Chapter, name_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ChapterConf, chapter_map_), - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_ThemeMapEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_ThemeMapEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_ThemeMapEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_ThemeMapEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_Theme, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_Theme, name_), - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf_Theme, value_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::protoconf::ThemeConf, theme_map_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 8, -1, sizeof(::protoconf::ActivityConf_ActivityMapEntry_DoNotUse)}, - { 10, 18, -1, sizeof(::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse)}, - { 20, 28, -1, sizeof(::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse)}, - { 30, -1, -1, sizeof(::protoconf::ActivityConf_Activity_Chapter)}, - { 40, -1, -1, sizeof(::protoconf::ActivityConf_Activity)}, - { 49, 57, -1, sizeof(::protoconf::ActivityConf_BonusMapEntry_DoNotUse)}, - { 59, -1, -1, sizeof(::protoconf::ActivityConf)}, - { 69, 77, -1, sizeof(::protoconf::Section_SectionRankMapEntry_DoNotUse)}, - { 79, -1, -1, sizeof(::protoconf::Section)}, - { 89, 97, -1, sizeof(::protoconf::ChapterConf_ChapterMapEntry_DoNotUse)}, - { 99, -1, -1, sizeof(::protoconf::ChapterConf_Chapter)}, - { 107, -1, -1, sizeof(::protoconf::ChapterConf)}, - { 114, 122, -1, sizeof(::protoconf::ThemeConf_ThemeMapEntry_DoNotUse)}, - { 124, -1, -1, sizeof(::protoconf::ThemeConf_Theme)}, - { 132, -1, -1, sizeof(::protoconf::ThemeConf)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::protoconf::_ActivityConf_ActivityMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ActivityConf_Activity_ChapterMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ActivityConf_Activity_Chapter_default_instance_), - reinterpret_cast(&::protoconf::_ActivityConf_Activity_default_instance_), - reinterpret_cast(&::protoconf::_ActivityConf_BonusMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ActivityConf_default_instance_), - reinterpret_cast(&::protoconf::_Section_SectionRankMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_Section_default_instance_), - reinterpret_cast(&::protoconf::_ChapterConf_ChapterMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ChapterConf_Chapter_default_instance_), - reinterpret_cast(&::protoconf::_ChapterConf_default_instance_), - reinterpret_cast(&::protoconf::_ThemeConf_ThemeMapEntry_DoNotUse_default_instance_), - reinterpret_cast(&::protoconf::_ThemeConf_Theme_default_instance_), - reinterpret_cast(&::protoconf::_ThemeConf_default_instance_), -}; - -const char descriptor_table_protodef_test_5fconf_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\017test_conf.proto\022\tprotoconf\032\036tableau/pr" - "otobuf/tableau.proto\032\021common_conf.proto\"" - "\337\010\n\014ActivityConf\022R\n\014activity_map\030\001 \003(\0132(" - ".protoconf.ActivityConf.ActivityMapEntry" - "B\022\202\265\030\016\032\nActivityID \001\022K\n\tbonus_map\030\002 \003(\0132" - "%.protoconf.ActivityConf.BonusMapEntryB\021" - "\202\265\030\r\n\005Bonus\032\002Id \002\0224\n\ntheme_name\030\003 \001(\tB \202" - "\265\030\034\n\010ThemNamez\020\032\016ThemeConf.Name\0225\n\014cost_" - "item_id\030\004 \001(\005B\037\202\265\030\033\n\nCostItemIDz\r\032\013ItemC" - "onf.ID\032T\n\020ActivityMapEntry\022\013\n\003key\030\001 \001(\004\022" - "/\n\005value\030\002 \001(\0132 .protoconf.ActivityConf." - "Activity:\0028\001\032\330\004\n\010Activity\022%\n\013activity_id" - "\030\001 \001(\004B\020\202\265\030\014\n\nActivityID\022)\n\ractivity_nam" - "e\030\002 \001(\tB\022\202\265\030\016\n\014ActivityName\022X\n\013chapter_m" - "ap\030\003 \003(\01320.protoconf.ActivityConf.Activi" - "ty.ChapterMapEntryB\021\202\265\030\r\032\tChapterID \001\032[\n" - "\017ChapterMapEntry\022\013\n\003key\030\001 \001(\r\0227\n\005value\030\002" - " \001(\0132(.protoconf.ActivityConf.Activity.C" - "hapter:\0028\001\032\302\002\n\007Chapter\0225\n\nchapter_id\030\001 \001" - "(\rB!\202\265\030\035\n\tChapterIDz\020\032\016ChapterConf.ID\022\'\n" - "\014chapter_name\030\002 \001(\tB\021\202\265\030\r\n\013ChapterName\022." - "\n\010award_id\030\003 \001(\rB\034\202\265\030\030\n\007AwardIDz\r\032\013ItemC" - "onf.ID\022`\n\013section_map\030\004 \003(\01328.protoconf." - "ActivityConf.Activity.Chapter.SectionMap" - "EntryB\021\202\265\030\r\032\tSectionID \001\032E\n\017SectionMapEn" - "try\022\013\n\003key\030\001 \001(\r\022!\n\005value\030\002 \001(\0132\022.protoc" - "onf.Section:\0028\001\032@\n\rBonusMapEntry\022\013\n\003key\030" - "\001 \001(\r\022\036\n\005value\030\002 \001(\0132\017.protoconf.Item:\0028" - "\001:N\202\265\030J\n\010Activity\220\003\001\232\003\tChapterID\232\003\030Chapt" - "erName@NamedChapter\232\003\023SectionItemId@Awar" - "d\"\231\002\n\007Section\022#\n\nsection_id\030\001 \001(\rB\017\202\265\030\013\n" - "\tSectionID\022\'\n\014section_name\030\002 \001(\tB\021\202\265\030\r\n\013" - "SectionName\022\?\n\021section_item_list\030\003 \003(\0132\017" - ".protoconf.ItemB\023\202\265\030\017\n\013SectionItem \002\022H\n\020" - "section_rank_map\030\004 \003(\0132&.protoconf.Secti" - "on.SectionRankMapEntryB\006\202\265\030\002 \001\0325\n\023Sectio" - "nRankMapEntry\022\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(" - "\005:\0028\001\"\367\001\n\013ChapterConf\022G\n\013chapter_map\030\001 \003" - "(\0132&.protoconf.ChapterConf.ChapterMapEnt" - "ryB\n\202\265\030\006\032\002ID \001\032Q\n\017ChapterMapEntry\022\013\n\003key" - "\030\001 \001(\004\022-\n\005value\030\002 \001(\0132\036.protoconf.Chapte" - "rConf.Chapter:\0028\001\0329\n\007Chapter\022\024\n\002id\030\001 \001(\004" - "B\010\202\265\030\004\n\002ID\022\030\n\004name\030\002 \001(\tB\n\202\265\030\006\n\004Name:\021\202\265" - "\030\r\n\013ChapterConf\"\355\001\n\tThemeConf\022C\n\ttheme_m" - "ap\030\001 \003(\0132\".protoconf.ThemeConf.ThemeMapE" - "ntryB\014\202\265\030\010\032\004Name \001\032K\n\rThemeMapEntry\022\013\n\003k" - "ey\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.protoconf.Them" - "eConf.Theme:\0028\001\032=\n\005Theme\022\030\n\004name\030\002 \001(\tB\n" - "\202\265\030\006\n\004Name\022\032\n\005value\030\001 \001(\004B\013\202\265\030\007\n\005Value:\017" - "\202\265\030\013\n\tThemeConfBMZ(from._internal_metadata_); - section_map_.MergeFrom(from.section_map_); - chapter_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - chapter_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_chapter_name().empty()) { - chapter_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_chapter_name(), - GetArenaForAllocation()); - } - ::memcpy(&chapter_id_, &from.chapter_id_, - static_cast(reinterpret_cast(&award_id_) - - reinterpret_cast(&chapter_id_)) + sizeof(award_id_)); - // @@protoc_insertion_point(copy_constructor:protoconf.ActivityConf.Activity.Chapter) -} - -inline void ActivityConf_Activity_Chapter::SharedCtor() { -chapter_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - chapter_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -::memset(reinterpret_cast(this) + static_cast( - reinterpret_cast(&chapter_id_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&award_id_) - - reinterpret_cast(&chapter_id_)) + sizeof(award_id_)); -} - -ActivityConf_Activity_Chapter::~ActivityConf_Activity_Chapter() { - // @@protoc_insertion_point(destructor:protoconf.ActivityConf.Activity.Chapter) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ActivityConf_Activity_Chapter::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - chapter_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void ActivityConf_Activity_Chapter::ArenaDtor(void* object) { - ActivityConf_Activity_Chapter* _this = reinterpret_cast< ActivityConf_Activity_Chapter* >(object); - (void)_this; - _this->section_map_. ~MapField(); -} -inline void ActivityConf_Activity_Chapter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &ActivityConf_Activity_Chapter::ArenaDtor); - } -} -void ActivityConf_Activity_Chapter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ActivityConf_Activity_Chapter::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ActivityConf.Activity.Chapter) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - section_map_.Clear(); - chapter_name_.ClearToEmpty(); - ::memset(&chapter_id_, 0, static_cast( - reinterpret_cast(&award_id_) - - reinterpret_cast(&chapter_id_)) + sizeof(award_id_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ActivityConf_Activity_Chapter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint32 chapter_id = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - chapter_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string chapter_name = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_chapter_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.ActivityConf.Activity.Chapter.chapter_name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 award_id = 3 [(.tableau.field) = { - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - award_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // map section_map = 4 [(.tableau.field) = { - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(§ion_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ActivityConf_Activity_Chapter::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ActivityConf.Activity.Chapter) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 chapter_id = 1 [(.tableau.field) = { - if (this->_internal_chapter_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_chapter_id(), target); - } - - // string chapter_name = 2 [(.tableau.field) = { - if (!this->_internal_chapter_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_chapter_name().data(), static_cast(this->_internal_chapter_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ActivityConf.Activity.Chapter.chapter_name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_chapter_name(), target); - } - - // uint32 award_id = 3 [(.tableau.field) = { - if (this->_internal_award_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_award_id(), target); - } - - // map section_map = 4 [(.tableau.field) = { - if (!this->_internal_section_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint32_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_section_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_section_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >::const_iterator - it = this->_internal_section_map().begin(); - it != this->_internal_section_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse::Funcs::InternalSerialize(4, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >::const_iterator - it = this->_internal_section_map().begin(); - it != this->_internal_section_map().end(); ++it) { - target = ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse::Funcs::InternalSerialize(4, it->first, it->second, target, stream); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ActivityConf.Activity.Chapter) - return target; -} - -size_t ActivityConf_Activity_Chapter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ActivityConf.Activity.Chapter) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map section_map = 4 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_section_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >::const_iterator - it = this->_internal_section_map().begin(); - it != this->_internal_section_map().end(); ++it) { - total_size += ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string chapter_name = 2 [(.tableau.field) = { - if (!this->_internal_chapter_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_chapter_name()); - } - - // uint32 chapter_id = 1 [(.tableau.field) = { - if (this->_internal_chapter_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_chapter_id()); - } - - // uint32 award_id = 3 [(.tableau.field) = { - if (this->_internal_award_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_award_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ActivityConf_Activity_Chapter::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ActivityConf_Activity_Chapter::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ActivityConf_Activity_Chapter::GetClassData() const { return &_class_data_; } - -void ActivityConf_Activity_Chapter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ActivityConf_Activity_Chapter::MergeFrom(const ActivityConf_Activity_Chapter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ActivityConf.Activity.Chapter) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - section_map_.MergeFrom(from.section_map_); - if (!from._internal_chapter_name().empty()) { - _internal_set_chapter_name(from._internal_chapter_name()); - } - if (from._internal_chapter_id() != 0) { - _internal_set_chapter_id(from._internal_chapter_id()); - } - if (from._internal_award_id() != 0) { - _internal_set_award_id(from._internal_award_id()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ActivityConf_Activity_Chapter::CopyFrom(const ActivityConf_Activity_Chapter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ActivityConf.Activity.Chapter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ActivityConf_Activity_Chapter::IsInitialized() const { - return true; -} - -void ActivityConf_Activity_Chapter::InternalSwap(ActivityConf_Activity_Chapter* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - section_map_.InternalSwap(&other->section_map_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &chapter_name_, lhs_arena, - &other->chapter_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(ActivityConf_Activity_Chapter, award_id_) - + sizeof(ActivityConf_Activity_Chapter::award_id_) - - PROTOBUF_FIELD_OFFSET(ActivityConf_Activity_Chapter, chapter_id_)>( - reinterpret_cast(&chapter_id_), - reinterpret_cast(&other->chapter_id_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ActivityConf_Activity_Chapter::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[3]); -} - -// =================================================================== - -class ActivityConf_Activity::_Internal { - public: -}; - -ActivityConf_Activity::ActivityConf_Activity(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - chapter_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ActivityConf.Activity) -} -ActivityConf_Activity::ActivityConf_Activity(const ActivityConf_Activity& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - chapter_map_.MergeFrom(from.chapter_map_); - activity_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - activity_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_activity_name().empty()) { - activity_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_activity_name(), - GetArenaForAllocation()); - } - activity_id_ = from.activity_id_; - // @@protoc_insertion_point(copy_constructor:protoconf.ActivityConf.Activity) -} - -inline void ActivityConf_Activity::SharedCtor() { -activity_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - activity_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -activity_id_ = uint64_t{0u}; -} - -ActivityConf_Activity::~ActivityConf_Activity() { - // @@protoc_insertion_point(destructor:protoconf.ActivityConf.Activity) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ActivityConf_Activity::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - activity_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void ActivityConf_Activity::ArenaDtor(void* object) { - ActivityConf_Activity* _this = reinterpret_cast< ActivityConf_Activity* >(object); - (void)_this; - _this->chapter_map_. ~MapField(); -} -inline void ActivityConf_Activity::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &ActivityConf_Activity::ArenaDtor); - } -} -void ActivityConf_Activity::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ActivityConf_Activity::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ActivityConf.Activity) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - chapter_map_.Clear(); - activity_name_.ClearToEmpty(); - activity_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ActivityConf_Activity::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 activity_id = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - activity_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string activity_name = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_activity_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.ActivityConf.Activity.activity_name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // map chapter_map = 3 [(.tableau.field) = { - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&chapter_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ActivityConf_Activity::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ActivityConf.Activity) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 activity_id = 1 [(.tableau.field) = { - if (this->_internal_activity_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_activity_id(), target); - } - - // string activity_name = 2 [(.tableau.field) = { - if (!this->_internal_activity_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_activity_name().data(), static_cast(this->_internal_activity_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ActivityConf.Activity.activity_name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_activity_name(), target); - } - - // map chapter_map = 3 [(.tableau.field) = { - if (!this->_internal_chapter_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint32_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_chapter_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_chapter_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >::const_iterator - it = this->_internal_chapter_map().begin(); - it != this->_internal_chapter_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ActivityConf_Activity_ChapterMapEntry_DoNotUse::Funcs::InternalSerialize(3, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >::const_iterator - it = this->_internal_chapter_map().begin(); - it != this->_internal_chapter_map().end(); ++it) { - target = ActivityConf_Activity_ChapterMapEntry_DoNotUse::Funcs::InternalSerialize(3, it->first, it->second, target, stream); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ActivityConf.Activity) - return target; -} - -size_t ActivityConf_Activity::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ActivityConf.Activity) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map chapter_map = 3 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_chapter_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >::const_iterator - it = this->_internal_chapter_map().begin(); - it != this->_internal_chapter_map().end(); ++it) { - total_size += ActivityConf_Activity_ChapterMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string activity_name = 2 [(.tableau.field) = { - if (!this->_internal_activity_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_activity_name()); - } - - // uint64 activity_id = 1 [(.tableau.field) = { - if (this->_internal_activity_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_activity_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ActivityConf_Activity::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ActivityConf_Activity::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ActivityConf_Activity::GetClassData() const { return &_class_data_; } - -void ActivityConf_Activity::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ActivityConf_Activity::MergeFrom(const ActivityConf_Activity& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ActivityConf.Activity) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - chapter_map_.MergeFrom(from.chapter_map_); - if (!from._internal_activity_name().empty()) { - _internal_set_activity_name(from._internal_activity_name()); - } - if (from._internal_activity_id() != 0) { - _internal_set_activity_id(from._internal_activity_id()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ActivityConf_Activity::CopyFrom(const ActivityConf_Activity& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ActivityConf.Activity) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ActivityConf_Activity::IsInitialized() const { - return true; -} - -void ActivityConf_Activity::InternalSwap(ActivityConf_Activity* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - chapter_map_.InternalSwap(&other->chapter_map_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &activity_name_, lhs_arena, - &other->activity_name_, rhs_arena - ); - swap(activity_id_, other->activity_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ActivityConf_Activity::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[4]); -} - -// =================================================================== - -ActivityConf_BonusMapEntry_DoNotUse::ActivityConf_BonusMapEntry_DoNotUse() {} -ActivityConf_BonusMapEntry_DoNotUse::ActivityConf_BonusMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void ActivityConf_BonusMapEntry_DoNotUse::MergeFrom(const ActivityConf_BonusMapEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata ActivityConf_BonusMapEntry_DoNotUse::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[5]); -} - -// =================================================================== - -class ActivityConf::_Internal { - public: -}; - -void ActivityConf::clear_bonus_map() { - bonus_map_.Clear(); -} -ActivityConf::ActivityConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - activity_map_(arena), - bonus_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ActivityConf) -} -ActivityConf::ActivityConf(const ActivityConf& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - activity_map_.MergeFrom(from.activity_map_); - bonus_map_.MergeFrom(from.bonus_map_); - theme_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - theme_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_theme_name().empty()) { - theme_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_theme_name(), - GetArenaForAllocation()); - } - cost_item_id_ = from.cost_item_id_; - // @@protoc_insertion_point(copy_constructor:protoconf.ActivityConf) -} - -inline void ActivityConf::SharedCtor() { -theme_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - theme_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -cost_item_id_ = 0; -} - -ActivityConf::~ActivityConf() { - // @@protoc_insertion_point(destructor:protoconf.ActivityConf) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ActivityConf::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - theme_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void ActivityConf::ArenaDtor(void* object) { - ActivityConf* _this = reinterpret_cast< ActivityConf* >(object); - (void)_this; - _this->activity_map_. ~MapField(); - _this->bonus_map_. ~MapField(); -} -inline void ActivityConf::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &ActivityConf::ArenaDtor); - } -} -void ActivityConf::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ActivityConf::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ActivityConf) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - activity_map_.Clear(); - bonus_map_.Clear(); - theme_name_.ClearToEmpty(); - cost_item_id_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ActivityConf::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // map activity_map = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&activity_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - // map bonus_map = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&bonus_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // string theme_name = 3 [(.tableau.field) = { - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_theme_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.ActivityConf.theme_name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // int32 cost_item_id = 4 [(.tableau.field) = { - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - cost_item_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ActivityConf::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ActivityConf) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // map activity_map = 1 [(.tableau.field) = { - if (!this->_internal_activity_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint64_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_activity_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_activity_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >::const_iterator - it = this->_internal_activity_map().begin(); - it != this->_internal_activity_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ActivityConf_ActivityMapEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >::const_iterator - it = this->_internal_activity_map().begin(); - it != this->_internal_activity_map().end(); ++it) { - target = ActivityConf_ActivityMapEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); - } - } - } - - // map bonus_map = 2 [(.tableau.field) = { - if (!this->_internal_bonus_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint32_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_bonus_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_bonus_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >::const_iterator - it = this->_internal_bonus_map().begin(); - it != this->_internal_bonus_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ActivityConf_BonusMapEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >::const_iterator - it = this->_internal_bonus_map().begin(); - it != this->_internal_bonus_map().end(); ++it) { - target = ActivityConf_BonusMapEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream); - } - } - } - - // string theme_name = 3 [(.tableau.field) = { - if (!this->_internal_theme_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_theme_name().data(), static_cast(this->_internal_theme_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ActivityConf.theme_name"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_theme_name(), target); - } - - // int32 cost_item_id = 4 [(.tableau.field) = { - if (this->_internal_cost_item_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_cost_item_id(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ActivityConf) - return target; -} - -size_t ActivityConf::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ActivityConf) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map activity_map = 1 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_activity_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >::const_iterator - it = this->_internal_activity_map().begin(); - it != this->_internal_activity_map().end(); ++it) { - total_size += ActivityConf_ActivityMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // map bonus_map = 2 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_bonus_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >::const_iterator - it = this->_internal_bonus_map().begin(); - it != this->_internal_bonus_map().end(); ++it) { - total_size += ActivityConf_BonusMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string theme_name = 3 [(.tableau.field) = { - if (!this->_internal_theme_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_theme_name()); - } - - // int32 cost_item_id = 4 [(.tableau.field) = { - if (this->_internal_cost_item_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_cost_item_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ActivityConf::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ActivityConf::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ActivityConf::GetClassData() const { return &_class_data_; } - -void ActivityConf::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ActivityConf::MergeFrom(const ActivityConf& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ActivityConf) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - activity_map_.MergeFrom(from.activity_map_); - bonus_map_.MergeFrom(from.bonus_map_); - if (!from._internal_theme_name().empty()) { - _internal_set_theme_name(from._internal_theme_name()); - } - if (from._internal_cost_item_id() != 0) { - _internal_set_cost_item_id(from._internal_cost_item_id()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ActivityConf::CopyFrom(const ActivityConf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ActivityConf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ActivityConf::IsInitialized() const { - return true; -} - -void ActivityConf::InternalSwap(ActivityConf* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - activity_map_.InternalSwap(&other->activity_map_); - bonus_map_.InternalSwap(&other->bonus_map_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &theme_name_, lhs_arena, - &other->theme_name_, rhs_arena - ); - swap(cost_item_id_, other->cost_item_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ActivityConf::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[6]); -} - -// =================================================================== - -Section_SectionRankMapEntry_DoNotUse::Section_SectionRankMapEntry_DoNotUse() {} -Section_SectionRankMapEntry_DoNotUse::Section_SectionRankMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void Section_SectionRankMapEntry_DoNotUse::MergeFrom(const Section_SectionRankMapEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata Section_SectionRankMapEntry_DoNotUse::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[7]); -} - -// =================================================================== - -class Section::_Internal { - public: -}; - -void Section::clear_section_item_list() { - section_item_list_.Clear(); -} -Section::Section(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - section_item_list_(arena), - section_rank_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.Section) -} -Section::Section(const Section& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - section_item_list_(from.section_item_list_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - section_rank_map_.MergeFrom(from.section_rank_map_); - section_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - section_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_section_name().empty()) { - section_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_section_name(), - GetArenaForAllocation()); - } - section_id_ = from.section_id_; - // @@protoc_insertion_point(copy_constructor:protoconf.Section) -} - -inline void Section::SharedCtor() { -section_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - section_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -section_id_ = 0u; -} - -Section::~Section() { - // @@protoc_insertion_point(destructor:protoconf.Section) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void Section::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - section_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Section::ArenaDtor(void* object) { - Section* _this = reinterpret_cast< Section* >(object); - (void)_this; - _this->section_rank_map_. ~MapField(); -} -inline void Section::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &Section::ArenaDtor); - } -} -void Section::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void Section::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.Section) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - section_item_list_.Clear(); - section_rank_map_.Clear(); - section_name_.ClearToEmpty(); - section_id_ = 0u; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Section::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint32 section_id = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - section_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string section_name = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_section_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.Section.section_name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated .protoconf.Item section_item_list = 3 [(.tableau.field) = { - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_section_item_list(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; - // map section_rank_map = 4 [(.tableau.field) = { - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(§ion_rank_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Section::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.Section) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint32 section_id = 1 [(.tableau.field) = { - if (this->_internal_section_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_section_id(), target); - } - - // string section_name = 2 [(.tableau.field) = { - if (!this->_internal_section_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_section_name().data(), static_cast(this->_internal_section_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.Section.section_name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_section_name(), target); - } - - // repeated .protoconf.Item section_item_list = 3 [(.tableau.field) = { - for (unsigned int i = 0, - n = static_cast(this->_internal_section_item_list_size()); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, this->_internal_section_item_list(i), target, stream); - } - - // map section_rank_map = 4 [(.tableau.field) = { - if (!this->_internal_section_rank_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint32_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_section_rank_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_section_rank_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >::const_iterator - it = this->_internal_section_rank_map().begin(); - it != this->_internal_section_rank_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = Section_SectionRankMapEntry_DoNotUse::Funcs::InternalSerialize(4, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >::const_iterator - it = this->_internal_section_rank_map().begin(); - it != this->_internal_section_rank_map().end(); ++it) { - target = Section_SectionRankMapEntry_DoNotUse::Funcs::InternalSerialize(4, it->first, it->second, target, stream); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.Section) - return target; -} - -size_t Section::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.Section) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .protoconf.Item section_item_list = 3 [(.tableau.field) = { - total_size += 1UL * this->_internal_section_item_list_size(); - for (const auto& msg : this->section_item_list_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // map section_rank_map = 4 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_section_rank_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >::const_iterator - it = this->_internal_section_rank_map().begin(); - it != this->_internal_section_rank_map().end(); ++it) { - total_size += Section_SectionRankMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string section_name = 2 [(.tableau.field) = { - if (!this->_internal_section_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_section_name()); - } - - // uint32 section_id = 1 [(.tableau.field) = { - if (this->_internal_section_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_section_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Section::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - Section::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Section::GetClassData() const { return &_class_data_; } - -void Section::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast
(to)->MergeFrom( - static_cast(from)); -} - - -void Section::MergeFrom(const Section& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.Section) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - section_item_list_.MergeFrom(from.section_item_list_); - section_rank_map_.MergeFrom(from.section_rank_map_); - if (!from._internal_section_name().empty()) { - _internal_set_section_name(from._internal_section_name()); - } - if (from._internal_section_id() != 0) { - _internal_set_section_id(from._internal_section_id()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void Section::CopyFrom(const Section& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.Section) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Section::IsInitialized() const { - return true; -} - -void Section::InternalSwap(Section* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - section_item_list_.InternalSwap(&other->section_item_list_); - section_rank_map_.InternalSwap(&other->section_rank_map_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - §ion_name_, lhs_arena, - &other->section_name_, rhs_arena - ); - swap(section_id_, other->section_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Section::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[8]); -} - -// =================================================================== - -ChapterConf_ChapterMapEntry_DoNotUse::ChapterConf_ChapterMapEntry_DoNotUse() {} -ChapterConf_ChapterMapEntry_DoNotUse::ChapterConf_ChapterMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void ChapterConf_ChapterMapEntry_DoNotUse::MergeFrom(const ChapterConf_ChapterMapEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata ChapterConf_ChapterMapEntry_DoNotUse::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[9]); -} - -// =================================================================== - -class ChapterConf_Chapter::_Internal { - public: -}; - -ChapterConf_Chapter::ChapterConf_Chapter(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ChapterConf.Chapter) -} -ChapterConf_Chapter::ChapterConf_Chapter(const ChapterConf_Chapter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), - GetArenaForAllocation()); - } - id_ = from.id_; - // @@protoc_insertion_point(copy_constructor:protoconf.ChapterConf.Chapter) -} - -inline void ChapterConf_Chapter::SharedCtor() { -name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -id_ = uint64_t{0u}; -} - -ChapterConf_Chapter::~ChapterConf_Chapter() { - // @@protoc_insertion_point(destructor:protoconf.ChapterConf.Chapter) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ChapterConf_Chapter::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void ChapterConf_Chapter::ArenaDtor(void* object) { - ChapterConf_Chapter* _this = reinterpret_cast< ChapterConf_Chapter* >(object); - (void)_this; -} -void ChapterConf_Chapter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void ChapterConf_Chapter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ChapterConf_Chapter::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ChapterConf.Chapter) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - name_.ClearToEmpty(); - id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ChapterConf_Chapter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 id = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string name = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.ChapterConf.Chapter.name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ChapterConf_Chapter::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ChapterConf.Chapter) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 id = 1 [(.tableau.field) = { - if (this->_internal_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_id(), target); - } - - // string name = 2 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ChapterConf.Chapter.name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_name(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ChapterConf.Chapter) - return target; -} - -size_t ChapterConf_Chapter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ChapterConf.Chapter) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string name = 2 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - // uint64 id = 1 [(.tableau.field) = { - if (this->_internal_id() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ChapterConf_Chapter::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ChapterConf_Chapter::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ChapterConf_Chapter::GetClassData() const { return &_class_data_; } - -void ChapterConf_Chapter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ChapterConf_Chapter::MergeFrom(const ChapterConf_Chapter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ChapterConf.Chapter) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_name().empty()) { - _internal_set_name(from._internal_name()); - } - if (from._internal_id() != 0) { - _internal_set_id(from._internal_id()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ChapterConf_Chapter::CopyFrom(const ChapterConf_Chapter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ChapterConf.Chapter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ChapterConf_Chapter::IsInitialized() const { - return true; -} - -void ChapterConf_Chapter::InternalSwap(ChapterConf_Chapter* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &name_, lhs_arena, - &other->name_, rhs_arena - ); - swap(id_, other->id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ChapterConf_Chapter::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[10]); -} - -// =================================================================== - -class ChapterConf::_Internal { - public: -}; - -ChapterConf::ChapterConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - chapter_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ChapterConf) -} -ChapterConf::ChapterConf(const ChapterConf& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - chapter_map_.MergeFrom(from.chapter_map_); - // @@protoc_insertion_point(copy_constructor:protoconf.ChapterConf) -} - -inline void ChapterConf::SharedCtor() { -} - -ChapterConf::~ChapterConf() { - // @@protoc_insertion_point(destructor:protoconf.ChapterConf) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ChapterConf::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void ChapterConf::ArenaDtor(void* object) { - ChapterConf* _this = reinterpret_cast< ChapterConf* >(object); - (void)_this; - _this->chapter_map_. ~MapField(); -} -inline void ChapterConf::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &ChapterConf::ArenaDtor); - } -} -void ChapterConf::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ChapterConf::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ChapterConf) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - chapter_map_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ChapterConf::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // map chapter_map = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&chapter_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ChapterConf::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ChapterConf) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // map chapter_map = 1 [(.tableau.field) = { - if (!this->_internal_chapter_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >::const_pointer - ConstPtr; - typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint64_t, ConstPtr > SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; - - if (stream->IsSerializationDeterministic() && - this->_internal_chapter_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_chapter_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >::const_iterator - it = this->_internal_chapter_map().begin(); - it != this->_internal_chapter_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ChapterConf_ChapterMapEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >::const_iterator - it = this->_internal_chapter_map().begin(); - it != this->_internal_chapter_map().end(); ++it) { - target = ChapterConf_ChapterMapEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ChapterConf) - return target; -} - -size_t ChapterConf::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ChapterConf) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map chapter_map = 1 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_chapter_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >::const_iterator - it = this->_internal_chapter_map().begin(); - it != this->_internal_chapter_map().end(); ++it) { - total_size += ChapterConf_ChapterMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ChapterConf::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ChapterConf::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ChapterConf::GetClassData() const { return &_class_data_; } - -void ChapterConf::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ChapterConf::MergeFrom(const ChapterConf& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ChapterConf) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - chapter_map_.MergeFrom(from.chapter_map_); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ChapterConf::CopyFrom(const ChapterConf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ChapterConf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ChapterConf::IsInitialized() const { - return true; -} - -void ChapterConf::InternalSwap(ChapterConf* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - chapter_map_.InternalSwap(&other->chapter_map_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ChapterConf::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[11]); -} - -// =================================================================== - -ThemeConf_ThemeMapEntry_DoNotUse::ThemeConf_ThemeMapEntry_DoNotUse() {} -ThemeConf_ThemeMapEntry_DoNotUse::ThemeConf_ThemeMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void ThemeConf_ThemeMapEntry_DoNotUse::MergeFrom(const ThemeConf_ThemeMapEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata ThemeConf_ThemeMapEntry_DoNotUse::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[12]); -} - -// =================================================================== - -class ThemeConf_Theme::_Internal { - public: -}; - -ThemeConf_Theme::ThemeConf_Theme(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ThemeConf.Theme) -} -ThemeConf_Theme::ThemeConf_Theme(const ThemeConf_Theme& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), - GetArenaForAllocation()); - } - value_ = from.value_; - // @@protoc_insertion_point(copy_constructor:protoconf.ThemeConf.Theme) -} - -inline void ThemeConf_Theme::SharedCtor() { -name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -value_ = uint64_t{0u}; -} - -ThemeConf_Theme::~ThemeConf_Theme() { - // @@protoc_insertion_point(destructor:protoconf.ThemeConf.Theme) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ThemeConf_Theme::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void ThemeConf_Theme::ArenaDtor(void* object) { - ThemeConf_Theme* _this = reinterpret_cast< ThemeConf_Theme* >(object); - (void)_this; -} -void ThemeConf_Theme::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void ThemeConf_Theme::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ThemeConf_Theme::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ThemeConf.Theme) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - name_.ClearToEmpty(); - value_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ThemeConf_Theme::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 value = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string name = 2 [(.tableau.field) = { - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "protoconf.ThemeConf.Theme.name")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ThemeConf_Theme::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ThemeConf.Theme) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 value = 1 [(.tableau.field) = { - if (this->_internal_value() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_value(), target); - } - - // string name = 2 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ThemeConf.Theme.name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_name(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ThemeConf.Theme) - return target; -} - -size_t ThemeConf_Theme::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ThemeConf.Theme) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string name = 2 [(.tableau.field) = { - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - // uint64 value = 1 [(.tableau.field) = { - if (this->_internal_value() != 0) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_value()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ThemeConf_Theme::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ThemeConf_Theme::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ThemeConf_Theme::GetClassData() const { return &_class_data_; } - -void ThemeConf_Theme::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ThemeConf_Theme::MergeFrom(const ThemeConf_Theme& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ThemeConf.Theme) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_name().empty()) { - _internal_set_name(from._internal_name()); - } - if (from._internal_value() != 0) { - _internal_set_value(from._internal_value()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ThemeConf_Theme::CopyFrom(const ThemeConf_Theme& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ThemeConf.Theme) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ThemeConf_Theme::IsInitialized() const { - return true; -} - -void ThemeConf_Theme::InternalSwap(ThemeConf_Theme* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - &name_, lhs_arena, - &other->name_, rhs_arena - ); - swap(value_, other->value_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ThemeConf_Theme::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[13]); -} - -// =================================================================== - -class ThemeConf::_Internal { - public: -}; - -ThemeConf::ThemeConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), - theme_map_(arena) { - SharedCtor(); - if (!is_message_owned) { - RegisterArenaDtor(arena); - } - // @@protoc_insertion_point(arena_constructor:protoconf.ThemeConf) -} -ThemeConf::ThemeConf(const ThemeConf& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - theme_map_.MergeFrom(from.theme_map_); - // @@protoc_insertion_point(copy_constructor:protoconf.ThemeConf) -} - -inline void ThemeConf::SharedCtor() { -} - -ThemeConf::~ThemeConf() { - // @@protoc_insertion_point(destructor:protoconf.ThemeConf) - if (GetArenaForAllocation() != nullptr) return; - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -inline void ThemeConf::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void ThemeConf::ArenaDtor(void* object) { - ThemeConf* _this = reinterpret_cast< ThemeConf* >(object); - (void)_this; - _this->theme_map_. ~MapField(); -} -inline void ThemeConf::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { - if (arena != nullptr) { - arena->OwnCustomDestructor(this, &ThemeConf::ArenaDtor); - } -} -void ThemeConf::SetCachedSize(int size) const { - _cached_size_.Set(size); -} - -void ThemeConf::Clear() { -// @@protoc_insertion_point(message_clear_start:protoconf.ThemeConf) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - theme_map_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ThemeConf::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - switch (tag >> 3) { - // map theme_map = 1 [(.tableau.field) = { - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&theme_map_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ThemeConf::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:protoconf.ThemeConf) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // map theme_map = 1 [(.tableau.field) = { - if (!this->_internal_theme_map().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - (void)p; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "protoconf.ThemeConf.ThemeMapEntry.key"); - } - }; - - if (stream->IsSerializationDeterministic() && - this->_internal_theme_map().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_theme_map().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >::const_iterator - it = this->_internal_theme_map().begin(); - it != this->_internal_theme_map().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = ThemeConf_ThemeMapEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); - Utf8Check::Check(&(*items[static_cast(i)])); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >::const_iterator - it = this->_internal_theme_map().begin(); - it != this->_internal_theme_map().end(); ++it) { - target = ThemeConf_ThemeMapEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, target, stream); - Utf8Check::Check(&(*it)); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:protoconf.ThemeConf) - return target; -} - -size_t ThemeConf::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:protoconf.ThemeConf) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map theme_map = 1 [(.tableau.field) = { - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_theme_map_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >::const_iterator - it = this->_internal_theme_map().begin(); - it != this->_internal_theme_map().end(); ++it) { - total_size += ThemeConf_ThemeMapEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ThemeConf::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ThemeConf::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ThemeConf::GetClassData() const { return &_class_data_; } - -void ThemeConf::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); -} - - -void ThemeConf::MergeFrom(const ThemeConf& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:protoconf.ThemeConf) - GOOGLE_DCHECK_NE(&from, this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - theme_map_.MergeFrom(from.theme_map_); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ThemeConf::CopyFrom(const ThemeConf& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:protoconf.ThemeConf) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ThemeConf::IsInitialized() const { - return true; -} - -void ThemeConf::InternalSwap(ThemeConf* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - theme_map_.InternalSwap(&other->theme_map_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ThemeConf::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_test_5fconf_2eproto_getter, &descriptor_table_test_5fconf_2eproto_once, - file_level_metadata_test_5fconf_2eproto[14]); -} - -// @@protoc_insertion_point(namespace_scope) -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf_ActivityMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ActivityConf_ActivityMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf_ActivityMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf_Activity_Chapter* Arena::CreateMaybeMessage< ::protoconf::ActivityConf_Activity_Chapter >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf_Activity_Chapter >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf_Activity* Arena::CreateMaybeMessage< ::protoconf::ActivityConf_Activity >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf_Activity >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf_BonusMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ActivityConf_BonusMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf_BonusMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ActivityConf* Arena::CreateMaybeMessage< ::protoconf::ActivityConf >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ActivityConf >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::Section_SectionRankMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::Section_SectionRankMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::Section_SectionRankMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::Section* Arena::CreateMaybeMessage< ::protoconf::Section >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::Section >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ChapterConf_ChapterMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ChapterConf_ChapterMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ChapterConf_ChapterMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ChapterConf_Chapter* Arena::CreateMaybeMessage< ::protoconf::ChapterConf_Chapter >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ChapterConf_Chapter >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ChapterConf* Arena::CreateMaybeMessage< ::protoconf::ChapterConf >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ChapterConf >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ThemeConf_ThemeMapEntry_DoNotUse* Arena::CreateMaybeMessage< ::protoconf::ThemeConf_ThemeMapEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ThemeConf_ThemeMapEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ThemeConf_Theme* Arena::CreateMaybeMessage< ::protoconf::ThemeConf_Theme >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ThemeConf_Theme >(arena); -} -template<> PROTOBUF_NOINLINE ::protoconf::ThemeConf* Arena::CreateMaybeMessage< ::protoconf::ThemeConf >(Arena* arena) { - return Arena::CreateMessageInternal< ::protoconf::ThemeConf >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/_lab/cpp/src/demo/test_conf.pb.h b/_lab/cpp/src/demo/test_conf.pb.h deleted file mode 100644 index 301053a5..00000000 --- a/_lab/cpp/src/demo/test_conf.pb.h +++ /dev/null @@ -1,2509 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: test_conf.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_test_5fconf_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_test_5fconf_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3019000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3019003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include -#include "tableau/protobuf/tableau.pb.h" -#include "common_conf.pb.h" -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_test_5fconf_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_test_5fconf_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[15] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const uint32_t offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_test_5fconf_2eproto; -namespace protoconf { -class ActivityConf; -struct ActivityConfDefaultTypeInternal; -extern ActivityConfDefaultTypeInternal _ActivityConf_default_instance_; -class ActivityConf_Activity; -struct ActivityConf_ActivityDefaultTypeInternal; -extern ActivityConf_ActivityDefaultTypeInternal _ActivityConf_Activity_default_instance_; -class ActivityConf_ActivityMapEntry_DoNotUse; -struct ActivityConf_ActivityMapEntry_DoNotUseDefaultTypeInternal; -extern ActivityConf_ActivityMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_ActivityMapEntry_DoNotUse_default_instance_; -class ActivityConf_Activity_Chapter; -struct ActivityConf_Activity_ChapterDefaultTypeInternal; -extern ActivityConf_Activity_ChapterDefaultTypeInternal _ActivityConf_Activity_Chapter_default_instance_; -class ActivityConf_Activity_ChapterMapEntry_DoNotUse; -struct ActivityConf_Activity_ChapterMapEntry_DoNotUseDefaultTypeInternal; -extern ActivityConf_Activity_ChapterMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_Activity_ChapterMapEntry_DoNotUse_default_instance_; -class ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse; -struct ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUseDefaultTypeInternal; -extern ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse_default_instance_; -class ActivityConf_BonusMapEntry_DoNotUse; -struct ActivityConf_BonusMapEntry_DoNotUseDefaultTypeInternal; -extern ActivityConf_BonusMapEntry_DoNotUseDefaultTypeInternal _ActivityConf_BonusMapEntry_DoNotUse_default_instance_; -class ChapterConf; -struct ChapterConfDefaultTypeInternal; -extern ChapterConfDefaultTypeInternal _ChapterConf_default_instance_; -class ChapterConf_Chapter; -struct ChapterConf_ChapterDefaultTypeInternal; -extern ChapterConf_ChapterDefaultTypeInternal _ChapterConf_Chapter_default_instance_; -class ChapterConf_ChapterMapEntry_DoNotUse; -struct ChapterConf_ChapterMapEntry_DoNotUseDefaultTypeInternal; -extern ChapterConf_ChapterMapEntry_DoNotUseDefaultTypeInternal _ChapterConf_ChapterMapEntry_DoNotUse_default_instance_; -class Section; -struct SectionDefaultTypeInternal; -extern SectionDefaultTypeInternal _Section_default_instance_; -class Section_SectionRankMapEntry_DoNotUse; -struct Section_SectionRankMapEntry_DoNotUseDefaultTypeInternal; -extern Section_SectionRankMapEntry_DoNotUseDefaultTypeInternal _Section_SectionRankMapEntry_DoNotUse_default_instance_; -class ThemeConf; -struct ThemeConfDefaultTypeInternal; -extern ThemeConfDefaultTypeInternal _ThemeConf_default_instance_; -class ThemeConf_Theme; -struct ThemeConf_ThemeDefaultTypeInternal; -extern ThemeConf_ThemeDefaultTypeInternal _ThemeConf_Theme_default_instance_; -class ThemeConf_ThemeMapEntry_DoNotUse; -struct ThemeConf_ThemeMapEntry_DoNotUseDefaultTypeInternal; -extern ThemeConf_ThemeMapEntry_DoNotUseDefaultTypeInternal _ThemeConf_ThemeMapEntry_DoNotUse_default_instance_; -} // namespace protoconf -PROTOBUF_NAMESPACE_OPEN -template<> ::protoconf::ActivityConf* Arena::CreateMaybeMessage<::protoconf::ActivityConf>(Arena*); -template<> ::protoconf::ActivityConf_Activity* Arena::CreateMaybeMessage<::protoconf::ActivityConf_Activity>(Arena*); -template<> ::protoconf::ActivityConf_ActivityMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ActivityConf_ActivityMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::ActivityConf_Activity_Chapter* Arena::CreateMaybeMessage<::protoconf::ActivityConf_Activity_Chapter>(Arena*); -template<> ::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ActivityConf_Activity_ChapterMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::ActivityConf_BonusMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ActivityConf_BonusMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::ChapterConf* Arena::CreateMaybeMessage<::protoconf::ChapterConf>(Arena*); -template<> ::protoconf::ChapterConf_Chapter* Arena::CreateMaybeMessage<::protoconf::ChapterConf_Chapter>(Arena*); -template<> ::protoconf::ChapterConf_ChapterMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ChapterConf_ChapterMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::Section* Arena::CreateMaybeMessage<::protoconf::Section>(Arena*); -template<> ::protoconf::Section_SectionRankMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::Section_SectionRankMapEntry_DoNotUse>(Arena*); -template<> ::protoconf::ThemeConf* Arena::CreateMaybeMessage<::protoconf::ThemeConf>(Arena*); -template<> ::protoconf::ThemeConf_Theme* Arena::CreateMaybeMessage<::protoconf::ThemeConf_Theme>(Arena*); -template<> ::protoconf::ThemeConf_ThemeMapEntry_DoNotUse* Arena::CreateMaybeMessage<::protoconf::ThemeConf_ThemeMapEntry_DoNotUse>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace protoconf { - -// =================================================================== - -class ActivityConf_ActivityMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ActivityConf_ActivityMapEntry_DoNotUse(); - explicit constexpr ActivityConf_ActivityMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ActivityConf_ActivityMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ActivityConf_ActivityMapEntry_DoNotUse& other); - static const ActivityConf_ActivityMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ActivityConf_ActivityMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ActivityConf_Activity_ChapterMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ActivityConf_Activity_ChapterMapEntry_DoNotUse(); - explicit constexpr ActivityConf_Activity_ChapterMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ActivityConf_Activity_ChapterMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ActivityConf_Activity_ChapterMapEntry_DoNotUse& other); - static const ActivityConf_Activity_ChapterMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ActivityConf_Activity_ChapterMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse(); - explicit constexpr ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse& other); - static const ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ActivityConf_Activity_Chapter final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ActivityConf.Activity.Chapter) */ { - public: - inline ActivityConf_Activity_Chapter() : ActivityConf_Activity_Chapter(nullptr) {} - ~ActivityConf_Activity_Chapter() override; - explicit constexpr ActivityConf_Activity_Chapter(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ActivityConf_Activity_Chapter(const ActivityConf_Activity_Chapter& from); - ActivityConf_Activity_Chapter(ActivityConf_Activity_Chapter&& from) noexcept - : ActivityConf_Activity_Chapter() { - *this = ::std::move(from); - } - - inline ActivityConf_Activity_Chapter& operator=(const ActivityConf_Activity_Chapter& from) { - CopyFrom(from); - return *this; - } - inline ActivityConf_Activity_Chapter& operator=(ActivityConf_Activity_Chapter&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ActivityConf_Activity_Chapter& default_instance() { - return *internal_default_instance(); - } - static inline const ActivityConf_Activity_Chapter* internal_default_instance() { - return reinterpret_cast( - &_ActivityConf_Activity_Chapter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(ActivityConf_Activity_Chapter& a, ActivityConf_Activity_Chapter& b) { - a.Swap(&b); - } - inline void Swap(ActivityConf_Activity_Chapter* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ActivityConf_Activity_Chapter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ActivityConf_Activity_Chapter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ActivityConf_Activity_Chapter& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ActivityConf_Activity_Chapter& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ActivityConf_Activity_Chapter* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ActivityConf.Activity.Chapter"; - } - protected: - explicit ActivityConf_Activity_Chapter(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - - // accessors ------------------------------------------------------- - - enum : int { - kSectionMapFieldNumber = 4, - kChapterNameFieldNumber = 2, - kChapterIdFieldNumber = 1, - kAwardIdFieldNumber = 3, - }; - // map section_map = 4 [(.tableau.field) = { - int section_map_size() const; - private: - int _internal_section_map_size() const; - public: - void clear_section_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >& - _internal_section_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >* - _internal_mutable_section_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >& - section_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >* - mutable_section_map(); - - // string chapter_name = 2 [(.tableau.field) = { - void clear_chapter_name(); - const std::string& chapter_name() const; - template - void set_chapter_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_chapter_name(); - PROTOBUF_NODISCARD std::string* release_chapter_name(); - void set_allocated_chapter_name(std::string* chapter_name); - private: - const std::string& _internal_chapter_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_chapter_name(const std::string& value); - std::string* _internal_mutable_chapter_name(); - public: - - // uint32 chapter_id = 1 [(.tableau.field) = { - void clear_chapter_id(); - uint32_t chapter_id() const; - void set_chapter_id(uint32_t value); - private: - uint32_t _internal_chapter_id() const; - void _internal_set_chapter_id(uint32_t value); - public: - - // uint32 award_id = 3 [(.tableau.field) = { - void clear_award_id(); - uint32_t award_id() const; - void set_award_id(uint32_t value); - private: - uint32_t _internal_award_id() const; - void _internal_set_award_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.ActivityConf.Activity.Chapter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ActivityConf_Activity_Chapter_SectionMapEntry_DoNotUse, - uint32_t, ::protoconf::Section, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> section_map_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr chapter_name_; - uint32_t chapter_id_; - uint32_t award_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ActivityConf_Activity final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ActivityConf.Activity) */ { - public: - inline ActivityConf_Activity() : ActivityConf_Activity(nullptr) {} - ~ActivityConf_Activity() override; - explicit constexpr ActivityConf_Activity(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ActivityConf_Activity(const ActivityConf_Activity& from); - ActivityConf_Activity(ActivityConf_Activity&& from) noexcept - : ActivityConf_Activity() { - *this = ::std::move(from); - } - - inline ActivityConf_Activity& operator=(const ActivityConf_Activity& from) { - CopyFrom(from); - return *this; - } - inline ActivityConf_Activity& operator=(ActivityConf_Activity&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ActivityConf_Activity& default_instance() { - return *internal_default_instance(); - } - static inline const ActivityConf_Activity* internal_default_instance() { - return reinterpret_cast( - &_ActivityConf_Activity_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(ActivityConf_Activity& a, ActivityConf_Activity& b) { - a.Swap(&b); - } - inline void Swap(ActivityConf_Activity* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ActivityConf_Activity* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ActivityConf_Activity* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ActivityConf_Activity& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ActivityConf_Activity& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ActivityConf_Activity* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ActivityConf.Activity"; - } - protected: - explicit ActivityConf_Activity(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef ActivityConf_Activity_Chapter Chapter; - - // accessors ------------------------------------------------------- - - enum : int { - kChapterMapFieldNumber = 3, - kActivityNameFieldNumber = 2, - kActivityIdFieldNumber = 1, - }; - // map chapter_map = 3 [(.tableau.field) = { - int chapter_map_size() const; - private: - int _internal_chapter_map_size() const; - public: - void clear_chapter_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >& - _internal_chapter_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >* - _internal_mutable_chapter_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >& - chapter_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >* - mutable_chapter_map(); - - // string activity_name = 2 [(.tableau.field) = { - void clear_activity_name(); - const std::string& activity_name() const; - template - void set_activity_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_activity_name(); - PROTOBUF_NODISCARD std::string* release_activity_name(); - void set_allocated_activity_name(std::string* activity_name); - private: - const std::string& _internal_activity_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_activity_name(const std::string& value); - std::string* _internal_mutable_activity_name(); - public: - - // uint64 activity_id = 1 [(.tableau.field) = { - void clear_activity_id(); - uint64_t activity_id() const; - void set_activity_id(uint64_t value); - private: - uint64_t _internal_activity_id() const; - void _internal_set_activity_id(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.ActivityConf.Activity) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ActivityConf_Activity_ChapterMapEntry_DoNotUse, - uint32_t, ::protoconf::ActivityConf_Activity_Chapter, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> chapter_map_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr activity_name_; - uint64_t activity_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ActivityConf_BonusMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ActivityConf_BonusMapEntry_DoNotUse(); - explicit constexpr ActivityConf_BonusMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ActivityConf_BonusMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ActivityConf_BonusMapEntry_DoNotUse& other); - static const ActivityConf_BonusMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ActivityConf_BonusMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ActivityConf final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ActivityConf) */ { - public: - inline ActivityConf() : ActivityConf(nullptr) {} - ~ActivityConf() override; - explicit constexpr ActivityConf(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ActivityConf(const ActivityConf& from); - ActivityConf(ActivityConf&& from) noexcept - : ActivityConf() { - *this = ::std::move(from); - } - - inline ActivityConf& operator=(const ActivityConf& from) { - CopyFrom(from); - return *this; - } - inline ActivityConf& operator=(ActivityConf&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ActivityConf& default_instance() { - return *internal_default_instance(); - } - static inline const ActivityConf* internal_default_instance() { - return reinterpret_cast( - &_ActivityConf_default_instance_); - } - static constexpr int kIndexInFileMessages = - 6; - - friend void swap(ActivityConf& a, ActivityConf& b) { - a.Swap(&b); - } - inline void Swap(ActivityConf* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ActivityConf* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ActivityConf* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ActivityConf& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ActivityConf& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ActivityConf* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ActivityConf"; - } - protected: - explicit ActivityConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef ActivityConf_Activity Activity; - - // accessors ------------------------------------------------------- - - enum : int { - kActivityMapFieldNumber = 1, - kBonusMapFieldNumber = 2, - kThemeNameFieldNumber = 3, - kCostItemIdFieldNumber = 4, - }; - // map activity_map = 1 [(.tableau.field) = { - int activity_map_size() const; - private: - int _internal_activity_map_size() const; - public: - void clear_activity_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >& - _internal_activity_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >* - _internal_mutable_activity_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >& - activity_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >* - mutable_activity_map(); - - // map bonus_map = 2 [(.tableau.field) = { - int bonus_map_size() const; - private: - int _internal_bonus_map_size() const; - public: - void clear_bonus_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >& - _internal_bonus_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >* - _internal_mutable_bonus_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >& - bonus_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >* - mutable_bonus_map(); - - // string theme_name = 3 [(.tableau.field) = { - void clear_theme_name(); - const std::string& theme_name() const; - template - void set_theme_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_theme_name(); - PROTOBUF_NODISCARD std::string* release_theme_name(); - void set_allocated_theme_name(std::string* theme_name); - private: - const std::string& _internal_theme_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_theme_name(const std::string& value); - std::string* _internal_mutable_theme_name(); - public: - - // int32 cost_item_id = 4 [(.tableau.field) = { - void clear_cost_item_id(); - int32_t cost_item_id() const; - void set_cost_item_id(int32_t value); - private: - int32_t _internal_cost_item_id() const; - void _internal_set_cost_item_id(int32_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.ActivityConf) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ActivityConf_ActivityMapEntry_DoNotUse, - uint64_t, ::protoconf::ActivityConf_Activity, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> activity_map_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ActivityConf_BonusMapEntry_DoNotUse, - uint32_t, ::protoconf::Item, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> bonus_map_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr theme_name_; - int32_t cost_item_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class Section_SectionRankMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - Section_SectionRankMapEntry_DoNotUse(); - explicit constexpr Section_SectionRankMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit Section_SectionRankMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const Section_SectionRankMapEntry_DoNotUse& other); - static const Section_SectionRankMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Section_SectionRankMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class Section final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.Section) */ { - public: - inline Section() : Section(nullptr) {} - ~Section() override; - explicit constexpr Section(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Section(const Section& from); - Section(Section&& from) noexcept - : Section() { - *this = ::std::move(from); - } - - inline Section& operator=(const Section& from) { - CopyFrom(from); - return *this; - } - inline Section& operator=(Section&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const Section& default_instance() { - return *internal_default_instance(); - } - static inline const Section* internal_default_instance() { - return reinterpret_cast( - &_Section_default_instance_); - } - static constexpr int kIndexInFileMessages = - 8; - - friend void swap(Section& a, Section& b) { - a.Swap(&b); - } - inline void Swap(Section* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Section* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Section* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage
(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const Section& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const Section& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Section* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.Section"; - } - protected: - explicit Section(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - - // accessors ------------------------------------------------------- - - enum : int { - kSectionItemListFieldNumber = 3, - kSectionRankMapFieldNumber = 4, - kSectionNameFieldNumber = 2, - kSectionIdFieldNumber = 1, - }; - // repeated .protoconf.Item section_item_list = 3 [(.tableau.field) = { - int section_item_list_size() const; - private: - int _internal_section_item_list_size() const; - public: - void clear_section_item_list(); - ::protoconf::Item* mutable_section_item_list(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::protoconf::Item >* - mutable_section_item_list(); - private: - const ::protoconf::Item& _internal_section_item_list(int index) const; - ::protoconf::Item* _internal_add_section_item_list(); - public: - const ::protoconf::Item& section_item_list(int index) const; - ::protoconf::Item* add_section_item_list(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::protoconf::Item >& - section_item_list() const; - - // map section_rank_map = 4 [(.tableau.field) = { - int section_rank_map_size() const; - private: - int _internal_section_rank_map_size() const; - public: - void clear_section_rank_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >& - _internal_section_rank_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >* - _internal_mutable_section_rank_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >& - section_rank_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >* - mutable_section_rank_map(); - - // string section_name = 2 [(.tableau.field) = { - void clear_section_name(); - const std::string& section_name() const; - template - void set_section_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_section_name(); - PROTOBUF_NODISCARD std::string* release_section_name(); - void set_allocated_section_name(std::string* section_name); - private: - const std::string& _internal_section_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_section_name(const std::string& value); - std::string* _internal_mutable_section_name(); - public: - - // uint32 section_id = 1 [(.tableau.field) = { - void clear_section_id(); - uint32_t section_id() const; - void set_section_id(uint32_t value); - private: - uint32_t _internal_section_id() const; - void _internal_set_section_id(uint32_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.Section) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::protoconf::Item > section_item_list_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - Section_SectionRankMapEntry_DoNotUse, - uint32_t, int32_t, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32> section_rank_map_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr section_name_; - uint32_t section_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ChapterConf_ChapterMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ChapterConf_ChapterMapEntry_DoNotUse(); - explicit constexpr ChapterConf_ChapterMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ChapterConf_ChapterMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ChapterConf_ChapterMapEntry_DoNotUse& other); - static const ChapterConf_ChapterMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ChapterConf_ChapterMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(void*) { return true; } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ChapterConf_Chapter final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ChapterConf.Chapter) */ { - public: - inline ChapterConf_Chapter() : ChapterConf_Chapter(nullptr) {} - ~ChapterConf_Chapter() override; - explicit constexpr ChapterConf_Chapter(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ChapterConf_Chapter(const ChapterConf_Chapter& from); - ChapterConf_Chapter(ChapterConf_Chapter&& from) noexcept - : ChapterConf_Chapter() { - *this = ::std::move(from); - } - - inline ChapterConf_Chapter& operator=(const ChapterConf_Chapter& from) { - CopyFrom(from); - return *this; - } - inline ChapterConf_Chapter& operator=(ChapterConf_Chapter&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ChapterConf_Chapter& default_instance() { - return *internal_default_instance(); - } - static inline const ChapterConf_Chapter* internal_default_instance() { - return reinterpret_cast( - &_ChapterConf_Chapter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 10; - - friend void swap(ChapterConf_Chapter& a, ChapterConf_Chapter& b) { - a.Swap(&b); - } - inline void Swap(ChapterConf_Chapter* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ChapterConf_Chapter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ChapterConf_Chapter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ChapterConf_Chapter& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ChapterConf_Chapter& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ChapterConf_Chapter* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ChapterConf.Chapter"; - } - protected: - explicit ChapterConf_Chapter(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kNameFieldNumber = 2, - kIdFieldNumber = 1, - }; - // string name = 2 [(.tableau.field) = { - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // uint64 id = 1 [(.tableau.field) = { - void clear_id(); - uint64_t id() const; - void set_id(uint64_t value); - private: - uint64_t _internal_id() const; - void _internal_set_id(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.ChapterConf.Chapter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - uint64_t id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ChapterConf final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ChapterConf) */ { - public: - inline ChapterConf() : ChapterConf(nullptr) {} - ~ChapterConf() override; - explicit constexpr ChapterConf(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ChapterConf(const ChapterConf& from); - ChapterConf(ChapterConf&& from) noexcept - : ChapterConf() { - *this = ::std::move(from); - } - - inline ChapterConf& operator=(const ChapterConf& from) { - CopyFrom(from); - return *this; - } - inline ChapterConf& operator=(ChapterConf&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ChapterConf& default_instance() { - return *internal_default_instance(); - } - static inline const ChapterConf* internal_default_instance() { - return reinterpret_cast( - &_ChapterConf_default_instance_); - } - static constexpr int kIndexInFileMessages = - 11; - - friend void swap(ChapterConf& a, ChapterConf& b) { - a.Swap(&b); - } - inline void Swap(ChapterConf* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ChapterConf* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ChapterConf* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ChapterConf& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ChapterConf& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ChapterConf* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ChapterConf"; - } - protected: - explicit ChapterConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef ChapterConf_Chapter Chapter; - - // accessors ------------------------------------------------------- - - enum : int { - kChapterMapFieldNumber = 1, - }; - // map chapter_map = 1 [(.tableau.field) = { - int chapter_map_size() const; - private: - int _internal_chapter_map_size() const; - public: - void clear_chapter_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >& - _internal_chapter_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >* - _internal_mutable_chapter_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >& - chapter_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >* - mutable_chapter_map(); - - // @@protoc_insertion_point(class_scope:protoconf.ChapterConf) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ChapterConf_ChapterMapEntry_DoNotUse, - uint64_t, ::protoconf::ChapterConf_Chapter, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> chapter_map_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ThemeConf_ThemeMapEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - ThemeConf_ThemeMapEntry_DoNotUse(); - explicit constexpr ThemeConf_ThemeMapEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit ThemeConf_ThemeMapEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const ThemeConf_ThemeMapEntry_DoNotUse& other); - static const ThemeConf_ThemeMapEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ThemeConf_ThemeMapEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "protoconf.ThemeConf.ThemeMapEntry.key"); - } - static bool ValidateValue(void*) { return true; } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; -}; - -// ------------------------------------------------------------------- - -class ThemeConf_Theme final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ThemeConf.Theme) */ { - public: - inline ThemeConf_Theme() : ThemeConf_Theme(nullptr) {} - ~ThemeConf_Theme() override; - explicit constexpr ThemeConf_Theme(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ThemeConf_Theme(const ThemeConf_Theme& from); - ThemeConf_Theme(ThemeConf_Theme&& from) noexcept - : ThemeConf_Theme() { - *this = ::std::move(from); - } - - inline ThemeConf_Theme& operator=(const ThemeConf_Theme& from) { - CopyFrom(from); - return *this; - } - inline ThemeConf_Theme& operator=(ThemeConf_Theme&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ThemeConf_Theme& default_instance() { - return *internal_default_instance(); - } - static inline const ThemeConf_Theme* internal_default_instance() { - return reinterpret_cast( - &_ThemeConf_Theme_default_instance_); - } - static constexpr int kIndexInFileMessages = - 13; - - friend void swap(ThemeConf_Theme& a, ThemeConf_Theme& b) { - a.Swap(&b); - } - inline void Swap(ThemeConf_Theme* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ThemeConf_Theme* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ThemeConf_Theme* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ThemeConf_Theme& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ThemeConf_Theme& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ThemeConf_Theme* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ThemeConf.Theme"; - } - protected: - explicit ThemeConf_Theme(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kNameFieldNumber = 2, - kValueFieldNumber = 1, - }; - // string name = 2 [(.tableau.field) = { - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // uint64 value = 1 [(.tableau.field) = { - void clear_value(); - uint64_t value() const; - void set_value(uint64_t value); - private: - uint64_t _internal_value() const; - void _internal_set_value(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:protoconf.ThemeConf.Theme) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - uint64_t value_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// ------------------------------------------------------------------- - -class ThemeConf final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:protoconf.ThemeConf) */ { - public: - inline ThemeConf() : ThemeConf(nullptr) {} - ~ThemeConf() override; - explicit constexpr ThemeConf(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ThemeConf(const ThemeConf& from); - ThemeConf(ThemeConf&& from) noexcept - : ThemeConf() { - *this = ::std::move(from); - } - - inline ThemeConf& operator=(const ThemeConf& from) { - CopyFrom(from); - return *this; - } - inline ThemeConf& operator=(ThemeConf&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } - static const ThemeConf& default_instance() { - return *internal_default_instance(); - } - static inline const ThemeConf* internal_default_instance() { - return reinterpret_cast( - &_ThemeConf_default_instance_); - } - static constexpr int kIndexInFileMessages = - 14; - - friend void swap(ThemeConf& a, ThemeConf& b) { - a.Swap(&b); - } - inline void Swap(ThemeConf* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ThemeConf* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ThemeConf* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ThemeConf& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom(const ThemeConf& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ThemeConf* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "protoconf.ThemeConf"; - } - protected: - explicit ThemeConf(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - // nested types ---------------------------------------------------- - - typedef ThemeConf_Theme Theme; - - // accessors ------------------------------------------------------- - - enum : int { - kThemeMapFieldNumber = 1, - }; - // map theme_map = 1 [(.tableau.field) = { - int theme_map_size() const; - private: - int _internal_theme_map_size() const; - public: - void clear_theme_map(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >& - _internal_theme_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >* - _internal_mutable_theme_map(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >& - theme_map() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >* - mutable_theme_map(); - - // @@protoc_insertion_point(class_scope:protoconf.ThemeConf) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - ThemeConf_ThemeMapEntry_DoNotUse, - std::string, ::protoconf::ThemeConf_Theme, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> theme_map_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_test_5fconf_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ActivityConf_Activity_Chapter - -// uint32 chapter_id = 1 [(.tableau.field) = { -inline void ActivityConf_Activity_Chapter::clear_chapter_id() { - chapter_id_ = 0u; -} -inline uint32_t ActivityConf_Activity_Chapter::_internal_chapter_id() const { - return chapter_id_; -} -inline uint32_t ActivityConf_Activity_Chapter::chapter_id() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.Activity.Chapter.chapter_id) - return _internal_chapter_id(); -} -inline void ActivityConf_Activity_Chapter::_internal_set_chapter_id(uint32_t value) { - - chapter_id_ = value; -} -inline void ActivityConf_Activity_Chapter::set_chapter_id(uint32_t value) { - _internal_set_chapter_id(value); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.Activity.Chapter.chapter_id) -} - -// string chapter_name = 2 [(.tableau.field) = { -inline void ActivityConf_Activity_Chapter::clear_chapter_name() { - chapter_name_.ClearToEmpty(); -} -inline const std::string& ActivityConf_Activity_Chapter::chapter_name() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.Activity.Chapter.chapter_name) - return _internal_chapter_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ActivityConf_Activity_Chapter::set_chapter_name(ArgT0&& arg0, ArgT... args) { - - chapter_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.Activity.Chapter.chapter_name) -} -inline std::string* ActivityConf_Activity_Chapter::mutable_chapter_name() { - std::string* _s = _internal_mutable_chapter_name(); - // @@protoc_insertion_point(field_mutable:protoconf.ActivityConf.Activity.Chapter.chapter_name) - return _s; -} -inline const std::string& ActivityConf_Activity_Chapter::_internal_chapter_name() const { - return chapter_name_.Get(); -} -inline void ActivityConf_Activity_Chapter::_internal_set_chapter_name(const std::string& value) { - - chapter_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* ActivityConf_Activity_Chapter::_internal_mutable_chapter_name() { - - return chapter_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* ActivityConf_Activity_Chapter::release_chapter_name() { - // @@protoc_insertion_point(field_release:protoconf.ActivityConf.Activity.Chapter.chapter_name) - return chapter_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void ActivityConf_Activity_Chapter::set_allocated_chapter_name(std::string* chapter_name) { - if (chapter_name != nullptr) { - - } else { - - } - chapter_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), chapter_name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (chapter_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - chapter_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.ActivityConf.Activity.Chapter.chapter_name) -} - -// uint32 award_id = 3 [(.tableau.field) = { -inline void ActivityConf_Activity_Chapter::clear_award_id() { - award_id_ = 0u; -} -inline uint32_t ActivityConf_Activity_Chapter::_internal_award_id() const { - return award_id_; -} -inline uint32_t ActivityConf_Activity_Chapter::award_id() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.Activity.Chapter.award_id) - return _internal_award_id(); -} -inline void ActivityConf_Activity_Chapter::_internal_set_award_id(uint32_t value) { - - award_id_ = value; -} -inline void ActivityConf_Activity_Chapter::set_award_id(uint32_t value) { - _internal_set_award_id(value); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.Activity.Chapter.award_id) -} - -// map section_map = 4 [(.tableau.field) = { -inline int ActivityConf_Activity_Chapter::_internal_section_map_size() const { - return section_map_.size(); -} -inline int ActivityConf_Activity_Chapter::section_map_size() const { - return _internal_section_map_size(); -} -inline void ActivityConf_Activity_Chapter::clear_section_map() { - section_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >& -ActivityConf_Activity_Chapter::_internal_section_map() const { - return section_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >& -ActivityConf_Activity_Chapter::section_map() const { - // @@protoc_insertion_point(field_map:protoconf.ActivityConf.Activity.Chapter.section_map) - return _internal_section_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >* -ActivityConf_Activity_Chapter::_internal_mutable_section_map() { - return section_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Section >* -ActivityConf_Activity_Chapter::mutable_section_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ActivityConf.Activity.Chapter.section_map) - return _internal_mutable_section_map(); -} - -// ------------------------------------------------------------------- - -// ActivityConf_Activity - -// uint64 activity_id = 1 [(.tableau.field) = { -inline void ActivityConf_Activity::clear_activity_id() { - activity_id_ = uint64_t{0u}; -} -inline uint64_t ActivityConf_Activity::_internal_activity_id() const { - return activity_id_; -} -inline uint64_t ActivityConf_Activity::activity_id() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.Activity.activity_id) - return _internal_activity_id(); -} -inline void ActivityConf_Activity::_internal_set_activity_id(uint64_t value) { - - activity_id_ = value; -} -inline void ActivityConf_Activity::set_activity_id(uint64_t value) { - _internal_set_activity_id(value); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.Activity.activity_id) -} - -// string activity_name = 2 [(.tableau.field) = { -inline void ActivityConf_Activity::clear_activity_name() { - activity_name_.ClearToEmpty(); -} -inline const std::string& ActivityConf_Activity::activity_name() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.Activity.activity_name) - return _internal_activity_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ActivityConf_Activity::set_activity_name(ArgT0&& arg0, ArgT... args) { - - activity_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.Activity.activity_name) -} -inline std::string* ActivityConf_Activity::mutable_activity_name() { - std::string* _s = _internal_mutable_activity_name(); - // @@protoc_insertion_point(field_mutable:protoconf.ActivityConf.Activity.activity_name) - return _s; -} -inline const std::string& ActivityConf_Activity::_internal_activity_name() const { - return activity_name_.Get(); -} -inline void ActivityConf_Activity::_internal_set_activity_name(const std::string& value) { - - activity_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* ActivityConf_Activity::_internal_mutable_activity_name() { - - return activity_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* ActivityConf_Activity::release_activity_name() { - // @@protoc_insertion_point(field_release:protoconf.ActivityConf.Activity.activity_name) - return activity_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void ActivityConf_Activity::set_allocated_activity_name(std::string* activity_name) { - if (activity_name != nullptr) { - - } else { - - } - activity_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), activity_name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (activity_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - activity_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.ActivityConf.Activity.activity_name) -} - -// map chapter_map = 3 [(.tableau.field) = { -inline int ActivityConf_Activity::_internal_chapter_map_size() const { - return chapter_map_.size(); -} -inline int ActivityConf_Activity::chapter_map_size() const { - return _internal_chapter_map_size(); -} -inline void ActivityConf_Activity::clear_chapter_map() { - chapter_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >& -ActivityConf_Activity::_internal_chapter_map() const { - return chapter_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >& -ActivityConf_Activity::chapter_map() const { - // @@protoc_insertion_point(field_map:protoconf.ActivityConf.Activity.chapter_map) - return _internal_chapter_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >* -ActivityConf_Activity::_internal_mutable_chapter_map() { - return chapter_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::ActivityConf_Activity_Chapter >* -ActivityConf_Activity::mutable_chapter_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ActivityConf.Activity.chapter_map) - return _internal_mutable_chapter_map(); -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ActivityConf - -// map activity_map = 1 [(.tableau.field) = { -inline int ActivityConf::_internal_activity_map_size() const { - return activity_map_.size(); -} -inline int ActivityConf::activity_map_size() const { - return _internal_activity_map_size(); -} -inline void ActivityConf::clear_activity_map() { - activity_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >& -ActivityConf::_internal_activity_map() const { - return activity_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >& -ActivityConf::activity_map() const { - // @@protoc_insertion_point(field_map:protoconf.ActivityConf.activity_map) - return _internal_activity_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >* -ActivityConf::_internal_mutable_activity_map() { - return activity_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ActivityConf_Activity >* -ActivityConf::mutable_activity_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ActivityConf.activity_map) - return _internal_mutable_activity_map(); -} - -// map bonus_map = 2 [(.tableau.field) = { -inline int ActivityConf::_internal_bonus_map_size() const { - return bonus_map_.size(); -} -inline int ActivityConf::bonus_map_size() const { - return _internal_bonus_map_size(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >& -ActivityConf::_internal_bonus_map() const { - return bonus_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >& -ActivityConf::bonus_map() const { - // @@protoc_insertion_point(field_map:protoconf.ActivityConf.bonus_map) - return _internal_bonus_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >* -ActivityConf::_internal_mutable_bonus_map() { - return bonus_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, ::protoconf::Item >* -ActivityConf::mutable_bonus_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ActivityConf.bonus_map) - return _internal_mutable_bonus_map(); -} - -// string theme_name = 3 [(.tableau.field) = { -inline void ActivityConf::clear_theme_name() { - theme_name_.ClearToEmpty(); -} -inline const std::string& ActivityConf::theme_name() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.theme_name) - return _internal_theme_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ActivityConf::set_theme_name(ArgT0&& arg0, ArgT... args) { - - theme_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.theme_name) -} -inline std::string* ActivityConf::mutable_theme_name() { - std::string* _s = _internal_mutable_theme_name(); - // @@protoc_insertion_point(field_mutable:protoconf.ActivityConf.theme_name) - return _s; -} -inline const std::string& ActivityConf::_internal_theme_name() const { - return theme_name_.Get(); -} -inline void ActivityConf::_internal_set_theme_name(const std::string& value) { - - theme_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* ActivityConf::_internal_mutable_theme_name() { - - return theme_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* ActivityConf::release_theme_name() { - // @@protoc_insertion_point(field_release:protoconf.ActivityConf.theme_name) - return theme_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void ActivityConf::set_allocated_theme_name(std::string* theme_name) { - if (theme_name != nullptr) { - - } else { - - } - theme_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), theme_name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (theme_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - theme_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.ActivityConf.theme_name) -} - -// int32 cost_item_id = 4 [(.tableau.field) = { -inline void ActivityConf::clear_cost_item_id() { - cost_item_id_ = 0; -} -inline int32_t ActivityConf::_internal_cost_item_id() const { - return cost_item_id_; -} -inline int32_t ActivityConf::cost_item_id() const { - // @@protoc_insertion_point(field_get:protoconf.ActivityConf.cost_item_id) - return _internal_cost_item_id(); -} -inline void ActivityConf::_internal_set_cost_item_id(int32_t value) { - - cost_item_id_ = value; -} -inline void ActivityConf::set_cost_item_id(int32_t value) { - _internal_set_cost_item_id(value); - // @@protoc_insertion_point(field_set:protoconf.ActivityConf.cost_item_id) -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// Section - -// uint32 section_id = 1 [(.tableau.field) = { -inline void Section::clear_section_id() { - section_id_ = 0u; -} -inline uint32_t Section::_internal_section_id() const { - return section_id_; -} -inline uint32_t Section::section_id() const { - // @@protoc_insertion_point(field_get:protoconf.Section.section_id) - return _internal_section_id(); -} -inline void Section::_internal_set_section_id(uint32_t value) { - - section_id_ = value; -} -inline void Section::set_section_id(uint32_t value) { - _internal_set_section_id(value); - // @@protoc_insertion_point(field_set:protoconf.Section.section_id) -} - -// string section_name = 2 [(.tableau.field) = { -inline void Section::clear_section_name() { - section_name_.ClearToEmpty(); -} -inline const std::string& Section::section_name() const { - // @@protoc_insertion_point(field_get:protoconf.Section.section_name) - return _internal_section_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Section::set_section_name(ArgT0&& arg0, ArgT... args) { - - section_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.Section.section_name) -} -inline std::string* Section::mutable_section_name() { - std::string* _s = _internal_mutable_section_name(); - // @@protoc_insertion_point(field_mutable:protoconf.Section.section_name) - return _s; -} -inline const std::string& Section::_internal_section_name() const { - return section_name_.Get(); -} -inline void Section::_internal_set_section_name(const std::string& value) { - - section_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Section::_internal_mutable_section_name() { - - return section_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Section::release_section_name() { - // @@protoc_insertion_point(field_release:protoconf.Section.section_name) - return section_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void Section::set_allocated_section_name(std::string* section_name) { - if (section_name != nullptr) { - - } else { - - } - section_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), section_name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (section_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - section_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.Section.section_name) -} - -// repeated .protoconf.Item section_item_list = 3 [(.tableau.field) = { -inline int Section::_internal_section_item_list_size() const { - return section_item_list_.size(); -} -inline int Section::section_item_list_size() const { - return _internal_section_item_list_size(); -} -inline ::protoconf::Item* Section::mutable_section_item_list(int index) { - // @@protoc_insertion_point(field_mutable:protoconf.Section.section_item_list) - return section_item_list_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::protoconf::Item >* -Section::mutable_section_item_list() { - // @@protoc_insertion_point(field_mutable_list:protoconf.Section.section_item_list) - return §ion_item_list_; -} -inline const ::protoconf::Item& Section::_internal_section_item_list(int index) const { - return section_item_list_.Get(index); -} -inline const ::protoconf::Item& Section::section_item_list(int index) const { - // @@protoc_insertion_point(field_get:protoconf.Section.section_item_list) - return _internal_section_item_list(index); -} -inline ::protoconf::Item* Section::_internal_add_section_item_list() { - return section_item_list_.Add(); -} -inline ::protoconf::Item* Section::add_section_item_list() { - ::protoconf::Item* _add = _internal_add_section_item_list(); - // @@protoc_insertion_point(field_add:protoconf.Section.section_item_list) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::protoconf::Item >& -Section::section_item_list() const { - // @@protoc_insertion_point(field_list:protoconf.Section.section_item_list) - return section_item_list_; -} - -// map section_rank_map = 4 [(.tableau.field) = { -inline int Section::_internal_section_rank_map_size() const { - return section_rank_map_.size(); -} -inline int Section::section_rank_map_size() const { - return _internal_section_rank_map_size(); -} -inline void Section::clear_section_rank_map() { - section_rank_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >& -Section::_internal_section_rank_map() const { - return section_rank_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >& -Section::section_rank_map() const { - // @@protoc_insertion_point(field_map:protoconf.Section.section_rank_map) - return _internal_section_rank_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >* -Section::_internal_mutable_section_rank_map() { - return section_rank_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, int32_t >* -Section::mutable_section_rank_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.Section.section_rank_map) - return _internal_mutable_section_rank_map(); -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ChapterConf_Chapter - -// uint64 id = 1 [(.tableau.field) = { -inline void ChapterConf_Chapter::clear_id() { - id_ = uint64_t{0u}; -} -inline uint64_t ChapterConf_Chapter::_internal_id() const { - return id_; -} -inline uint64_t ChapterConf_Chapter::id() const { - // @@protoc_insertion_point(field_get:protoconf.ChapterConf.Chapter.id) - return _internal_id(); -} -inline void ChapterConf_Chapter::_internal_set_id(uint64_t value) { - - id_ = value; -} -inline void ChapterConf_Chapter::set_id(uint64_t value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:protoconf.ChapterConf.Chapter.id) -} - -// string name = 2 [(.tableau.field) = { -inline void ChapterConf_Chapter::clear_name() { - name_.ClearToEmpty(); -} -inline const std::string& ChapterConf_Chapter::name() const { - // @@protoc_insertion_point(field_get:protoconf.ChapterConf.Chapter.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ChapterConf_Chapter::set_name(ArgT0&& arg0, ArgT... args) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.ChapterConf.Chapter.name) -} -inline std::string* ChapterConf_Chapter::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:protoconf.ChapterConf.Chapter.name) - return _s; -} -inline const std::string& ChapterConf_Chapter::_internal_name() const { - return name_.Get(); -} -inline void ChapterConf_Chapter::_internal_set_name(const std::string& value) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* ChapterConf_Chapter::_internal_mutable_name() { - - return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* ChapterConf_Chapter::release_name() { - // @@protoc_insertion_point(field_release:protoconf.ChapterConf.Chapter.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void ChapterConf_Chapter::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.ChapterConf.Chapter.name) -} - -// ------------------------------------------------------------------- - -// ChapterConf - -// map chapter_map = 1 [(.tableau.field) = { -inline int ChapterConf::_internal_chapter_map_size() const { - return chapter_map_.size(); -} -inline int ChapterConf::chapter_map_size() const { - return _internal_chapter_map_size(); -} -inline void ChapterConf::clear_chapter_map() { - chapter_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >& -ChapterConf::_internal_chapter_map() const { - return chapter_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >& -ChapterConf::chapter_map() const { - // @@protoc_insertion_point(field_map:protoconf.ChapterConf.chapter_map) - return _internal_chapter_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >* -ChapterConf::_internal_mutable_chapter_map() { - return chapter_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< uint64_t, ::protoconf::ChapterConf_Chapter >* -ChapterConf::mutable_chapter_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ChapterConf.chapter_map) - return _internal_mutable_chapter_map(); -} - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ThemeConf_Theme - -// string name = 2 [(.tableau.field) = { -inline void ThemeConf_Theme::clear_name() { - name_.ClearToEmpty(); -} -inline const std::string& ThemeConf_Theme::name() const { - // @@protoc_insertion_point(field_get:protoconf.ThemeConf.Theme.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ThemeConf_Theme::set_name(ArgT0&& arg0, ArgT... args) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:protoconf.ThemeConf.Theme.name) -} -inline std::string* ThemeConf_Theme::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:protoconf.ThemeConf.Theme.name) - return _s; -} -inline const std::string& ThemeConf_Theme::_internal_name() const { - return name_.Get(); -} -inline void ThemeConf_Theme::_internal_set_name(const std::string& value) { - - name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* ThemeConf_Theme::_internal_mutable_name() { - - return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* ThemeConf_Theme::release_name() { - // @@protoc_insertion_point(field_release:protoconf.ThemeConf.Theme.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -} -inline void ThemeConf_Theme::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:protoconf.ThemeConf.Theme.name) -} - -// uint64 value = 1 [(.tableau.field) = { -inline void ThemeConf_Theme::clear_value() { - value_ = uint64_t{0u}; -} -inline uint64_t ThemeConf_Theme::_internal_value() const { - return value_; -} -inline uint64_t ThemeConf_Theme::value() const { - // @@protoc_insertion_point(field_get:protoconf.ThemeConf.Theme.value) - return _internal_value(); -} -inline void ThemeConf_Theme::_internal_set_value(uint64_t value) { - - value_ = value; -} -inline void ThemeConf_Theme::set_value(uint64_t value) { - _internal_set_value(value); - // @@protoc_insertion_point(field_set:protoconf.ThemeConf.Theme.value) -} - -// ------------------------------------------------------------------- - -// ThemeConf - -// map theme_map = 1 [(.tableau.field) = { -inline int ThemeConf::_internal_theme_map_size() const { - return theme_map_.size(); -} -inline int ThemeConf::theme_map_size() const { - return _internal_theme_map_size(); -} -inline void ThemeConf::clear_theme_map() { - theme_map_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >& -ThemeConf::_internal_theme_map() const { - return theme_map_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >& -ThemeConf::theme_map() const { - // @@protoc_insertion_point(field_map:protoconf.ThemeConf.theme_map) - return _internal_theme_map(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >* -ThemeConf::_internal_mutable_theme_map() { - return theme_map_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::protoconf::ThemeConf_Theme >* -ThemeConf::mutable_theme_map() { - // @@protoc_insertion_point(field_mutable_map:protoconf.ThemeConf.theme_map) - return _internal_mutable_theme_map(); -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protoconf - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_test_5fconf_2eproto diff --git a/_lab/cpp/src/demo/test_conf.pc.cc b/_lab/cpp/src/demo/test_conf.pc.cc deleted file mode 100644 index 6541e0fe..00000000 --- a/_lab/cpp/src/demo/test_conf.pc.cc +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 -// source: test_conf.proto - -#include "test_conf.pc.h" - -namespace tableau { -const std::string ActivityConf::kProtoName = "ActivityConf"; - -bool ActivityConf::Load(const std::string& dir, Format fmt, const LoadOptions* options /* = nullptr */) { - bool ok = LoadMessage(dir, data_, fmt, options); - return ok ? ProcessAfterLoad() : false; -} - -bool ActivityConf::ProcessAfterLoad() { - // OrderedMap init. - for (auto&& item1 : data_.activity_map()) { - ordered_map_[item1.first] = Activity_OrderedMapValue(Activity_Chapter_OrderedMap(), &item1.second); - auto&& ordered_map1 = ordered_map_[item1.first].first; - for (auto&& item2 : item1.second.chapter_map()) { - ordered_map1[item2.first] = Activity_Chapter_OrderedMapValue(protoconf_Section_OrderedMap(), &item2.second); - auto&& ordered_map2 = ordered_map1[item2.first].first; - for (auto&& item3 : item2.second.section_map()) { - ordered_map2[item3.first] = protoconf_Section_OrderedMapValue(int32_OrderedMap(), &item3.second); - auto&& ordered_map3 = ordered_map2[item3.first].first; - for (auto&& item4 : item3.second.section_rank_map()) { - ordered_map3[item4.first] = item4.second; - } - } - } - } - - // Index init. - // Index: ChapterID - for (auto&& item1 : data_.activity_map()) { - for (auto&& item2 : item1.second.chapter_map()) { - index_chapter_map_[item2.second.chapter_id()].push_back(&item2.second); - } - } - - // Index: ChapterName@NamedChapter - for (auto&& item1 : data_.activity_map()) { - for (auto&& item2 : item1.second.chapter_map()) { - index_named_chapter_map_[item2.second.chapter_name()].push_back(&item2.second); - } - } - - // Index: SectionItemId@Award - for (auto&& item1 : data_.activity_map()) { - for (auto&& item2 : item1.second.chapter_map()) { - for (auto&& item3 : item2.second.section_map()) { - for (auto&& item4 : item3.second.section_item_list()) { - index_award_map_[item4.id()].push_back(&item4); - } - } - } - } - - return true; -} - -const protoconf::ActivityConf::Activity* ActivityConf::Get(uint64_t activity_id) const { - auto iter = data_.activity_map().find(activity_id); - if (iter == data_.activity_map().end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ActivityConf::Activity::Chapter* ActivityConf::Get(uint64_t activity_id, uint32_t chapter_id) const { - const auto* conf = Get(activity_id); - if (conf == nullptr) { - return nullptr; - } - auto iter = conf->chapter_map().find(chapter_id); - if (iter == conf->chapter_map().end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::Section* ActivityConf::Get(uint64_t activity_id, uint32_t chapter_id, uint32_t section_id) const { - const auto* conf = Get(activity_id, chapter_id); - if (conf == nullptr) { - return nullptr; - } - auto iter = conf->section_map().find(section_id); - if (iter == conf->section_map().end()) { - return nullptr; - } - return &iter->second; -} - -const int32_t* ActivityConf::Get(uint64_t activity_id, uint32_t chapter_id, uint32_t section_id, uint32_t key4) const { - const auto* conf = Get(activity_id, chapter_id, section_id); - if (conf == nullptr) { - return nullptr; - } - auto iter = conf->section_rank_map().find(key4); - if (iter == conf->section_rank_map().end()) { - return nullptr; - } - return &iter->second; -} - -const ActivityConf::Activity_OrderedMap* ActivityConf::GetOrderedMap() const { - return &ordered_map_; -} - -const ActivityConf::Activity_Chapter_OrderedMap* ActivityConf::GetOrderedMap(uint64_t activity_id) const { - const auto* conf = GetOrderedMap(); - if (conf == nullptr) { - return nullptr; - } - - auto iter = conf->find(activity_id); - if (iter == conf->end()) { - return nullptr; - } - return &iter->second.first; -} - -const ActivityConf::protoconf_Section_OrderedMap* ActivityConf::GetOrderedMap(uint64_t activity_id, uint32_t chapter_id) const { - const auto* conf = GetOrderedMap(activity_id); - if (conf == nullptr) { - return nullptr; - } - - auto iter = conf->find(chapter_id); - if (iter == conf->end()) { - return nullptr; - } - return &iter->second.first; -} - -const ActivityConf::int32_OrderedMap* ActivityConf::GetOrderedMap(uint64_t activity_id, uint32_t chapter_id, uint32_t section_id) const { - const auto* conf = GetOrderedMap(activity_id, chapter_id); - if (conf == nullptr) { - return nullptr; - } - - auto iter = conf->find(section_id); - if (iter == conf->end()) { - return nullptr; - } - return &iter->second.first; -} - -// Index: ChapterID -const ActivityConf::Index_ChapterMap& ActivityConf::FindChapter() const { return index_chapter_map_ ;} - -const ActivityConf::Index_ChapterVector* ActivityConf::FindChapter(uint32_t chapter_id) const { - auto iter = index_chapter_map_.find(chapter_id); - if (iter == index_chapter_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ActivityConf::Activity::Chapter* ActivityConf::FindFirstChapter(uint32_t chapter_id) const { - auto conf = FindChapter(chapter_id); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - -// Index: ChapterName@NamedChapter -const ActivityConf::Index_NamedChapterMap& ActivityConf::FindNamedChapter() const { return index_named_chapter_map_ ;} - -const ActivityConf::Index_NamedChapterVector* ActivityConf::FindNamedChapter(const std::string& chapter_name) const { - auto iter = index_named_chapter_map_.find(chapter_name); - if (iter == index_named_chapter_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::ActivityConf::Activity::Chapter* ActivityConf::FindFirstNamedChapter(const std::string& chapter_name) const { - auto conf = FindNamedChapter(chapter_name); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - -// Index: SectionItemId@Award -const ActivityConf::Index_AwardMap& ActivityConf::FindAward() const { return index_award_map_ ;} - -const ActivityConf::Index_AwardVector* ActivityConf::FindAward(uint32_t id) const { - auto iter = index_award_map_.find(id); - if (iter == index_award_map_.end()) { - return nullptr; - } - return &iter->second; -} - -const protoconf::Item* ActivityConf::FindFirstAward(uint32_t id) const { - auto conf = FindAward(id); - if (conf == nullptr || conf->size() == 0) { - return nullptr; - } - return (*conf)[0]; -} - - -const std::string ChapterConf::kProtoName = "ChapterConf"; - -bool ChapterConf::Load(const std::string& dir, Format fmt, const LoadOptions* options /* = nullptr */) { - bool ok = LoadMessage(dir, data_, fmt, options); - return ok ? ProcessAfterLoad() : false; -} - -const protoconf::ChapterConf::Chapter* ChapterConf::Get(uint64_t id) const { - auto iter = data_.chapter_map().find(id); - if (iter == data_.chapter_map().end()) { - return nullptr; - } - return &iter->second; -} - -const std::string ThemeConf::kProtoName = "ThemeConf"; - -bool ThemeConf::Load(const std::string& dir, Format fmt, const LoadOptions* options /* = nullptr */) { - bool ok = LoadMessage(dir, data_, fmt, options); - return ok ? ProcessAfterLoad() : false; -} - -const protoconf::ThemeConf::Theme* ThemeConf::Get(const std::string& name) const { - auto iter = data_.theme_map().find(name); - if (iter == data_.theme_map().end()) { - return nullptr; - } - return &iter->second; -} - -} // namespace tableau diff --git a/_lab/cpp/src/demo/test_conf.pc.h b/_lab/cpp/src/demo/test_conf.pc.h deleted file mode 100644 index e7824281..00000000 --- a/_lab/cpp/src/demo/test_conf.pc.h +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT. -// versions: -// - protoc-gen-cpp-tableau-loader v0.4.8 -// - protoc v3.19.3 -// source: test_conf.proto - -#pragma once -#include - -#include "hub.pc.h" -#include "test_conf.pb.h" - -namespace tableau { -class ActivityConf : public Messager { - public: - static const std::string& Name() { return kProtoName; }; - virtual bool Load(const std::string& dir, Format fmt, const LoadOptions* options = nullptr) override; - const protoconf::ActivityConf& Data() const { return data_; }; - - private: - virtual bool ProcessAfterLoad() override final; - - public: - const protoconf::ActivityConf::Activity* Get(uint64_t activity_id) const; - const protoconf::ActivityConf::Activity::Chapter* Get(uint64_t activity_id, uint32_t chapter_id) const; - const protoconf::Section* Get(uint64_t activity_id, uint32_t chapter_id, uint32_t section_id) const; - const int32_t* Get(uint64_t activity_id, uint32_t chapter_id, uint32_t section_id, uint32_t key4) const; - - private: - static const std::string kProtoName; - protoconf::ActivityConf data_; - - // OrderedMap accessers. - public: - using int32_OrderedMap = std::map; - const int32_OrderedMap* GetOrderedMap(uint64_t activity_id, uint32_t chapter_id, uint32_t section_id) const; - - using protoconf_Section_OrderedMapValue = std::pair; - using protoconf_Section_OrderedMap = std::map; - const protoconf_Section_OrderedMap* GetOrderedMap(uint64_t activity_id, uint32_t chapter_id) const; - - using Activity_Chapter_OrderedMapValue = std::pair; - using Activity_Chapter_OrderedMap = std::map; - const Activity_Chapter_OrderedMap* GetOrderedMap(uint64_t activity_id) const; - - using Activity_OrderedMapValue = std::pair; - using Activity_OrderedMap = std::map; - const Activity_OrderedMap* GetOrderedMap() const; - - private: - Activity_OrderedMap ordered_map_; - - // Index accessers. - // Index: ChapterID - public: - using Index_ChapterVector = std::vector; - using Index_ChapterMap = std::unordered_map; - const Index_ChapterMap& FindChapter() const; - const Index_ChapterVector* FindChapter(uint32_t chapter_id) const; - const protoconf::ActivityConf::Activity::Chapter* FindFirstChapter(uint32_t chapter_id) const; - - private: - Index_ChapterMap index_chapter_map_; - - // Index: ChapterName@NamedChapter - public: - using Index_NamedChapterVector = std::vector; - using Index_NamedChapterMap = std::unordered_map; - const Index_NamedChapterMap& FindNamedChapter() const; - const Index_NamedChapterVector* FindNamedChapter(const std::string& chapter_name) const; - const protoconf::ActivityConf::Activity::Chapter* FindFirstNamedChapter(const std::string& chapter_name) const; - - private: - Index_NamedChapterMap index_named_chapter_map_; - - // Index: SectionItemId@Award - public: - using Index_AwardVector = std::vector; - using Index_AwardMap = std::unordered_map; - const Index_AwardMap& FindAward() const; - const Index_AwardVector* FindAward(uint32_t id) const; - const protoconf::Item* FindFirstAward(uint32_t id) const; - - private: - Index_AwardMap index_award_map_; - -}; - -class ChapterConf : public Messager { - public: - static const std::string& Name() { return kProtoName; }; - virtual bool Load(const std::string& dir, Format fmt, const LoadOptions* options = nullptr) override; - const protoconf::ChapterConf& Data() const { return data_; }; - - public: - const protoconf::ChapterConf::Chapter* Get(uint64_t id) const; - - private: - static const std::string kProtoName; - protoconf::ChapterConf data_; -}; - -class ThemeConf : public Messager { - public: - static const std::string& Name() { return kProtoName; }; - virtual bool Load(const std::string& dir, Format fmt, const LoadOptions* options = nullptr) override; - const protoconf::ThemeConf& Data() const { return data_; }; - - public: - const protoconf::ThemeConf::Theme* Get(const std::string& name) const; - - private: - static const std::string kProtoName; - protoconf::ThemeConf data_; -}; - -} // namespace tableau - -namespace protoconf { -// Here are some type aliases for easy use. -using ActivityConfMgr = tableau::ActivityConf; -using ChapterConfMgr = tableau::ChapterConf; -using ThemeConfMgr = tableau::ThemeConf; -} // namespace protoconf diff --git a/_lab/cpp/src/main.cpp b/_lab/cpp/src/main.cpp deleted file mode 100644 index 608471ce..00000000 --- a/_lab/cpp/src/main.cpp +++ /dev/null @@ -1,205 +0,0 @@ -#include -#include -#include - -#include "demo/hub.pc.h" -#include "demo/item_conf.pc.h" -#include "demo/logger.pc.h" -#include "demo/registry.pc.h" -#include "demo/test_conf.pc.h" -#include "protoconf/item_conf.pb.h" - -void WriteFile(const std::string& filename, const std::string& input) { - std::ofstream out(filename); - out << input; - out.close(); -} - -template -class Singleton { - private: - Singleton(const T&) = delete; - Singleton(T&&) = delete; - void operator=(const T&) = delete; - static inline T* GetInstancePtr() { - T* ptr = nullptr; - if (threaded) { - static thread_local T* new_ptr = new T(); - ptr = new_ptr; - } else { - static T* new_ptr = new T(); - ptr = new_ptr; - } - assert(ptr != nullptr); - return ptr; - } - - public: - static inline T& Instance() { return *GetInstancePtr(); } - - protected: - Singleton() = default; -}; - -class MyHub : public Singleton {}; - -// syntactic sugar -template -const std::shared_ptr Get() { - return MyHub::Instance().Get(); -} - -void LogWrite(std::ostream* os, const tableau::log::SourceLocation& loc, const tableau::log::LevelInfo& lvl, - const std::string& content) { - // clang-format off - *os << tableau::log::NowStr() << " " - // << std::this_thread::get_id() << "|" - // << gettid() << " " - << lvl.name << " [" - << loc.filename << ":" << loc.line << "][" - << loc.funcname << "]" - << content - << std::endl << std::flush; - // clang-format on -} - -int main() { - // custom log - tableau::log::DefaultLogger()->SetWriter(LogWrite); - - std::string jsonstr; - // protoconf::ItemConf item; - - // item.set_id(100); - // item.set_name("coin"); - // item.mutable_path()->set_dir("/home/protoconf/"); - // item.mutable_path()->set_name("icon.png"); - - // if (!tableau::Message2JSON(item, jsonstr)) { - // std::cout << "protobuf convert json failed!" << std::endl; - // return 1; - // } - // std::cout << "protobuf convert json done!" << std::endl << jsonstr << std::endl; - - // item.Clear(); - - // std::cout << "-----" << std::endl; - // if (!tableau::Json2Proto(jsonstr, item)) { - // std::cout << "json to protobuf failed!" << std::endl; - // return 1; - // } - // std::cout << "json to protobuf done!" << std::endl - // << "name: " << item.name() << std::endl - // << "dir: " << item.mutable_path()->dir() - // << std::endl; - - std::cout << "-----" << std::endl; - tableau::Registry::Init(); - protoconf::ActivityConf act_conf; - tableau::ProtobufLogHandler(google::protobuf::LOGLEVEL_INFO, "info.cc", 10, "info msg"); - tableau::ProtobufLogHandler(google::protobuf::LOGLEVEL_WARNING, "warn.cc", 10, "warn msg"); - tableau::ProtobufLogHandler(google::protobuf::LOGLEVEL_ERROR, "error.cc", 10, "error msg"); - tableau::ProtobufLogHandler(google::protobuf::LOGLEVEL_FATAL, "fatal.cc", 10, "fatal msg"); - // google::protobuf::SetLogHandler(tableau::ProtobufLogHandler); - // if (!act_conf.ParseFromString("0101010110")) { - // std::cout << "failed to parse" << std::endl; - // return 1; - // } - - bool ok = MyHub::Instance().Load("../../../test/testdata/", [](const std::string& name) { return true; }); - if (!ok) { - std::cout << "protobuf hub load failed: " << tableau::GetErrMsg() << std::endl; - return 1; - } - auto item1 = MyHub::Instance().Get(); - if (!item1) { - std::cout << "protobuf hub get Item failed!" << std::endl; - return 1; - } - std::cout << "item1: " << item1->Data().DebugString() << std::endl; - - jsonstr.clear(); - if (!tableau::Message2JSON(item1->Data(), jsonstr)) { - std::cout << "protobuf convert json failed!" << std::endl; - return 1; - } - WriteFile("./test_item.json", jsonstr); - - auto activity_conf = MyHub::Instance().Get(); - if (!activity_conf) { - std::cout << "protobuf hub get ActivityConf failed!" << std::endl; - return 1; - } - - // std::cout << "acitivity: " << activity_conf->Data().DebugString() << std::endl; - - auto section_conf = activity_conf->Get(100001, 1, 2); - if (!section_conf) { - std::cout << "ActivityConf get section failed!" << std::endl; - return 1; - } - - section_conf = MyHub::Instance().Get(100001, 1, 2); - if (!section_conf) { - std::cout << "ActivityConf Get section failed: " << tableau::GetErrMsg() << std::endl; - return 1; - } - - std::cout << "-----section_conf" << std::endl; - std::cout << section_conf->DebugString() << std::endl; - - auto chapter_ordered_map = - MyHub::Instance().GetOrderedMap( - 100001); - if (!chapter_ordered_map) { - std::cout << "ActivityConf GetOrderedMap chapter failed!" << std::endl; - return 1; - } - - for (auto&& it : *chapter_ordered_map) { - std::cout << "---" << it.first << "-----section_ordered_map" << std::endl; - for (auto&& item : it.second.first) { - std::cout << item.first << std::endl; - } - - std::cout << "---" << it.first << " -----section_map" << std::endl; - for (auto&& item : *it.second.second) { - std::cout << item.first << std::endl; - } - } - - auto section_ordered_map = - MyHub::Instance().GetOrderedMap( - 100001, 1); - if (!section_ordered_map) { - std::cout << "ActivityConf GetOrderedMap section failed!" << std::endl; - return 1; - } - - std::cout << "-----section_ordered_map" << std::endl; - for (auto&& item : *section_ordered_map) { - std::cout << item.first << std::endl; - } - - std::cout << "-----Index accessers test" << std::endl; - auto index_chapters = activity_conf->FindChapter(1); - if (!index_chapters) { - std::cout << "ActivityConf FindChapter failed!" << std::endl; - return 1; - } - std::cout << "-----FindChapter" << std::endl; - for (auto&& chapter : *index_chapters) { - std::cout << chapter->ShortDebugString() << std::endl; - } - - auto index_first_chapter = activity_conf->FindFirstChapter(1); - if (!index_first_chapter) { - std::cout << "ActivityConf FindFirstChapter failed!" << std::endl; - return 1; - } - - std::cout << "-----FindFirstChapter" << std::endl; - std::cout << index_first_chapter->ShortDebugString() << std::endl; - - return 0; -} diff --git a/_lab/go/.gitignore b/_lab/go/.gitignore deleted file mode 100644 index 36d5dd61..00000000 --- a/_lab/go/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -protoconf -go \ No newline at end of file diff --git a/_lab/go/gen.sh b/_lab/go/gen.sh deleted file mode 100755 index a7c87928..00000000 --- a/_lab/go/gen.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# set -eux -set -e -set -o pipefail - -cd "$(git rev-parse --show-toplevel)" -PROTOC="./third_party/_submodules/protobuf/src/protoc" -PROTOBUF_PROTO="./third_party/_submodules/protobuf/src" -TABLEAU_PROTO="./third_party/_submodules/tableau/proto" -PROTOCONF_IN="./test/proto" -PROTOCONF_OUT="./_lab/go/protoconf" - -# remove old generated files -rm -rfv "$PROTOCONF_OUT" -mkdir -p "$PROTOCONF_OUT" -${PROTOC} \ ---go_out="$PROTOCONF_OUT" \ ---go_opt=paths=source_relative \ ---proto_path="$PROTOBUF_PROTO" \ ---proto_path="$TABLEAU_PROTO" \ ---proto_path="$PROTOCONF_IN" \ -"$PROTOCONF_IN"/* diff --git a/_lab/go/go.mod b/_lab/go/go.mod deleted file mode 100644 index 14c6e694..00000000 --- a/_lab/go/go.mod +++ /dev/null @@ -1,38 +0,0 @@ -module github.com/tableauio/loader/_lab/go - -go 1.17 - -require ( - github.com/pkg/errors v0.9.1 - github.com/tableauio/tableau v0.10.6-0.20221019082252-50078ad9c88b - google.golang.org/protobuf v1.28.0 -) - -require ( - github.com/antchfx/xmlquery v1.3.8 // indirect - github.com/antchfx/xpath v1.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emirpasic/gods v1.12.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect - github.com/jhump/protoreflect v1.12.0 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/richardlehane/mscfb v1.0.4 // indirect - github.com/richardlehane/msoleps v1.0.1 // indirect - github.com/rogpeppe/go-internal v1.8.1 // indirect - github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 // indirect - github.com/xuri/excelize/v2 v2.6.0 // indirect - github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.17.0 // indirect - golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 // indirect - golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect -) diff --git a/_lab/go/go.sum b/_lab/go/go.sum deleted file mode 100644 index 49e89b00..00000000 --- a/_lab/go/go.sum +++ /dev/null @@ -1,231 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/antchfx/xmlquery v1.3.8 h1:dRnBQM3Vk5BVJFvFwsHOLAox+mEiNw5ZusaUNCrEdoU= -github.com/antchfx/xmlquery v1.3.8/go.mod h1:wojC/BxjEkjJt6dPiAqUzoXO5nIMWtxHS8PD8TmN4ks= -github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8= -github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= -github.com/jhump/protoreflect v1.12.0 h1:1NQ4FpWMgn3by/n1X0fbeKEUxP1wBt7+Oitpv01HR10= -github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/richardlehane/mscfb v1.0.3 h1:rD8TBkYWkObWO0oLDFCbwMeZ4KoalxQy+QgniCj3nKI= -github.com/richardlehane/mscfb v1.0.3/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= -github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= -github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= -github.com/richardlehane/msoleps v1.0.1 h1:RfrALnSNXzmXLbGct/P2b4xkFz4e8Gmj/0Vj9M9xC1o= -github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tableauio/tableau v0.9.9 h1:bAqCmPoBsIl7zxPmRlepWOqw0SztTkmWkXkFAkjanCE= -github.com/tableauio/tableau v0.9.9/go.mod h1:tvQASXO4Hxb1YkZVL+HkOlSz529N93cEgOij9Gwp2cw= -github.com/tableauio/tableau v0.10.6-0.20221019074623-f455cd9b78d8 h1:FiMntJ92mTvdQPy7SsrUe83vXAnyG8miTj2ZkgHQKsI= -github.com/tableauio/tableau v0.10.6-0.20221019074623-f455cd9b78d8/go.mod h1:htRsBqz8X5TmfIJPduRNw/RB9OFwwN6GId+EiT1ZLSg= -github.com/tableauio/tableau v0.10.6-0.20221019081809-f5a8649c2951 h1:yhmRcU9jACLF5m7fGg0cVXDXps/6yoFI5nqTbdkARTw= -github.com/tableauio/tableau v0.10.6-0.20221019081809-f5a8649c2951/go.mod h1:htRsBqz8X5TmfIJPduRNw/RB9OFwwN6GId+EiT1ZLSg= -github.com/tableauio/tableau v0.10.6-0.20221019082252-50078ad9c88b h1:FjITqsLomMw9M2z6jQHLbwqEygnPtlSwW9NHUaRmGY4= -github.com/tableauio/tableau v0.10.6-0.20221019082252-50078ad9c88b/go.mod h1:htRsBqz8X5TmfIJPduRNw/RB9OFwwN6GId+EiT1ZLSg= -github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3 h1:EpI0bqf/eX9SdZDwlMmahKM+CDBgNbsXMhsN28XrM8o= -github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= -github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8 h1:3X7aE0iLKJ5j+tz58BpvIZkXNV7Yq4jC93Z/rbN2Fxk= -github.com/xuri/efp v0.0.0-20220407160117-ad0f7a785be8/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= -github.com/xuri/excelize/v2 v2.4.1 h1:veeeFLAJwsNEBPBlDepzPIYS1eLyBVcXNZUW79exZ1E= -github.com/xuri/excelize/v2 v2.4.1/go.mod h1:rSu0C3papjzxQA3sdK8cU544TebhrPUoTOaGPIh0Q1A= -github.com/xuri/excelize/v2 v2.6.0 h1:m/aXAzSAqxgt74Nfd+sNzpzVKhTGl7+S9nbG4A57mF4= -github.com/xuri/excelize/v2 v2.6.0/go.mod h1:Q1YetlHesXEKwGFfeJn7PfEZz2IvHb6wdOeYjBxVcVs= -github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 h1:OAmKAfT06//esDdpi/DZ8Qsdt4+M5+ltca05dA5bG2M= -github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 h1:iU7T1X1J6yxDr0rda54sWGkHgOp5XJrqm79gcNlC2VM= -golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= -golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3 h1:EN5+DfgmRMvRUrMGERW2gQl3Vc+Z7ZMnI/xdEpPSf0c= -golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/_lab/go/loader_test.go b/_lab/go/loader_test.go deleted file mode 100644 index f705ab74..00000000 --- a/_lab/go/loader_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import ( - "testing" - - "github.com/tableauio/tableau/options" -) - -func Test_Loader(t *testing.T) { - err := GetHub().Load("../../testdata/", nil, options.JSON) - if err != nil { - panic(err) - } - - conf := GetHub().GetActivityConf() - if conf == nil { - panic("ActivityConf is nil") - } - chapter, err := conf.Get2(100001, 1) - if err != nil { - panic(err) - } - t.Logf("ActivityConf: %v", chapter) -} \ No newline at end of file diff --git a/_lab/go/main.go b/_lab/go/main.go deleted file mode 100644 index 34687f58..00000000 --- a/_lab/go/main.go +++ /dev/null @@ -1,67 +0,0 @@ -package main - -import ( - "fmt" - "sync" - "time" - - "github.com/tableauio/loader/_lab/go/tableau" - "github.com/tableauio/tableau/format" - "github.com/tableauio/tableau/load" -) - -type MyHub struct { - *tableau.Hub -} - -var hubSingleton *MyHub -var once sync.Once - -// GetHub return the singleton of MyHub -func GetHub() *MyHub { - once.Do(func() { - // new instance - hubSingleton = &MyHub{ - Hub: tableau.NewHub(), - } - }) - return hubSingleton -} - -func main() { - err := GetHub().Load("../../test/testdata/", nil, format.JSON, load.IgnoreUnknownFields(true)) - if err != nil { - panic(err) - } - - conf := GetHub().GetActivityConf() - if conf == nil { - panic("ActivityConf is nil") - } - chapter, err := conf.Get3(100001, 1, 2) - if err != nil { - fmt.Println(err) - } - if err := conf.Check(GetHub().Hub); err != nil { - panic(err) - } - fmt.Printf("ActivityConf: %v\n", chapter) - - debug() - time.AfterFunc(time.Second*5, func() { - err := GetHub().Load("../../test/testdata/", nil, format.JSON, load.IgnoreUnknownFields(true)) - if err != nil { - panic(err) - } - debug() - }) - time.Sleep(time.Second * 30) -} - -func debug() { - itemConf := GetHub().GetItemConf() - if itemConf == nil { - panic("ItemConf is nil") - } - fmt.Printf("ItemConf: %v\n", itemConf.Data()) -} diff --git a/_lab/go/tableau/code/code.go b/_lab/go/tableau/code/code.go deleted file mode 100644 index eba9ed50..00000000 --- a/_lab/go/tableau/code/code.go +++ /dev/null @@ -1,9 +0,0 @@ -package code - -type Code int - -const ( - Success Code = iota - NotFound - Unknown -) diff --git a/_lab/go/tableau/hub.pc.go b/_lab/go/tableau/hub.pc.go deleted file mode 100644 index 1e232c3a..00000000 --- a/_lab/go/tableau/hub.pc.go +++ /dev/null @@ -1,122 +0,0 @@ -package tableau - -import ( - "fmt" - "sync" - - "github.com/pkg/errors" - "github.com/tableauio/tableau/format" - "github.com/tableauio/tableau/load" -) - -type Messager interface { - Checker - Name() string - Load(dir string, fmt format.Format, options ...load.Option) error -} - -type Checker interface { - Messager() Messager - Check(hub *Hub) error - CheckCompatibility(hub, newHub *Hub) error -} - -type MessagerMap = map[string]Messager -type MessagerGenerator = func() Messager -type Registrar struct { - Generators map[string]MessagerGenerator -} - -func NewRegistrar() *Registrar { - return &Registrar{ - Generators: map[string]MessagerGenerator{}, - } -} - -func (r *Registrar) Register(name string, gen MessagerGenerator) { - r.Generators[name] = gen -} - -var registrarSingleton *Registrar -var once sync.Once - -func getRegistrar() *Registrar { - once.Do(func() { - registrarSingleton = NewRegistrar() - }) - return registrarSingleton -} - -func register(name string, gen MessagerGenerator) { - getRegistrar().Register(name, gen) -} - -type Filter interface { - Filter(name string) bool -} - -func BoolToInt(ok bool) int { - if ok { - return 1 - } - return 0 -} - -// Hub is the holder for managing configurations. -type Hub struct { - messagerMap MessagerMap -} - -func NewHub() *Hub { - return &Hub{ - messagerMap: MessagerMap{}, - } -} - -func (h *Hub) NewMessagerMap(filter Filter) MessagerMap { - messagerMap := MessagerMap{} - for name, gen := range getRegistrar().Generators { - if filter == nil || filter.Filter(name) { - messagerMap[name] = gen() - } - } - return messagerMap -} - -func (h *Hub) SetMessagerMap(messagerMap MessagerMap) { - h.messagerMap = messagerMap -} - -func (h *Hub) Load(dir string, filter Filter, format format.Format, options ...load.Option) error { - messagerMap := h.NewMessagerMap(filter) - for name, msger := range messagerMap { - if err := msger.Load(dir, format, options...); err != nil { - return errors.WithMessagef(err, "failed to load: %v", name) - } - fmt.Println("Loaded: " + msger.Name()) - } - h.SetMessagerMap(messagerMap) - return nil -} - -// Auto-generated getters below - -func (h *Hub) GetActivityConf() *ActivityConf { - msger := h.messagerMap["ActivityConf"] - if msger != nil { - if conf, ok := msger.(*ActivityConf); ok { - return conf - } - } - return nil -} - -func (h *Hub) GetItemConf() *ItemConf { - msger := h.messagerMap["ItemConf"] - if msger != nil { - if conf, ok := msger.(*ItemConf); ok { - return conf - } - } - return nil -} diff --git a/_lab/go/tableau/item_conf.pc.go b/_lab/go/tableau/item_conf.pc.go deleted file mode 100644 index c77175d0..00000000 --- a/_lab/go/tableau/item_conf.pc.go +++ /dev/null @@ -1,58 +0,0 @@ -package tableau - -import ( - "github.com/tableauio/loader/_lab/go/protoconf" - "github.com/tableauio/loader/_lab/go/tableau/code" - "github.com/tableauio/loader/_lab/go/tableau/xerrors" - "github.com/tableauio/tableau/format" - "github.com/tableauio/tableau/load" -) - -type ItemConf struct { - data protoconf.ItemConf -} - -func (x *ItemConf) Name() string { - return string((&x.data).ProtoReflect().Descriptor().Name()) -} - -func (x *ItemConf) Data() *protoconf.ItemConf { - return &x.data -} - -// Messager is used to implement Checker interface. -func (x *ItemConf) Messager() Messager { - return x -} - -// Check is used to implement Checker interface. -func (x *ItemConf) Check(hub *Hub) error { - return nil -} - -// CheckCompatibility is used to implement Checker interface. -func (x *ItemConf) CheckCompatibility(hub, newHub *Hub) error { - return nil -} - -func (x *ItemConf) Load(dir string, format format.Format, options ...load.Option) error { - return load.Load(&x.data, dir, format, options...) -} - -func (x *ItemConf) Get1(key1 uint32) (*protoconf.ItemConf_Item, error) { - d := x.data.ItemMap - if d == nil { - return nil, xerrors.Errorf(code.Nil, "ItemMap is nil") - } - if val, ok := d[key1]; !ok { - return nil, xerrors.Errorf(code.NotFound, "key1(%v)not found", key1) - } else { - return val, nil - } -} - -func init() { - register("ItemConf", func() Messager { - return &ItemConf{} - }) -} diff --git a/_lab/go/tableau/test.pc.go b/_lab/go/tableau/test.pc.go deleted file mode 100644 index 648aa43c..00000000 --- a/_lab/go/tableau/test.pc.go +++ /dev/null @@ -1,122 +0,0 @@ -package tableau - -import ( - "fmt" - - "github.com/tableauio/loader/_lab/go/protoconf" - "github.com/tableauio/loader/_lab/go/tableau/code" - "github.com/tableauio/loader/_lab/go/tableau/xerrors" - "github.com/tableauio/tableau/format" - "github.com/tableauio/tableau/load" -) - -type ActivityConf struct { - data protoconf.ActivityConf -} - -func (x *ActivityConf) Name() string { - return string((&x.data).ProtoReflect().Descriptor().Name()) -} - -func (x *ActivityConf) Data() *protoconf.ActivityConf { - return &x.data -} - -// Messager is used to implement Checker interface. -func (x *ActivityConf) Messager() Messager { - return x -} - -// Check is used to implement Checker interface. -func (x *ActivityConf) Check(hub *Hub) error { - conf := hub.GetItemConf() - if conf == nil { - return fmt.Errorf("ItemConf is nil") - } - for _, val1 := range x.data.ActivityMap { - for key2 := range val1.ChapterMap { - if _, ok := conf.Data().ItemMap[key2]; !ok { - return fmt.Errorf("refer: %v not found in ItemConf.ID", key2) - } - } - } - return nil -} - -// CheckCompatibility is used to implement Checker interface. -func (x *ActivityConf) CheckCompatibility(hub, newHub *Hub) error { - return nil -} - -func (x *ActivityConf) Load(dir string, fmt format.Format, options ...load.Option) error { - return load.Load(&x.data, dir, fmt, options...) -} - -func (x *ActivityConf) Get1(key1 uint64) (*protoconf.ActivityConf_Activity, error) { - d := x.data.ActivityMap - if d == nil { - return nil, xerrors.Errorf(code.Nil, "ActivityMap is nil") - } - if val, ok := d[key1]; !ok { - return nil, xerrors.Errorf(code.NotFound, "key1(%v) not found", key1) - } else { - return val, nil - } -} - -func (x *ActivityConf) Get2(key1 uint64, key2 uint32) (*protoconf.ActivityConf_Activity_Chapter, error) { - conf, err := x.Get1(key1) - if err != nil { - return nil, err - } - - d := conf.ChapterMap - if d == nil { - return nil, xerrors.Errorf(code.Nil, "ChapterMap is nil") - } - if val, ok := d[key2]; !ok { - return nil, xerrors.Errorf(code.NotFound, "key2(%v) not found", key2) - } else { - return val, nil - } -} - -func (x *ActivityConf) Get3(key1 uint64, key2 uint32, key3 uint32) (*protoconf.Section, error) { - conf, err := x.Get2(key1, key2) - if err != nil { - return nil, err - } - - d := conf.SectionMap - if d == nil { - return nil, xerrors.Errorf(code.Nil, "ChapterMap is nil") - } - if val, ok := d[key3]; !ok { - return nil, xerrors.Errorf(code.NotFound, "key3(%v) not found", key3) - } else { - return val, nil - } -} - -func (x *ActivityConf) Get4(key1 uint64, key2 uint32, key3 uint32, key4 uint32) (int32, error) { - conf, err := x.Get3(key1, key2, key3) - if err != nil { - return 0, err - } - - d := conf.SectionRankMap - if d == nil { - return 0, xerrors.Errorf(code.Nil, "SectionRankMap is nil") - } - if val, ok := d[key4]; !ok { - return 0, xerrors.Errorf(code.NotFound, "key4(%v)not found", key1) - } else { - return val, nil - } -} - -func init() { - register("ActivityConf", func() Messager { - return &ActivityConf{} - }) -} diff --git a/_lab/go/tableau/xerrors/xerrors.go b/_lab/go/tableau/xerrors/xerrors.go deleted file mode 100644 index 1ea2e99e..00000000 --- a/_lab/go/tableau/xerrors/xerrors.go +++ /dev/null @@ -1,34 +0,0 @@ -package xerrors - -import ( - "fmt" - - "github.com/tableauio/loader/_lab/go/tableau/code" -) - -type Error struct { - code code.Code - cause error -} - -func (e *Error) Error() string { - return fmt.Sprintf("code: %d, cause: %+v", e.code, e.cause) -} - -func Errorf(code code.Code, format string, args ...interface{}) error { - return &Error{ - code: code, - cause: fmt.Errorf(format, args...), - } -} - -func Code(err error) code.Code { - if ferr, ok := err.(*Error); ok { - return ferr.code - } - return code.Unknown -} - -func Is(err error, code code.Code) bool { - return Code(err) == code -}