1038 lines
36 KiB
C++
1038 lines
36 KiB
C++
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||
|
|
// source: hints.proto
|
||
|
|
|
||
|
|
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
||
|
|
#include "hints.pb.h"
|
||
|
|
|
||
|
|
#include <algorithm>
|
||
|
|
|
||
|
|
#include <google/protobuf/stubs/common.h>
|
||
|
|
#include <google/protobuf/stubs/port.h>
|
||
|
|
#include <google/protobuf/stubs/once.h>
|
||
|
|
#include <google/protobuf/io/coded_stream.h>
|
||
|
|
#include <google/protobuf/wire_format_lite_inl.h>
|
||
|
|
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
|
||
|
|
// @@protoc_insertion_point(includes)
|
||
|
|
|
||
|
|
namespace optimization_guide {
|
||
|
|
namespace proto {
|
||
|
|
class OptimizationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Optimization> {
|
||
|
|
} _Optimization_default_instance_;
|
||
|
|
class HintDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Hint> {
|
||
|
|
} _Hint_default_instance_;
|
||
|
|
class ConfigurationDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Configuration> {
|
||
|
|
} _Configuration_default_instance_;
|
||
|
|
|
||
|
|
namespace protobuf_hints_2eproto {
|
||
|
|
|
||
|
|
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
|
||
|
|
const TableStruct::entries[] = {
|
||
|
|
{0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
|
||
|
|
};
|
||
|
|
|
||
|
|
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
|
||
|
|
const TableStruct::aux[] = {
|
||
|
|
::google::protobuf::internal::AuxillaryParseTableField(),
|
||
|
|
};
|
||
|
|
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
|
||
|
|
TableStruct::schema[] = {
|
||
|
|
{ NULL, NULL, 0, -1, -1, false },
|
||
|
|
{ NULL, NULL, 0, -1, -1, false },
|
||
|
|
{ NULL, NULL, 0, -1, -1, false },
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
void TableStruct::Shutdown() {
|
||
|
|
_Optimization_default_instance_.Shutdown();
|
||
|
|
_Hint_default_instance_.Shutdown();
|
||
|
|
_Configuration_default_instance_.Shutdown();
|
||
|
|
}
|
||
|
|
|
||
|
|
void TableStruct::InitDefaultsImpl() {
|
||
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||
|
|
|
||
|
|
::google::protobuf::internal::InitProtobufDefaults();
|
||
|
|
_Optimization_default_instance_.DefaultConstruct();
|
||
|
|
_Hint_default_instance_.DefaultConstruct();
|
||
|
|
_Configuration_default_instance_.DefaultConstruct();
|
||
|
|
}
|
||
|
|
|
||
|
|
void InitDefaults() {
|
||
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
||
|
|
::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
|
||
|
|
}
|
||
|
|
void AddDescriptorsImpl() {
|
||
|
|
InitDefaults();
|
||
|
|
::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
|
||
|
|
}
|
||
|
|
|
||
|
|
void AddDescriptors() {
|
||
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
||
|
|
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace protobuf_hints_2eproto
|
||
|
|
|
||
|
|
bool OptimizationType_IsValid(int value) {
|
||
|
|
switch (value) {
|
||
|
|
case 0:
|
||
|
|
case 1:
|
||
|
|
return true;
|
||
|
|
default:
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
bool KeyRepresentation_IsValid(int value) {
|
||
|
|
switch (value) {
|
||
|
|
case 0:
|
||
|
|
case 1:
|
||
|
|
return true;
|
||
|
|
default:
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// ===================================================================
|
||
|
|
|
||
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||
|
|
const int Optimization::kOptimizationTypeFieldNumber;
|
||
|
|
const int Optimization::kInflationPercentFieldNumber;
|
||
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||
|
|
|
||
|
|
Optimization::Optimization()
|
||
|
|
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
|
||
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
||
|
|
protobuf_hints_2eproto::InitDefaults();
|
||
|
|
}
|
||
|
|
SharedCtor();
|
||
|
|
// @@protoc_insertion_point(constructor:optimization_guide.proto.Optimization)
|
||
|
|
}
|
||
|
|
Optimization::Optimization(const Optimization& from)
|
||
|
|
: ::google::protobuf::MessageLite(),
|
||
|
|
_internal_metadata_(NULL),
|
||
|
|
_has_bits_(from._has_bits_),
|
||
|
|
_cached_size_(0) {
|
||
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||
|
|
::memcpy(&inflation_percent_, &from.inflation_percent_,
|
||
|
|
static_cast<size_t>(reinterpret_cast<char*>(&optimization_type_) -
|
||
|
|
reinterpret_cast<char*>(&inflation_percent_)) + sizeof(optimization_type_));
|
||
|
|
// @@protoc_insertion_point(copy_constructor:optimization_guide.proto.Optimization)
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::SharedCtor() {
|
||
|
|
_cached_size_ = 0;
|
||
|
|
::memset(&inflation_percent_, 0, static_cast<size_t>(
|
||
|
|
reinterpret_cast<char*>(&optimization_type_) -
|
||
|
|
reinterpret_cast<char*>(&inflation_percent_)) + sizeof(optimization_type_));
|
||
|
|
}
|
||
|
|
|
||
|
|
Optimization::~Optimization() {
|
||
|
|
// @@protoc_insertion_point(destructor:optimization_guide.proto.Optimization)
|
||
|
|
SharedDtor();
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::SharedDtor() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::SetCachedSize(int size) const {
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||
|
|
_cached_size_ = size;
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||
|
|
}
|
||
|
|
const Optimization& Optimization::default_instance() {
|
||
|
|
protobuf_hints_2eproto::InitDefaults();
|
||
|
|
return *internal_default_instance();
|
||
|
|
}
|
||
|
|
|
||
|
|
Optimization* Optimization::New(::google::protobuf::Arena* arena) const {
|
||
|
|
Optimization* n = new Optimization;
|
||
|
|
if (arena != NULL) {
|
||
|
|
arena->Own(n);
|
||
|
|
}
|
||
|
|
return n;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::Clear() {
|
||
|
|
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.Optimization)
|
||
|
|
if (_has_bits_[0 / 32] & 3u) {
|
||
|
|
::memset(&inflation_percent_, 0, static_cast<size_t>(
|
||
|
|
reinterpret_cast<char*>(&optimization_type_) -
|
||
|
|
reinterpret_cast<char*>(&inflation_percent_)) + sizeof(optimization_type_));
|
||
|
|
}
|
||
|
|
_has_bits_.Clear();
|
||
|
|
_internal_metadata_.Clear();
|
||
|
|
}
|
||
|
|
|
||
|
|
bool Optimization::MergePartialFromCodedStream(
|
||
|
|
::google::protobuf::io::CodedInputStream* input) {
|
||
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
||
|
|
::google::protobuf::uint32 tag;
|
||
|
|
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
|
||
|
|
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
|
||
|
|
&::google::protobuf::internal::InternalMetadataWithArenaLite::
|
||
|
|
mutable_unknown_fields));
|
||
|
|
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
|
||
|
|
&unknown_fields_string, false);
|
||
|
|
// @@protoc_insertion_point(parse_start:optimization_guide.proto.Optimization)
|
||
|
|
for (;;) {
|
||
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||
|
|
tag = p.first;
|
||
|
|
if (!p.second) goto handle_unusual;
|
||
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||
|
|
// optional .optimization_guide.proto.OptimizationType optimization_type = 1;
|
||
|
|
case 1: {
|
||
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
||
|
|
static_cast< ::google::protobuf::uint8>(8u)) {
|
||
|
|
int value;
|
||
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
||
|
|
input, &value)));
|
||
|
|
if (::optimization_guide::proto::OptimizationType_IsValid(value)) {
|
||
|
|
set_optimization_type(static_cast< ::optimization_guide::proto::OptimizationType >(value));
|
||
|
|
} else {
|
||
|
|
unknown_fields_stream.WriteVarint32(8u);
|
||
|
|
unknown_fields_stream.WriteVarint32(
|
||
|
|
static_cast< ::google::protobuf::uint32>(value));
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
goto handle_unusual;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional int64 inflation_percent = 2;
|
||
|
|
case 2: {
|
||
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
||
|
|
static_cast< ::google::protobuf::uint8>(16u)) {
|
||
|
|
set_has_inflation_percent();
|
||
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||
|
|
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
|
||
|
|
input, &inflation_percent_)));
|
||
|
|
} else {
|
||
|
|
goto handle_unusual;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
default: {
|
||
|
|
handle_unusual:
|
||
|
|
if (tag == 0 ||
|
||
|
|
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||
|
|
goto success;
|
||
|
|
}
|
||
|
|
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
|
||
|
|
input, tag, &unknown_fields_stream));
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
success:
|
||
|
|
// @@protoc_insertion_point(parse_success:optimization_guide.proto.Optimization)
|
||
|
|
return true;
|
||
|
|
failure:
|
||
|
|
// @@protoc_insertion_point(parse_failure:optimization_guide.proto.Optimization)
|
||
|
|
return false;
|
||
|
|
#undef DO_
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::SerializeWithCachedSizes(
|
||
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
||
|
|
// @@protoc_insertion_point(serialize_start:optimization_guide.proto.Optimization)
|
||
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
||
|
|
(void) cached_has_bits;
|
||
|
|
|
||
|
|
cached_has_bits = _has_bits_[0];
|
||
|
|
// optional .optimization_guide.proto.OptimizationType optimization_type = 1;
|
||
|
|
if (cached_has_bits & 0x00000002u) {
|
||
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
||
|
|
1, this->optimization_type(), output);
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional int64 inflation_percent = 2;
|
||
|
|
if (cached_has_bits & 0x00000001u) {
|
||
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->inflation_percent(), output);
|
||
|
|
}
|
||
|
|
|
||
|
|
output->WriteRaw(unknown_fields().data(),
|
||
|
|
static_cast<int>(unknown_fields().size()));
|
||
|
|
// @@protoc_insertion_point(serialize_end:optimization_guide.proto.Optimization)
|
||
|
|
}
|
||
|
|
|
||
|
|
size_t Optimization::ByteSizeLong() const {
|
||
|
|
// @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.Optimization)
|
||
|
|
size_t total_size = 0;
|
||
|
|
|
||
|
|
total_size += unknown_fields().size();
|
||
|
|
|
||
|
|
if (_has_bits_[0 / 32] & 3u) {
|
||
|
|
// optional int64 inflation_percent = 2;
|
||
|
|
if (has_inflation_percent()) {
|
||
|
|
total_size += 1 +
|
||
|
|
::google::protobuf::internal::WireFormatLite::Int64Size(
|
||
|
|
this->inflation_percent());
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional .optimization_guide.proto.OptimizationType optimization_type = 1;
|
||
|
|
if (has_optimization_type()) {
|
||
|
|
total_size += 1 +
|
||
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->optimization_type());
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||
|
|
_cached_size_ = cached_size;
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||
|
|
return total_size;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::CheckTypeAndMergeFrom(
|
||
|
|
const ::google::protobuf::MessageLite& from) {
|
||
|
|
MergeFrom(*::google::protobuf::down_cast<const Optimization*>(&from));
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::MergeFrom(const Optimization& from) {
|
||
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.Optimization)
|
||
|
|
GOOGLE_DCHECK_NE(&from, this);
|
||
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
||
|
|
(void) cached_has_bits;
|
||
|
|
|
||
|
|
cached_has_bits = from._has_bits_[0];
|
||
|
|
if (cached_has_bits & 3u) {
|
||
|
|
if (cached_has_bits & 0x00000001u) {
|
||
|
|
inflation_percent_ = from.inflation_percent_;
|
||
|
|
}
|
||
|
|
if (cached_has_bits & 0x00000002u) {
|
||
|
|
optimization_type_ = from.optimization_type_;
|
||
|
|
}
|
||
|
|
_has_bits_[0] |= cached_has_bits;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::CopyFrom(const Optimization& from) {
|
||
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:optimization_guide.proto.Optimization)
|
||
|
|
if (&from == this) return;
|
||
|
|
Clear();
|
||
|
|
MergeFrom(from);
|
||
|
|
}
|
||
|
|
|
||
|
|
bool Optimization::IsInitialized() const {
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Optimization::Swap(Optimization* other) {
|
||
|
|
if (other == this) return;
|
||
|
|
InternalSwap(other);
|
||
|
|
}
|
||
|
|
void Optimization::InternalSwap(Optimization* other) {
|
||
|
|
std::swap(inflation_percent_, other->inflation_percent_);
|
||
|
|
std::swap(optimization_type_, other->optimization_type_);
|
||
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||
|
|
std::swap(_cached_size_, other->_cached_size_);
|
||
|
|
}
|
||
|
|
|
||
|
|
::std::string Optimization::GetTypeName() const {
|
||
|
|
return "optimization_guide.proto.Optimization";
|
||
|
|
}
|
||
|
|
|
||
|
|
#if PROTOBUF_INLINE_NOT_IN_HEADERS
|
||
|
|
// Optimization
|
||
|
|
|
||
|
|
// optional .optimization_guide.proto.OptimizationType optimization_type = 1;
|
||
|
|
bool Optimization::has_optimization_type() const {
|
||
|
|
return (_has_bits_[0] & 0x00000002u) != 0;
|
||
|
|
}
|
||
|
|
void Optimization::set_has_optimization_type() {
|
||
|
|
_has_bits_[0] |= 0x00000002u;
|
||
|
|
}
|
||
|
|
void Optimization::clear_has_optimization_type() {
|
||
|
|
_has_bits_[0] &= ~0x00000002u;
|
||
|
|
}
|
||
|
|
void Optimization::clear_optimization_type() {
|
||
|
|
optimization_type_ = 0;
|
||
|
|
clear_has_optimization_type();
|
||
|
|
}
|
||
|
|
::optimization_guide::proto::OptimizationType Optimization::optimization_type() const {
|
||
|
|
// @@protoc_insertion_point(field_get:optimization_guide.proto.Optimization.optimization_type)
|
||
|
|
return static_cast< ::optimization_guide::proto::OptimizationType >(optimization_type_);
|
||
|
|
}
|
||
|
|
void Optimization::set_optimization_type(::optimization_guide::proto::OptimizationType value) {
|
||
|
|
assert(::optimization_guide::proto::OptimizationType_IsValid(value));
|
||
|
|
set_has_optimization_type();
|
||
|
|
optimization_type_ = value;
|
||
|
|
// @@protoc_insertion_point(field_set:optimization_guide.proto.Optimization.optimization_type)
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional int64 inflation_percent = 2;
|
||
|
|
bool Optimization::has_inflation_percent() const {
|
||
|
|
return (_has_bits_[0] & 0x00000001u) != 0;
|
||
|
|
}
|
||
|
|
void Optimization::set_has_inflation_percent() {
|
||
|
|
_has_bits_[0] |= 0x00000001u;
|
||
|
|
}
|
||
|
|
void Optimization::clear_has_inflation_percent() {
|
||
|
|
_has_bits_[0] &= ~0x00000001u;
|
||
|
|
}
|
||
|
|
void Optimization::clear_inflation_percent() {
|
||
|
|
inflation_percent_ = GOOGLE_LONGLONG(0);
|
||
|
|
clear_has_inflation_percent();
|
||
|
|
}
|
||
|
|
::google::protobuf::int64 Optimization::inflation_percent() const {
|
||
|
|
// @@protoc_insertion_point(field_get:optimization_guide.proto.Optimization.inflation_percent)
|
||
|
|
return inflation_percent_;
|
||
|
|
}
|
||
|
|
void Optimization::set_inflation_percent(::google::protobuf::int64 value) {
|
||
|
|
set_has_inflation_percent();
|
||
|
|
inflation_percent_ = value;
|
||
|
|
// @@protoc_insertion_point(field_set:optimization_guide.proto.Optimization.inflation_percent)
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
|
||
|
|
|
||
|
|
// ===================================================================
|
||
|
|
|
||
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||
|
|
const int Hint::kKeyRepresentationFieldNumber;
|
||
|
|
const int Hint::kKeyFieldNumber;
|
||
|
|
const int Hint::kWhitelistedOptimizationsFieldNumber;
|
||
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||
|
|
|
||
|
|
Hint::Hint()
|
||
|
|
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
|
||
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
||
|
|
protobuf_hints_2eproto::InitDefaults();
|
||
|
|
}
|
||
|
|
SharedCtor();
|
||
|
|
// @@protoc_insertion_point(constructor:optimization_guide.proto.Hint)
|
||
|
|
}
|
||
|
|
Hint::Hint(const Hint& from)
|
||
|
|
: ::google::protobuf::MessageLite(),
|
||
|
|
_internal_metadata_(NULL),
|
||
|
|
_has_bits_(from._has_bits_),
|
||
|
|
_cached_size_(0),
|
||
|
|
whitelisted_optimizations_(from.whitelisted_optimizations_) {
|
||
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||
|
|
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||
|
|
if (from.has_key()) {
|
||
|
|
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
|
||
|
|
}
|
||
|
|
key_representation_ = from.key_representation_;
|
||
|
|
// @@protoc_insertion_point(copy_constructor:optimization_guide.proto.Hint)
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::SharedCtor() {
|
||
|
|
_cached_size_ = 0;
|
||
|
|
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||
|
|
key_representation_ = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
Hint::~Hint() {
|
||
|
|
// @@protoc_insertion_point(destructor:optimization_guide.proto.Hint)
|
||
|
|
SharedDtor();
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::SharedDtor() {
|
||
|
|
key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::SetCachedSize(int size) const {
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||
|
|
_cached_size_ = size;
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||
|
|
}
|
||
|
|
const Hint& Hint::default_instance() {
|
||
|
|
protobuf_hints_2eproto::InitDefaults();
|
||
|
|
return *internal_default_instance();
|
||
|
|
}
|
||
|
|
|
||
|
|
Hint* Hint::New(::google::protobuf::Arena* arena) const {
|
||
|
|
Hint* n = new Hint;
|
||
|
|
if (arena != NULL) {
|
||
|
|
arena->Own(n);
|
||
|
|
}
|
||
|
|
return n;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::Clear() {
|
||
|
|
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.Hint)
|
||
|
|
whitelisted_optimizations_.Clear();
|
||
|
|
if (has_key()) {
|
||
|
|
GOOGLE_DCHECK(!key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
|
||
|
|
(*key_.UnsafeRawStringPointer())->clear();
|
||
|
|
}
|
||
|
|
key_representation_ = 0;
|
||
|
|
_has_bits_.Clear();
|
||
|
|
_internal_metadata_.Clear();
|
||
|
|
}
|
||
|
|
|
||
|
|
bool Hint::MergePartialFromCodedStream(
|
||
|
|
::google::protobuf::io::CodedInputStream* input) {
|
||
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
||
|
|
::google::protobuf::uint32 tag;
|
||
|
|
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
|
||
|
|
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
|
||
|
|
&::google::protobuf::internal::InternalMetadataWithArenaLite::
|
||
|
|
mutable_unknown_fields));
|
||
|
|
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
|
||
|
|
&unknown_fields_string, false);
|
||
|
|
// @@protoc_insertion_point(parse_start:optimization_guide.proto.Hint)
|
||
|
|
for (;;) {
|
||
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||
|
|
tag = p.first;
|
||
|
|
if (!p.second) goto handle_unusual;
|
||
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||
|
|
// optional .optimization_guide.proto.KeyRepresentation key_representation = 1;
|
||
|
|
case 1: {
|
||
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
||
|
|
static_cast< ::google::protobuf::uint8>(8u)) {
|
||
|
|
int value;
|
||
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
||
|
|
input, &value)));
|
||
|
|
if (::optimization_guide::proto::KeyRepresentation_IsValid(value)) {
|
||
|
|
set_key_representation(static_cast< ::optimization_guide::proto::KeyRepresentation >(value));
|
||
|
|
} else {
|
||
|
|
unknown_fields_stream.WriteVarint32(8u);
|
||
|
|
unknown_fields_stream.WriteVarint32(
|
||
|
|
static_cast< ::google::protobuf::uint32>(value));
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
goto handle_unusual;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional string key = 2;
|
||
|
|
case 2: {
|
||
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
||
|
|
static_cast< ::google::protobuf::uint8>(18u)) {
|
||
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
||
|
|
input, this->mutable_key()));
|
||
|
|
} else {
|
||
|
|
goto handle_unusual;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Optimization whitelisted_optimizations = 3;
|
||
|
|
case 3: {
|
||
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
||
|
|
static_cast< ::google::protobuf::uint8>(26u)) {
|
||
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
||
|
|
input, add_whitelisted_optimizations()));
|
||
|
|
} else {
|
||
|
|
goto handle_unusual;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
default: {
|
||
|
|
handle_unusual:
|
||
|
|
if (tag == 0 ||
|
||
|
|
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||
|
|
goto success;
|
||
|
|
}
|
||
|
|
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
|
||
|
|
input, tag, &unknown_fields_stream));
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
success:
|
||
|
|
// @@protoc_insertion_point(parse_success:optimization_guide.proto.Hint)
|
||
|
|
return true;
|
||
|
|
failure:
|
||
|
|
// @@protoc_insertion_point(parse_failure:optimization_guide.proto.Hint)
|
||
|
|
return false;
|
||
|
|
#undef DO_
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::SerializeWithCachedSizes(
|
||
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
||
|
|
// @@protoc_insertion_point(serialize_start:optimization_guide.proto.Hint)
|
||
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
||
|
|
(void) cached_has_bits;
|
||
|
|
|
||
|
|
cached_has_bits = _has_bits_[0];
|
||
|
|
// optional .optimization_guide.proto.KeyRepresentation key_representation = 1;
|
||
|
|
if (cached_has_bits & 0x00000002u) {
|
||
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
||
|
|
1, this->key_representation(), output);
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional string key = 2;
|
||
|
|
if (cached_has_bits & 0x00000001u) {
|
||
|
|
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
||
|
|
2, this->key(), output);
|
||
|
|
}
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Optimization whitelisted_optimizations = 3;
|
||
|
|
for (unsigned int i = 0,
|
||
|
|
n = static_cast<unsigned int>(this->whitelisted_optimizations_size()); i < n; i++) {
|
||
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
||
|
|
3, this->whitelisted_optimizations(static_cast<int>(i)), output);
|
||
|
|
}
|
||
|
|
|
||
|
|
output->WriteRaw(unknown_fields().data(),
|
||
|
|
static_cast<int>(unknown_fields().size()));
|
||
|
|
// @@protoc_insertion_point(serialize_end:optimization_guide.proto.Hint)
|
||
|
|
}
|
||
|
|
|
||
|
|
size_t Hint::ByteSizeLong() const {
|
||
|
|
// @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.Hint)
|
||
|
|
size_t total_size = 0;
|
||
|
|
|
||
|
|
total_size += unknown_fields().size();
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Optimization whitelisted_optimizations = 3;
|
||
|
|
{
|
||
|
|
unsigned int count = static_cast<unsigned int>(this->whitelisted_optimizations_size());
|
||
|
|
total_size += 1UL * count;
|
||
|
|
for (unsigned int i = 0; i < count; i++) {
|
||
|
|
total_size +=
|
||
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
||
|
|
this->whitelisted_optimizations(static_cast<int>(i)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
if (_has_bits_[0 / 32] & 3u) {
|
||
|
|
// optional string key = 2;
|
||
|
|
if (has_key()) {
|
||
|
|
total_size += 1 +
|
||
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
||
|
|
this->key());
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional .optimization_guide.proto.KeyRepresentation key_representation = 1;
|
||
|
|
if (has_key_representation()) {
|
||
|
|
total_size += 1 +
|
||
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->key_representation());
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||
|
|
_cached_size_ = cached_size;
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||
|
|
return total_size;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::CheckTypeAndMergeFrom(
|
||
|
|
const ::google::protobuf::MessageLite& from) {
|
||
|
|
MergeFrom(*::google::protobuf::down_cast<const Hint*>(&from));
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::MergeFrom(const Hint& from) {
|
||
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.Hint)
|
||
|
|
GOOGLE_DCHECK_NE(&from, this);
|
||
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
||
|
|
(void) cached_has_bits;
|
||
|
|
|
||
|
|
whitelisted_optimizations_.MergeFrom(from.whitelisted_optimizations_);
|
||
|
|
cached_has_bits = from._has_bits_[0];
|
||
|
|
if (cached_has_bits & 3u) {
|
||
|
|
if (cached_has_bits & 0x00000001u) {
|
||
|
|
set_has_key();
|
||
|
|
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
|
||
|
|
}
|
||
|
|
if (cached_has_bits & 0x00000002u) {
|
||
|
|
key_representation_ = from.key_representation_;
|
||
|
|
}
|
||
|
|
_has_bits_[0] |= cached_has_bits;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::CopyFrom(const Hint& from) {
|
||
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:optimization_guide.proto.Hint)
|
||
|
|
if (&from == this) return;
|
||
|
|
Clear();
|
||
|
|
MergeFrom(from);
|
||
|
|
}
|
||
|
|
|
||
|
|
bool Hint::IsInitialized() const {
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Hint::Swap(Hint* other) {
|
||
|
|
if (other == this) return;
|
||
|
|
InternalSwap(other);
|
||
|
|
}
|
||
|
|
void Hint::InternalSwap(Hint* other) {
|
||
|
|
whitelisted_optimizations_.InternalSwap(&other->whitelisted_optimizations_);
|
||
|
|
key_.Swap(&other->key_);
|
||
|
|
std::swap(key_representation_, other->key_representation_);
|
||
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||
|
|
std::swap(_cached_size_, other->_cached_size_);
|
||
|
|
}
|
||
|
|
|
||
|
|
::std::string Hint::GetTypeName() const {
|
||
|
|
return "optimization_guide.proto.Hint";
|
||
|
|
}
|
||
|
|
|
||
|
|
#if PROTOBUF_INLINE_NOT_IN_HEADERS
|
||
|
|
// Hint
|
||
|
|
|
||
|
|
// optional .optimization_guide.proto.KeyRepresentation key_representation = 1;
|
||
|
|
bool Hint::has_key_representation() const {
|
||
|
|
return (_has_bits_[0] & 0x00000002u) != 0;
|
||
|
|
}
|
||
|
|
void Hint::set_has_key_representation() {
|
||
|
|
_has_bits_[0] |= 0x00000002u;
|
||
|
|
}
|
||
|
|
void Hint::clear_has_key_representation() {
|
||
|
|
_has_bits_[0] &= ~0x00000002u;
|
||
|
|
}
|
||
|
|
void Hint::clear_key_representation() {
|
||
|
|
key_representation_ = 0;
|
||
|
|
clear_has_key_representation();
|
||
|
|
}
|
||
|
|
::optimization_guide::proto::KeyRepresentation Hint::key_representation() const {
|
||
|
|
// @@protoc_insertion_point(field_get:optimization_guide.proto.Hint.key_representation)
|
||
|
|
return static_cast< ::optimization_guide::proto::KeyRepresentation >(key_representation_);
|
||
|
|
}
|
||
|
|
void Hint::set_key_representation(::optimization_guide::proto::KeyRepresentation value) {
|
||
|
|
assert(::optimization_guide::proto::KeyRepresentation_IsValid(value));
|
||
|
|
set_has_key_representation();
|
||
|
|
key_representation_ = value;
|
||
|
|
// @@protoc_insertion_point(field_set:optimization_guide.proto.Hint.key_representation)
|
||
|
|
}
|
||
|
|
|
||
|
|
// optional string key = 2;
|
||
|
|
bool Hint::has_key() const {
|
||
|
|
return (_has_bits_[0] & 0x00000001u) != 0;
|
||
|
|
}
|
||
|
|
void Hint::set_has_key() {
|
||
|
|
_has_bits_[0] |= 0x00000001u;
|
||
|
|
}
|
||
|
|
void Hint::clear_has_key() {
|
||
|
|
_has_bits_[0] &= ~0x00000001u;
|
||
|
|
}
|
||
|
|
void Hint::clear_key() {
|
||
|
|
key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||
|
|
clear_has_key();
|
||
|
|
}
|
||
|
|
const ::std::string& Hint::key() const {
|
||
|
|
// @@protoc_insertion_point(field_get:optimization_guide.proto.Hint.key)
|
||
|
|
return key_.GetNoArena();
|
||
|
|
}
|
||
|
|
void Hint::set_key(const ::std::string& value) {
|
||
|
|
set_has_key();
|
||
|
|
key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
||
|
|
// @@protoc_insertion_point(field_set:optimization_guide.proto.Hint.key)
|
||
|
|
}
|
||
|
|
#if LANG_CXX11
|
||
|
|
void Hint::set_key(::std::string&& value) {
|
||
|
|
set_has_key();
|
||
|
|
key_.SetNoArena(
|
||
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
||
|
|
// @@protoc_insertion_point(field_set_rvalue:optimization_guide.proto.Hint.key)
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
void Hint::set_key(const char* value) {
|
||
|
|
GOOGLE_DCHECK(value != NULL);
|
||
|
|
set_has_key();
|
||
|
|
key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
||
|
|
// @@protoc_insertion_point(field_set_char:optimization_guide.proto.Hint.key)
|
||
|
|
}
|
||
|
|
void Hint::set_key(const char* value, size_t size) {
|
||
|
|
set_has_key();
|
||
|
|
key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
||
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
||
|
|
// @@protoc_insertion_point(field_set_pointer:optimization_guide.proto.Hint.key)
|
||
|
|
}
|
||
|
|
::std::string* Hint::mutable_key() {
|
||
|
|
set_has_key();
|
||
|
|
// @@protoc_insertion_point(field_mutable:optimization_guide.proto.Hint.key)
|
||
|
|
return key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||
|
|
}
|
||
|
|
::std::string* Hint::release_key() {
|
||
|
|
// @@protoc_insertion_point(field_release:optimization_guide.proto.Hint.key)
|
||
|
|
clear_has_key();
|
||
|
|
return key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||
|
|
}
|
||
|
|
void Hint::set_allocated_key(::std::string* key) {
|
||
|
|
if (key != NULL) {
|
||
|
|
set_has_key();
|
||
|
|
} else {
|
||
|
|
clear_has_key();
|
||
|
|
}
|
||
|
|
key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), key);
|
||
|
|
// @@protoc_insertion_point(field_set_allocated:optimization_guide.proto.Hint.key)
|
||
|
|
}
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Optimization whitelisted_optimizations = 3;
|
||
|
|
int Hint::whitelisted_optimizations_size() const {
|
||
|
|
return whitelisted_optimizations_.size();
|
||
|
|
}
|
||
|
|
void Hint::clear_whitelisted_optimizations() {
|
||
|
|
whitelisted_optimizations_.Clear();
|
||
|
|
}
|
||
|
|
const ::optimization_guide::proto::Optimization& Hint::whitelisted_optimizations(int index) const {
|
||
|
|
// @@protoc_insertion_point(field_get:optimization_guide.proto.Hint.whitelisted_optimizations)
|
||
|
|
return whitelisted_optimizations_.Get(index);
|
||
|
|
}
|
||
|
|
::optimization_guide::proto::Optimization* Hint::mutable_whitelisted_optimizations(int index) {
|
||
|
|
// @@protoc_insertion_point(field_mutable:optimization_guide.proto.Hint.whitelisted_optimizations)
|
||
|
|
return whitelisted_optimizations_.Mutable(index);
|
||
|
|
}
|
||
|
|
::optimization_guide::proto::Optimization* Hint::add_whitelisted_optimizations() {
|
||
|
|
// @@protoc_insertion_point(field_add:optimization_guide.proto.Hint.whitelisted_optimizations)
|
||
|
|
return whitelisted_optimizations_.Add();
|
||
|
|
}
|
||
|
|
::google::protobuf::RepeatedPtrField< ::optimization_guide::proto::Optimization >*
|
||
|
|
Hint::mutable_whitelisted_optimizations() {
|
||
|
|
// @@protoc_insertion_point(field_mutable_list:optimization_guide.proto.Hint.whitelisted_optimizations)
|
||
|
|
return &whitelisted_optimizations_;
|
||
|
|
}
|
||
|
|
const ::google::protobuf::RepeatedPtrField< ::optimization_guide::proto::Optimization >&
|
||
|
|
Hint::whitelisted_optimizations() const {
|
||
|
|
// @@protoc_insertion_point(field_list:optimization_guide.proto.Hint.whitelisted_optimizations)
|
||
|
|
return whitelisted_optimizations_;
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
|
||
|
|
|
||
|
|
// ===================================================================
|
||
|
|
|
||
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||
|
|
const int Configuration::kHintsFieldNumber;
|
||
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
||
|
|
|
||
|
|
Configuration::Configuration()
|
||
|
|
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
|
||
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
||
|
|
protobuf_hints_2eproto::InitDefaults();
|
||
|
|
}
|
||
|
|
SharedCtor();
|
||
|
|
// @@protoc_insertion_point(constructor:optimization_guide.proto.Configuration)
|
||
|
|
}
|
||
|
|
Configuration::Configuration(const Configuration& from)
|
||
|
|
: ::google::protobuf::MessageLite(),
|
||
|
|
_internal_metadata_(NULL),
|
||
|
|
_has_bits_(from._has_bits_),
|
||
|
|
_cached_size_(0),
|
||
|
|
hints_(from.hints_) {
|
||
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||
|
|
// @@protoc_insertion_point(copy_constructor:optimization_guide.proto.Configuration)
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::SharedCtor() {
|
||
|
|
_cached_size_ = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
Configuration::~Configuration() {
|
||
|
|
// @@protoc_insertion_point(destructor:optimization_guide.proto.Configuration)
|
||
|
|
SharedDtor();
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::SharedDtor() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::SetCachedSize(int size) const {
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||
|
|
_cached_size_ = size;
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||
|
|
}
|
||
|
|
const Configuration& Configuration::default_instance() {
|
||
|
|
protobuf_hints_2eproto::InitDefaults();
|
||
|
|
return *internal_default_instance();
|
||
|
|
}
|
||
|
|
|
||
|
|
Configuration* Configuration::New(::google::protobuf::Arena* arena) const {
|
||
|
|
Configuration* n = new Configuration;
|
||
|
|
if (arena != NULL) {
|
||
|
|
arena->Own(n);
|
||
|
|
}
|
||
|
|
return n;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::Clear() {
|
||
|
|
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.Configuration)
|
||
|
|
hints_.Clear();
|
||
|
|
_has_bits_.Clear();
|
||
|
|
_internal_metadata_.Clear();
|
||
|
|
}
|
||
|
|
|
||
|
|
bool Configuration::MergePartialFromCodedStream(
|
||
|
|
::google::protobuf::io::CodedInputStream* input) {
|
||
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
||
|
|
::google::protobuf::uint32 tag;
|
||
|
|
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
|
||
|
|
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
|
||
|
|
&::google::protobuf::internal::InternalMetadataWithArenaLite::
|
||
|
|
mutable_unknown_fields));
|
||
|
|
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
|
||
|
|
&unknown_fields_string, false);
|
||
|
|
// @@protoc_insertion_point(parse_start:optimization_guide.proto.Configuration)
|
||
|
|
for (;;) {
|
||
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
||
|
|
tag = p.first;
|
||
|
|
if (!p.second) goto handle_unusual;
|
||
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||
|
|
// repeated .optimization_guide.proto.Hint hints = 1;
|
||
|
|
case 1: {
|
||
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
||
|
|
static_cast< ::google::protobuf::uint8>(10u)) {
|
||
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
||
|
|
input, add_hints()));
|
||
|
|
} else {
|
||
|
|
goto handle_unusual;
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
default: {
|
||
|
|
handle_unusual:
|
||
|
|
if (tag == 0 ||
|
||
|
|
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||
|
|
goto success;
|
||
|
|
}
|
||
|
|
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
|
||
|
|
input, tag, &unknown_fields_stream));
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
success:
|
||
|
|
// @@protoc_insertion_point(parse_success:optimization_guide.proto.Configuration)
|
||
|
|
return true;
|
||
|
|
failure:
|
||
|
|
// @@protoc_insertion_point(parse_failure:optimization_guide.proto.Configuration)
|
||
|
|
return false;
|
||
|
|
#undef DO_
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::SerializeWithCachedSizes(
|
||
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
||
|
|
// @@protoc_insertion_point(serialize_start:optimization_guide.proto.Configuration)
|
||
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
||
|
|
(void) cached_has_bits;
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Hint hints = 1;
|
||
|
|
for (unsigned int i = 0,
|
||
|
|
n = static_cast<unsigned int>(this->hints_size()); i < n; i++) {
|
||
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
||
|
|
1, this->hints(static_cast<int>(i)), output);
|
||
|
|
}
|
||
|
|
|
||
|
|
output->WriteRaw(unknown_fields().data(),
|
||
|
|
static_cast<int>(unknown_fields().size()));
|
||
|
|
// @@protoc_insertion_point(serialize_end:optimization_guide.proto.Configuration)
|
||
|
|
}
|
||
|
|
|
||
|
|
size_t Configuration::ByteSizeLong() const {
|
||
|
|
// @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.Configuration)
|
||
|
|
size_t total_size = 0;
|
||
|
|
|
||
|
|
total_size += unknown_fields().size();
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Hint hints = 1;
|
||
|
|
{
|
||
|
|
unsigned int count = static_cast<unsigned int>(this->hints_size());
|
||
|
|
total_size += 1UL * count;
|
||
|
|
for (unsigned int i = 0; i < count; i++) {
|
||
|
|
total_size +=
|
||
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
||
|
|
this->hints(static_cast<int>(i)));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||
|
|
_cached_size_ = cached_size;
|
||
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||
|
|
return total_size;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::CheckTypeAndMergeFrom(
|
||
|
|
const ::google::protobuf::MessageLite& from) {
|
||
|
|
MergeFrom(*::google::protobuf::down_cast<const Configuration*>(&from));
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::MergeFrom(const Configuration& from) {
|
||
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.Configuration)
|
||
|
|
GOOGLE_DCHECK_NE(&from, this);
|
||
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
||
|
|
(void) cached_has_bits;
|
||
|
|
|
||
|
|
hints_.MergeFrom(from.hints_);
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::CopyFrom(const Configuration& from) {
|
||
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:optimization_guide.proto.Configuration)
|
||
|
|
if (&from == this) return;
|
||
|
|
Clear();
|
||
|
|
MergeFrom(from);
|
||
|
|
}
|
||
|
|
|
||
|
|
bool Configuration::IsInitialized() const {
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
void Configuration::Swap(Configuration* other) {
|
||
|
|
if (other == this) return;
|
||
|
|
InternalSwap(other);
|
||
|
|
}
|
||
|
|
void Configuration::InternalSwap(Configuration* other) {
|
||
|
|
hints_.InternalSwap(&other->hints_);
|
||
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||
|
|
std::swap(_cached_size_, other->_cached_size_);
|
||
|
|
}
|
||
|
|
|
||
|
|
::std::string Configuration::GetTypeName() const {
|
||
|
|
return "optimization_guide.proto.Configuration";
|
||
|
|
}
|
||
|
|
|
||
|
|
#if PROTOBUF_INLINE_NOT_IN_HEADERS
|
||
|
|
// Configuration
|
||
|
|
|
||
|
|
// repeated .optimization_guide.proto.Hint hints = 1;
|
||
|
|
int Configuration::hints_size() const {
|
||
|
|
return hints_.size();
|
||
|
|
}
|
||
|
|
void Configuration::clear_hints() {
|
||
|
|
hints_.Clear();
|
||
|
|
}
|
||
|
|
const ::optimization_guide::proto::Hint& Configuration::hints(int index) const {
|
||
|
|
// @@protoc_insertion_point(field_get:optimization_guide.proto.Configuration.hints)
|
||
|
|
return hints_.Get(index);
|
||
|
|
}
|
||
|
|
::optimization_guide::proto::Hint* Configuration::mutable_hints(int index) {
|
||
|
|
// @@protoc_insertion_point(field_mutable:optimization_guide.proto.Configuration.hints)
|
||
|
|
return hints_.Mutable(index);
|
||
|
|
}
|
||
|
|
::optimization_guide::proto::Hint* Configuration::add_hints() {
|
||
|
|
// @@protoc_insertion_point(field_add:optimization_guide.proto.Configuration.hints)
|
||
|
|
return hints_.Add();
|
||
|
|
}
|
||
|
|
::google::protobuf::RepeatedPtrField< ::optimization_guide::proto::Hint >*
|
||
|
|
Configuration::mutable_hints() {
|
||
|
|
// @@protoc_insertion_point(field_mutable_list:optimization_guide.proto.Configuration.hints)
|
||
|
|
return &hints_;
|
||
|
|
}
|
||
|
|
const ::google::protobuf::RepeatedPtrField< ::optimization_guide::proto::Hint >&
|
||
|
|
Configuration::hints() const {
|
||
|
|
// @@protoc_insertion_point(field_list:optimization_guide.proto.Configuration.hints)
|
||
|
|
return hints_;
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
|
||
|
|
|
||
|
|
// @@protoc_insertion_point(namespace_scope)
|
||
|
|
|
||
|
|
} // namespace proto
|
||
|
|
} // namespace optimization_guide
|
||
|
|
|
||
|
|
// @@protoc_insertion_point(global_scope)
|