This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhuyujia-webhopper/collector/adg-linux/gen/cld_3/protos/sentence.pb.cc
little_stone bd2d50cf35 code update
2022-05-05 20:41:28 +08:00

1441 lines
48 KiB
C++
Executable File

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: sentence.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "sentence.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 chrome_lang_id {
class SentenceDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Sentence> {
} _Sentence_default_instance_;
class TokenDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Token> {
} _Token_default_instance_;
namespace protobuf_sentence_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 },
};
void TableStruct::Shutdown() {
_Sentence_default_instance_.Shutdown();
_Token_default_instance_.Shutdown();
}
void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_Sentence_default_instance_.DefaultConstruct();
_Token_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_sentence_2eproto
bool Token_BreakLevel_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const Token_BreakLevel Token::NO_BREAK;
const Token_BreakLevel Token::SPACE_BREAK;
const Token_BreakLevel Token::LINE_BREAK;
const Token_BreakLevel Token::SENTENCE_BREAK;
const Token_BreakLevel Token::BreakLevel_MIN;
const Token_BreakLevel Token::BreakLevel_MAX;
const int Token::BreakLevel_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Sentence::kIdFieldNumber;
const int Sentence::kTextFieldNumber;
const int Sentence::kTokenFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Sentence::Sentence()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_sentence_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:chrome_lang_id.Sentence)
}
Sentence::Sentence(const Sentence& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
token_(from.token_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
_extensions_.MergeFrom(from._extensions_);
id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_id()) {
id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.id_);
}
text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_text()) {
text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_);
}
// @@protoc_insertion_point(copy_constructor:chrome_lang_id.Sentence)
}
void Sentence::SharedCtor() {
_cached_size_ = 0;
id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
Sentence::~Sentence() {
// @@protoc_insertion_point(destructor:chrome_lang_id.Sentence)
SharedDtor();
}
void Sentence::SharedDtor() {
id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Sentence::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Sentence& Sentence::default_instance() {
protobuf_sentence_2eproto::InitDefaults();
return *internal_default_instance();
}
Sentence* Sentence::New(::google::protobuf::Arena* arena) const {
Sentence* n = new Sentence;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Sentence::Clear() {
// @@protoc_insertion_point(message_clear_start:chrome_lang_id.Sentence)
_extensions_.Clear();
token_.Clear();
if (_has_bits_[0 / 32] & 3u) {
if (has_id()) {
GOOGLE_DCHECK(!id_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*id_.UnsafeRawStringPointer())->clear();
}
if (has_text()) {
GOOGLE_DCHECK(!text_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*text_.UnsafeRawStringPointer())->clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Sentence::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:chrome_lang_id.Sentence)
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 string id = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_id()));
} else {
goto handle_unusual;
}
break;
}
// optional string text = 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_text()));
} else {
goto handle_unusual;
}
break;
}
// repeated .chrome_lang_id.Token token = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_token()));
} 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;
}
if ((8000u <= tag)) {
DO_(_extensions_.ParseField(tag, input, internal_default_instance(),
&unknown_fields_stream));
continue;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:chrome_lang_id.Sentence)
return true;
failure:
// @@protoc_insertion_point(parse_failure:chrome_lang_id.Sentence)
return false;
#undef DO_
}
void Sentence::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:chrome_lang_id.Sentence)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string id = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->id(), output);
}
// optional string text = 2;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->text(), output);
}
// repeated .chrome_lang_id.Token token = 3;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->token_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessage(
3, this->token(static_cast<int>(i)), output);
}
// Extension range [1000, 536870912)
_extensions_.SerializeWithCachedSizes(
1000, 536870912, output);
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:chrome_lang_id.Sentence)
}
size_t Sentence::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:chrome_lang_id.Sentence)
size_t total_size = 0;
total_size += _extensions_.ByteSize();
total_size += unknown_fields().size();
// repeated .chrome_lang_id.Token token = 3;
{
unsigned int count = static_cast<unsigned int>(this->token_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->token(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 3u) {
// optional string id = 1;
if (has_id()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->id());
}
// optional string text = 2;
if (has_text()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->text());
}
}
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 Sentence::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Sentence*>(&from));
}
void Sentence::MergeFrom(const Sentence& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:chrome_lang_id.Sentence)
GOOGLE_DCHECK_NE(&from, this);
_extensions_.MergeFrom(from._extensions_);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
token_.MergeFrom(from.token_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_id();
id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.id_);
}
if (cached_has_bits & 0x00000002u) {
set_has_text();
text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_);
}
}
}
void Sentence::CopyFrom(const Sentence& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:chrome_lang_id.Sentence)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Sentence::IsInitialized() const {
if (!_extensions_.IsInitialized()) {
return false;
}
if (!::google::protobuf::internal::AllAreInitialized(this->token())) return false;
return true;
}
void Sentence::Swap(Sentence* other) {
if (other == this) return;
InternalSwap(other);
}
void Sentence::InternalSwap(Sentence* other) {
token_.InternalSwap(&other->token_);
id_.Swap(&other->id_);
text_.Swap(&other->text_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
_extensions_.Swap(&other->_extensions_);
}
::std::string Sentence::GetTypeName() const {
return "chrome_lang_id.Sentence";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Sentence
// optional string id = 1;
bool Sentence::has_id() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Sentence::set_has_id() {
_has_bits_[0] |= 0x00000001u;
}
void Sentence::clear_has_id() {
_has_bits_[0] &= ~0x00000001u;
}
void Sentence::clear_id() {
id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_id();
}
const ::std::string& Sentence::id() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Sentence.id)
return id_.GetNoArena();
}
void Sentence::set_id(const ::std::string& value) {
set_has_id();
id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:chrome_lang_id.Sentence.id)
}
#if LANG_CXX11
void Sentence::set_id(::std::string&& value) {
set_has_id();
id_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:chrome_lang_id.Sentence.id)
}
#endif
void Sentence::set_id(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_id();
id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:chrome_lang_id.Sentence.id)
}
void Sentence::set_id(const char* value, size_t size) {
set_has_id();
id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:chrome_lang_id.Sentence.id)
}
::std::string* Sentence::mutable_id() {
set_has_id();
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Sentence.id)
return id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Sentence::release_id() {
// @@protoc_insertion_point(field_release:chrome_lang_id.Sentence.id)
clear_has_id();
return id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Sentence::set_allocated_id(::std::string* id) {
if (id != NULL) {
set_has_id();
} else {
clear_has_id();
}
id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), id);
// @@protoc_insertion_point(field_set_allocated:chrome_lang_id.Sentence.id)
}
// optional string text = 2;
bool Sentence::has_text() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Sentence::set_has_text() {
_has_bits_[0] |= 0x00000002u;
}
void Sentence::clear_has_text() {
_has_bits_[0] &= ~0x00000002u;
}
void Sentence::clear_text() {
text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_text();
}
const ::std::string& Sentence::text() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Sentence.text)
return text_.GetNoArena();
}
void Sentence::set_text(const ::std::string& value) {
set_has_text();
text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:chrome_lang_id.Sentence.text)
}
#if LANG_CXX11
void Sentence::set_text(::std::string&& value) {
set_has_text();
text_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:chrome_lang_id.Sentence.text)
}
#endif
void Sentence::set_text(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_text();
text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:chrome_lang_id.Sentence.text)
}
void Sentence::set_text(const char* value, size_t size) {
set_has_text();
text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:chrome_lang_id.Sentence.text)
}
::std::string* Sentence::mutable_text() {
set_has_text();
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Sentence.text)
return text_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Sentence::release_text() {
// @@protoc_insertion_point(field_release:chrome_lang_id.Sentence.text)
clear_has_text();
return text_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Sentence::set_allocated_text(::std::string* text) {
if (text != NULL) {
set_has_text();
} else {
clear_has_text();
}
text_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), text);
// @@protoc_insertion_point(field_set_allocated:chrome_lang_id.Sentence.text)
}
// repeated .chrome_lang_id.Token token = 3;
int Sentence::token_size() const {
return token_.size();
}
void Sentence::clear_token() {
token_.Clear();
}
const ::chrome_lang_id::Token& Sentence::token(int index) const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Sentence.token)
return token_.Get(index);
}
::chrome_lang_id::Token* Sentence::mutable_token(int index) {
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Sentence.token)
return token_.Mutable(index);
}
::chrome_lang_id::Token* Sentence::add_token() {
// @@protoc_insertion_point(field_add:chrome_lang_id.Sentence.token)
return token_.Add();
}
::google::protobuf::RepeatedPtrField< ::chrome_lang_id::Token >*
Sentence::mutable_token() {
// @@protoc_insertion_point(field_mutable_list:chrome_lang_id.Sentence.token)
return &token_;
}
const ::google::protobuf::RepeatedPtrField< ::chrome_lang_id::Token >&
Sentence::token() const {
// @@protoc_insertion_point(field_list:chrome_lang_id.Sentence.token)
return token_;
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Token::kWordFieldNumber;
const int Token::kStartFieldNumber;
const int Token::kEndFieldNumber;
const int Token::kHeadFieldNumber;
const int Token::kTagFieldNumber;
const int Token::kCategoryFieldNumber;
const int Token::kLabelFieldNumber;
const int Token::kBreakLevelFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Token::Token()
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_sentence_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:chrome_lang_id.Token)
}
Token::Token(const Token& from)
: ::google::protobuf::MessageLite(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
_extensions_.MergeFrom(from._extensions_);
word_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_word()) {
word_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.word_);
}
tag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_tag()) {
tag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.tag_);
}
category_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_category()) {
category_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.category_);
}
label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_label()) {
label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.label_);
}
::memcpy(&start_, &from.start_,
static_cast<size_t>(reinterpret_cast<char*>(&break_level_) -
reinterpret_cast<char*>(&start_)) + sizeof(break_level_));
// @@protoc_insertion_point(copy_constructor:chrome_lang_id.Token)
}
void Token::SharedCtor() {
_cached_size_ = 0;
word_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
tag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
category_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&start_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&end_) -
reinterpret_cast<char*>(&start_)) + sizeof(end_));
head_ = -1;
break_level_ = 1;
}
Token::~Token() {
// @@protoc_insertion_point(destructor:chrome_lang_id.Token)
SharedDtor();
}
void Token::SharedDtor() {
word_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
tag_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
category_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Token::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Token& Token::default_instance() {
protobuf_sentence_2eproto::InitDefaults();
return *internal_default_instance();
}
Token* Token::New(::google::protobuf::Arena* arena) const {
Token* n = new Token;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Token::Clear() {
// @@protoc_insertion_point(message_clear_start:chrome_lang_id.Token)
_extensions_.Clear();
if (_has_bits_[0 / 32] & 15u) {
if (has_word()) {
GOOGLE_DCHECK(!word_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*word_.UnsafeRawStringPointer())->clear();
}
if (has_tag()) {
GOOGLE_DCHECK(!tag_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*tag_.UnsafeRawStringPointer())->clear();
}
if (has_category()) {
GOOGLE_DCHECK(!category_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*category_.UnsafeRawStringPointer())->clear();
}
if (has_label()) {
GOOGLE_DCHECK(!label_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*label_.UnsafeRawStringPointer())->clear();
}
}
if (_has_bits_[0 / 32] & 240u) {
::memset(&start_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&end_) -
reinterpret_cast<char*>(&start_)) + sizeof(end_));
head_ = -1;
break_level_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Token::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:chrome_lang_id.Token)
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)) {
// required string word = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_word()));
} else {
goto handle_unusual;
}
break;
}
// required int32 start = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u)) {
set_has_start();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &start_)));
} else {
goto handle_unusual;
}
break;
}
// required int32 end = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u)) {
set_has_end();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &end_)));
} else {
goto handle_unusual;
}
break;
}
// optional int32 head = 4 [default = -1];
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(32u)) {
set_has_head();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &head_)));
} else {
goto handle_unusual;
}
break;
}
// optional string tag = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_tag()));
} else {
goto handle_unusual;
}
break;
}
// optional string category = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_category()));
} else {
goto handle_unusual;
}
break;
}
// optional string label = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(58u)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_label()));
} else {
goto handle_unusual;
}
break;
}
// optional .chrome_lang_id.Token.BreakLevel break_level = 8 [default = SPACE_BREAK];
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(64u)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::chrome_lang_id::Token_BreakLevel_IsValid(value)) {
set_break_level(static_cast< ::chrome_lang_id::Token_BreakLevel >(value));
} else {
unknown_fields_stream.WriteVarint32(64u);
unknown_fields_stream.WriteVarint32(
static_cast< ::google::protobuf::uint32>(value));
}
} 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;
}
if ((8000u <= tag)) {
DO_(_extensions_.ParseField(tag, input, internal_default_instance(),
&unknown_fields_stream));
continue;
}
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
input, tag, &unknown_fields_stream));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:chrome_lang_id.Token)
return true;
failure:
// @@protoc_insertion_point(parse_failure:chrome_lang_id.Token)
return false;
#undef DO_
}
void Token::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:chrome_lang_id.Token)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required string word = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->word(), output);
}
// required int32 start = 2;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->start(), output);
}
// required int32 end = 3;
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->end(), output);
}
// optional int32 head = 4 [default = -1];
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->head(), output);
}
// optional string tag = 5;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5, this->tag(), output);
}
// optional string category = 6;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->category(), output);
}
// optional string label = 7;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
7, this->label(), output);
}
// optional .chrome_lang_id.Token.BreakLevel break_level = 8 [default = SPACE_BREAK];
if (cached_has_bits & 0x00000080u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
8, this->break_level(), output);
}
// Extension range [1000, 536870912)
_extensions_.SerializeWithCachedSizes(
1000, 536870912, output);
output->WriteRaw(unknown_fields().data(),
static_cast<int>(unknown_fields().size()));
// @@protoc_insertion_point(serialize_end:chrome_lang_id.Token)
}
size_t Token::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:chrome_lang_id.Token)
size_t total_size = 0;
if (has_word()) {
// required string word = 1;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->word());
}
if (has_start()) {
// required int32 start = 2;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->start());
}
if (has_end()) {
// required int32 end = 3;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->end());
}
return total_size;
}
size_t Token::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:chrome_lang_id.Token)
size_t total_size = 0;
total_size += _extensions_.ByteSize();
total_size += unknown_fields().size();
if (((_has_bits_[0] & 0x00000031) ^ 0x00000031) == 0) { // All required fields are present.
// required string word = 1;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->word());
// required int32 start = 2;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->start());
// required int32 end = 3;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->end());
} else {
total_size += RequiredFieldsByteSizeFallback();
}
if (_has_bits_[0 / 32] & 14u) {
// optional string tag = 5;
if (has_tag()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->tag());
}
// optional string category = 6;
if (has_category()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->category());
}
// optional string label = 7;
if (has_label()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->label());
}
}
if (_has_bits_[0 / 32] & 192u) {
// optional int32 head = 4 [default = -1];
if (has_head()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->head());
}
// optional .chrome_lang_id.Token.BreakLevel break_level = 8 [default = SPACE_BREAK];
if (has_break_level()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->break_level());
}
}
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 Token::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::google::protobuf::down_cast<const Token*>(&from));
}
void Token::MergeFrom(const Token& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:chrome_lang_id.Token)
GOOGLE_DCHECK_NE(&from, this);
_extensions_.MergeFrom(from._extensions_);
_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 & 255u) {
if (cached_has_bits & 0x00000001u) {
set_has_word();
word_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.word_);
}
if (cached_has_bits & 0x00000002u) {
set_has_tag();
tag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.tag_);
}
if (cached_has_bits & 0x00000004u) {
set_has_category();
category_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.category_);
}
if (cached_has_bits & 0x00000008u) {
set_has_label();
label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.label_);
}
if (cached_has_bits & 0x00000010u) {
start_ = from.start_;
}
if (cached_has_bits & 0x00000020u) {
end_ = from.end_;
}
if (cached_has_bits & 0x00000040u) {
head_ = from.head_;
}
if (cached_has_bits & 0x00000080u) {
break_level_ = from.break_level_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Token::CopyFrom(const Token& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:chrome_lang_id.Token)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Token::IsInitialized() const {
if (!_extensions_.IsInitialized()) {
return false;
}
if ((_has_bits_[0] & 0x00000031) != 0x00000031) return false;
return true;
}
void Token::Swap(Token* other) {
if (other == this) return;
InternalSwap(other);
}
void Token::InternalSwap(Token* other) {
word_.Swap(&other->word_);
tag_.Swap(&other->tag_);
category_.Swap(&other->category_);
label_.Swap(&other->label_);
std::swap(start_, other->start_);
std::swap(end_, other->end_);
std::swap(head_, other->head_);
std::swap(break_level_, other->break_level_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
std::swap(_cached_size_, other->_cached_size_);
_extensions_.Swap(&other->_extensions_);
}
::std::string Token::GetTypeName() const {
return "chrome_lang_id.Token";
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Token
// required string word = 1;
bool Token::has_word() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
void Token::set_has_word() {
_has_bits_[0] |= 0x00000001u;
}
void Token::clear_has_word() {
_has_bits_[0] &= ~0x00000001u;
}
void Token::clear_word() {
word_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_word();
}
const ::std::string& Token::word() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.word)
return word_.GetNoArena();
}
void Token::set_word(const ::std::string& value) {
set_has_word();
word_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.word)
}
#if LANG_CXX11
void Token::set_word(::std::string&& value) {
set_has_word();
word_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:chrome_lang_id.Token.word)
}
#endif
void Token::set_word(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_word();
word_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:chrome_lang_id.Token.word)
}
void Token::set_word(const char* value, size_t size) {
set_has_word();
word_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:chrome_lang_id.Token.word)
}
::std::string* Token::mutable_word() {
set_has_word();
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Token.word)
return word_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Token::release_word() {
// @@protoc_insertion_point(field_release:chrome_lang_id.Token.word)
clear_has_word();
return word_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Token::set_allocated_word(::std::string* word) {
if (word != NULL) {
set_has_word();
} else {
clear_has_word();
}
word_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), word);
// @@protoc_insertion_point(field_set_allocated:chrome_lang_id.Token.word)
}
// required int32 start = 2;
bool Token::has_start() const {
return (_has_bits_[0] & 0x00000010u) != 0;
}
void Token::set_has_start() {
_has_bits_[0] |= 0x00000010u;
}
void Token::clear_has_start() {
_has_bits_[0] &= ~0x00000010u;
}
void Token::clear_start() {
start_ = 0;
clear_has_start();
}
::google::protobuf::int32 Token::start() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.start)
return start_;
}
void Token::set_start(::google::protobuf::int32 value) {
set_has_start();
start_ = value;
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.start)
}
// required int32 end = 3;
bool Token::has_end() const {
return (_has_bits_[0] & 0x00000020u) != 0;
}
void Token::set_has_end() {
_has_bits_[0] |= 0x00000020u;
}
void Token::clear_has_end() {
_has_bits_[0] &= ~0x00000020u;
}
void Token::clear_end() {
end_ = 0;
clear_has_end();
}
::google::protobuf::int32 Token::end() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.end)
return end_;
}
void Token::set_end(::google::protobuf::int32 value) {
set_has_end();
end_ = value;
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.end)
}
// optional int32 head = 4 [default = -1];
bool Token::has_head() const {
return (_has_bits_[0] & 0x00000040u) != 0;
}
void Token::set_has_head() {
_has_bits_[0] |= 0x00000040u;
}
void Token::clear_has_head() {
_has_bits_[0] &= ~0x00000040u;
}
void Token::clear_head() {
head_ = -1;
clear_has_head();
}
::google::protobuf::int32 Token::head() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.head)
return head_;
}
void Token::set_head(::google::protobuf::int32 value) {
set_has_head();
head_ = value;
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.head)
}
// optional string tag = 5;
bool Token::has_tag() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
void Token::set_has_tag() {
_has_bits_[0] |= 0x00000002u;
}
void Token::clear_has_tag() {
_has_bits_[0] &= ~0x00000002u;
}
void Token::clear_tag() {
tag_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_tag();
}
const ::std::string& Token::tag() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.tag)
return tag_.GetNoArena();
}
void Token::set_tag(const ::std::string& value) {
set_has_tag();
tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.tag)
}
#if LANG_CXX11
void Token::set_tag(::std::string&& value) {
set_has_tag();
tag_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:chrome_lang_id.Token.tag)
}
#endif
void Token::set_tag(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_tag();
tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:chrome_lang_id.Token.tag)
}
void Token::set_tag(const char* value, size_t size) {
set_has_tag();
tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:chrome_lang_id.Token.tag)
}
::std::string* Token::mutable_tag() {
set_has_tag();
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Token.tag)
return tag_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Token::release_tag() {
// @@protoc_insertion_point(field_release:chrome_lang_id.Token.tag)
clear_has_tag();
return tag_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Token::set_allocated_tag(::std::string* tag) {
if (tag != NULL) {
set_has_tag();
} else {
clear_has_tag();
}
tag_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tag);
// @@protoc_insertion_point(field_set_allocated:chrome_lang_id.Token.tag)
}
// optional string category = 6;
bool Token::has_category() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
void Token::set_has_category() {
_has_bits_[0] |= 0x00000004u;
}
void Token::clear_has_category() {
_has_bits_[0] &= ~0x00000004u;
}
void Token::clear_category() {
category_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_category();
}
const ::std::string& Token::category() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.category)
return category_.GetNoArena();
}
void Token::set_category(const ::std::string& value) {
set_has_category();
category_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.category)
}
#if LANG_CXX11
void Token::set_category(::std::string&& value) {
set_has_category();
category_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:chrome_lang_id.Token.category)
}
#endif
void Token::set_category(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_category();
category_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:chrome_lang_id.Token.category)
}
void Token::set_category(const char* value, size_t size) {
set_has_category();
category_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:chrome_lang_id.Token.category)
}
::std::string* Token::mutable_category() {
set_has_category();
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Token.category)
return category_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Token::release_category() {
// @@protoc_insertion_point(field_release:chrome_lang_id.Token.category)
clear_has_category();
return category_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Token::set_allocated_category(::std::string* category) {
if (category != NULL) {
set_has_category();
} else {
clear_has_category();
}
category_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), category);
// @@protoc_insertion_point(field_set_allocated:chrome_lang_id.Token.category)
}
// optional string label = 7;
bool Token::has_label() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
void Token::set_has_label() {
_has_bits_[0] |= 0x00000008u;
}
void Token::clear_has_label() {
_has_bits_[0] &= ~0x00000008u;
}
void Token::clear_label() {
label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_label();
}
const ::std::string& Token::label() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.label)
return label_.GetNoArena();
}
void Token::set_label(const ::std::string& value) {
set_has_label();
label_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.label)
}
#if LANG_CXX11
void Token::set_label(::std::string&& value) {
set_has_label();
label_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:chrome_lang_id.Token.label)
}
#endif
void Token::set_label(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_label();
label_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:chrome_lang_id.Token.label)
}
void Token::set_label(const char* value, size_t size) {
set_has_label();
label_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:chrome_lang_id.Token.label)
}
::std::string* Token::mutable_label() {
set_has_label();
// @@protoc_insertion_point(field_mutable:chrome_lang_id.Token.label)
return label_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Token::release_label() {
// @@protoc_insertion_point(field_release:chrome_lang_id.Token.label)
clear_has_label();
return label_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Token::set_allocated_label(::std::string* label) {
if (label != NULL) {
set_has_label();
} else {
clear_has_label();
}
label_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), label);
// @@protoc_insertion_point(field_set_allocated:chrome_lang_id.Token.label)
}
// optional .chrome_lang_id.Token.BreakLevel break_level = 8 [default = SPACE_BREAK];
bool Token::has_break_level() const {
return (_has_bits_[0] & 0x00000080u) != 0;
}
void Token::set_has_break_level() {
_has_bits_[0] |= 0x00000080u;
}
void Token::clear_has_break_level() {
_has_bits_[0] &= ~0x00000080u;
}
void Token::clear_break_level() {
break_level_ = 1;
clear_has_break_level();
}
::chrome_lang_id::Token_BreakLevel Token::break_level() const {
// @@protoc_insertion_point(field_get:chrome_lang_id.Token.break_level)
return static_cast< ::chrome_lang_id::Token_BreakLevel >(break_level_);
}
void Token::set_break_level(::chrome_lang_id::Token_BreakLevel value) {
assert(::chrome_lang_id::Token_BreakLevel_IsValid(value));
set_has_break_level();
break_level_ = value;
// @@protoc_insertion_point(field_set:chrome_lang_id.Token.break_level)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// @@protoc_insertion_point(namespace_scope)
} // namespace chrome_lang_id
// @@protoc_insertion_point(global_scope)