// Generated by the protocol buffer compiler. DO NOT EDIT! // source: JSON.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "JSON.pb.h" #include #include #include #include #include #include #include #include #include // @@protoc_insertion_point(includes) namespace { const ::google::protobuf::Descriptor* JSONProto_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* JSONProto_reflection_ = NULL; } // namespace void protobuf_AssignDesc_JSON_2eproto() { protobuf_AddDesc_JSON_2eproto(); const ::google::protobuf::FileDescriptor* file = ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "JSON.proto"); GOOGLE_CHECK(file != NULL); JSONProto_descriptor_ = file->message_type(0); static const int JSONProto_offsets_[4] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, compound_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, key_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, atom_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, verbatim_), }; JSONProto_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( JSONProto_descriptor_, JSONProto::default_instance_, JSONProto_offsets_, GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, _has_bits_[0]), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(JSONProto, _unknown_fields_), -1, ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(JSONProto)); } namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); inline void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, &protobuf_AssignDesc_JSON_2eproto); } void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( JSONProto_descriptor_, &JSONProto::default_instance()); } } // namespace void protobuf_ShutdownFile_JSON_2eproto() { delete JSONProto::default_instance_; delete JSONProto_reflection_; } void protobuf_AddDesc_JSON_2eproto() { static bool already_here = false; if (already_here) return; already_here = true; GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n\nJSON.proto\"V\n\tJSONProto\022\034\n\010compound\030\001 " "\003(\0132\n.JSONProto\022\013\n\003key\030\002 \001(\t\022\014\n\004atom\030\003 \001" "(\t\022\020\n\010verbatim\030\004 \001(\010", 100); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "JSON.proto", &protobuf_RegisterTypes); JSONProto::default_instance_ = new JSONProto(); JSONProto::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_JSON_2eproto); } // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_JSON_2eproto { StaticDescriptorInitializer_JSON_2eproto() { protobuf_AddDesc_JSON_2eproto(); } } static_descriptor_initializer_JSON_2eproto_; // =================================================================== #ifndef _MSC_VER const int JSONProto::kCompoundFieldNumber; const int JSONProto::kKeyFieldNumber; const int JSONProto::kAtomFieldNumber; const int JSONProto::kVerbatimFieldNumber; #endif // !_MSC_VER JSONProto::JSONProto() : ::google::protobuf::Message() { SharedCtor(); } void JSONProto::InitAsDefaultInstance() { } JSONProto::JSONProto(const JSONProto& from) : ::google::protobuf::Message() { SharedCtor(); MergeFrom(from); } void JSONProto::SharedCtor() { _cached_size_ = 0; key_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); atom_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); verbatim_ = false; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } JSONProto::~JSONProto() { SharedDtor(); } void JSONProto::SharedDtor() { if (key_ != &::google::protobuf::internal::kEmptyString) { delete key_; } if (atom_ != &::google::protobuf::internal::kEmptyString) { delete atom_; } if (this != default_instance_) { } } void JSONProto::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* JSONProto::descriptor() { protobuf_AssignDescriptorsOnce(); return JSONProto_descriptor_; } const JSONProto& JSONProto::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_JSON_2eproto(); return *default_instance_; } JSONProto* JSONProto::default_instance_ = NULL; JSONProto* JSONProto::New() const { return new JSONProto; } void JSONProto::Clear() { if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { if (has_key()) { if (key_ != &::google::protobuf::internal::kEmptyString) { key_->clear(); } } if (has_atom()) { if (atom_ != &::google::protobuf::internal::kEmptyString) { atom_->clear(); } } verbatim_ = false; } compound_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->Clear(); } bool JSONProto::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) return false ::google::protobuf::uint32 tag; while ((tag = input->ReadTag()) != 0) { switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .JSONProto compound = 1; case 1: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { parse_compound: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_compound())); } else { goto handle_uninterpreted; } if (input->ExpectTag(10)) goto parse_compound; if (input->ExpectTag(18)) goto parse_key; break; } // optional string key = 2; case 2: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { parse_key: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_key())); ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->key().data(), this->key().length(), ::google::protobuf::internal::WireFormat::PARSE); } else { goto handle_uninterpreted; } if (input->ExpectTag(26)) goto parse_atom; break; } // optional string atom = 3; case 3: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { parse_atom: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_atom())); ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->atom().data(), this->atom().length(), ::google::protobuf::internal::WireFormat::PARSE); } else { goto handle_uninterpreted; } if (input->ExpectTag(32)) goto parse_verbatim; break; } // optional bool verbatim = 4; case 4: { if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { parse_verbatim: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &verbatim_))); set_has_verbatim(); } else { goto handle_uninterpreted; } if (input->ExpectAtEnd()) return true; break; } default: { handle_uninterpreted: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { return true; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, mutable_unknown_fields())); break; } } } return true; #undef DO_ } void JSONProto::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // repeated .JSONProto compound = 1; for (int i = 0; i < this->compound_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->compound(i), output); } // optional string key = 2; if (has_key()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->key().data(), this->key().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->key(), output); } // optional string atom = 3; if (has_atom()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->atom().data(), this->atom().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->atom(), output); } // optional bool verbatim = 4; if (has_verbatim()) { ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->verbatim(), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); } } ::google::protobuf::uint8* JSONProto::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // repeated .JSONProto compound = 1; for (int i = 0; i < this->compound_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 1, this->compound(i), target); } // optional string key = 2; if (has_key()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->key().data(), this->key().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->key(), target); } // optional string atom = 3; if (has_atom()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->atom().data(), this->atom().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->atom(), target); } // optional bool verbatim = 4; if (has_verbatim()) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->verbatim(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target; } int JSONProto::ByteSize() const { int total_size = 0; if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { // optional string key = 2; if (has_key()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->key()); } // optional string atom = 3; if (has_atom()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->atom()); } // optional bool verbatim = 4; if (has_verbatim()) { total_size += 1 + 1; } } // repeated .JSONProto compound = 1; total_size += 1 * this->compound_size(); for (int i = 0; i < this->compound_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->compound(i)); } if (!unknown_fields().empty()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void JSONProto::MergeFrom(const ::google::protobuf::Message& from) { GOOGLE_CHECK_NE(&from, this); const JSONProto* source = ::google::protobuf::internal::dynamic_cast_if_available( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { MergeFrom(*source); } } void JSONProto::MergeFrom(const JSONProto& from) { GOOGLE_CHECK_NE(&from, this); compound_.MergeFrom(from.compound_); if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { if (from.has_key()) { set_key(from.key()); } if (from.has_atom()) { set_atom(from.atom()); } if (from.has_verbatim()) { set_verbatim(from.verbatim()); } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } void JSONProto::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } void JSONProto::CopyFrom(const JSONProto& from) { if (&from == this) return; Clear(); MergeFrom(from); } bool JSONProto::IsInitialized() const { return true; } void JSONProto::Swap(JSONProto* other) { if (other != this) { compound_.Swap(&other->compound_); std::swap(key_, other->key_); std::swap(atom_, other->atom_); std::swap(verbatim_, other->verbatim_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); } } ::google::protobuf::Metadata JSONProto::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; metadata.descriptor = JSONProto_descriptor_; metadata.reflection = JSONProto_reflection_; return metadata; } // @@protoc_insertion_point(namespace_scope) // @@protoc_insertion_point(global_scope)