// Generated by the protocol buffer compiler. DO NOT EDIT! // source: loomplan.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "loomplan.pb.h" #include #include #include #include #include #include // @@protoc_insertion_point(includes) namespace loomplan { void protobuf_ShutdownFile_loomplan_2eproto() { delete Task::default_instance_; delete Plan::default_instance_; } #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER void protobuf_AddDesc_loomplan_2eproto_impl() { GOOGLE_PROTOBUF_VERIFY_VERSION; #else void protobuf_AddDesc_loomplan_2eproto() { static bool already_here = false; if (already_here) return; already_here = true; GOOGLE_PROTOBUF_VERIFY_VERSION; #endif Task::default_instance_ = new Task(); Plan::default_instance_ = new Plan(); Task::default_instance_->InitAsDefaultInstance(); Plan::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_loomplan_2eproto); } #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_loomplan_2eproto_once_); void protobuf_AddDesc_loomplan_2eproto() { ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_loomplan_2eproto_once_, &protobuf_AddDesc_loomplan_2eproto_impl); } #else // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_loomplan_2eproto { StaticDescriptorInitializer_loomplan_2eproto() { protobuf_AddDesc_loomplan_2eproto(); } } static_descriptor_initializer_loomplan_2eproto_; #endif // =================================================================== bool Task_Policy_IsValid(int value) { switch(value) { case 1: case 2: case 3: return true; default: return false; } } #ifndef _MSC_VER const Task_Policy Task::POLICY_STANDARD; const Task_Policy Task::POLICY_SIMPLE; const Task_Policy Task::POLICY_SCHEDULER; const Task_Policy Task::Policy_MIN; const Task_Policy Task::Policy_MAX; const int Task::Policy_ARRAYSIZE; #endif // _MSC_VER #ifndef _MSC_VER const int Task::kTaskTypeFieldNumber; const int Task::kConfigFieldNumber; const int Task::kInputIdsFieldNumber; const int Task::kPolicyFieldNumber; #endif // !_MSC_VER Task::Task() : ::google::protobuf::MessageLite() { SharedCtor(); // @@protoc_insertion_point(constructor:loomplan.Task) } void Task::InitAsDefaultInstance() { } Task::Task(const Task& from) : ::google::protobuf::MessageLite() { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:loomplan.Task) } void Task::SharedCtor() { ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; task_type_ = 0; config_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); policy_ = 1; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Task::~Task() { // @@protoc_insertion_point(destructor:loomplan.Task) SharedDtor(); } void Task::SharedDtor() { if (config_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { delete config_; } #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER if (this != &default_instance()) { #else if (this != default_instance_) { #endif } } void Task::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const Task& Task::default_instance() { #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_AddDesc_loomplan_2eproto(); #else if (default_instance_ == NULL) protobuf_AddDesc_loomplan_2eproto(); #endif return *default_instance_; } Task* Task::default_instance_ = NULL; Task* Task::New() const { return new Task; } void Task::Clear() { if (_has_bits_[0 / 32] & 11) { task_type_ = 0; if (has_config()) { if (config_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { config_->clear(); } } policy_ = 1; } input_ids_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->clear(); } bool Task::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::StringOutputStream unknown_fields_string( mutable_unknown_fields()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_string); // @@protoc_insertion_point(parse_start:loomplan.Task) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required int32 task_type = 1; case 1: { if (tag == 8) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &task_type_))); set_has_task_type(); } else { goto handle_unusual; } if (input->ExpectTag(18)) goto parse_config; break; } // required bytes config = 2; case 2: { if (tag == 18) { parse_config: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( input, this->mutable_config())); } else { goto handle_unusual; } if (input->ExpectTag(24)) goto parse_input_ids; break; } // repeated int32 input_ids = 3; case 3: { if (tag == 24) { parse_input_ids: DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 24, input, this->mutable_input_ids()))); } else if (tag == 26) { DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_input_ids()))); } else { goto handle_unusual; } if (input->ExpectTag(24)) goto parse_input_ids; if (input->ExpectTag(32)) goto parse_policy; break; } // optional .loomplan.Task.Policy policy = 4 [default = POLICY_STANDARD]; case 4: { if (tag == 32) { parse_policy: int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); if (::loomplan::Task_Policy_IsValid(value)) { set_policy(static_cast< ::loomplan::Task_Policy >(value)); } else { unknown_fields_stream.WriteVarint32(tag); unknown_fields_stream.WriteVarint32(value); } } else { goto handle_unusual; } if (input->ExpectAtEnd()) goto success; 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:loomplan.Task) return true; failure: // @@protoc_insertion_point(parse_failure:loomplan.Task) return false; #undef DO_ } void Task::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:loomplan.Task) // required int32 task_type = 1; if (has_task_type()) { ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->task_type(), output); } // required bytes config = 2; if (has_config()) { ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( 2, this->config(), output); } // repeated int32 input_ids = 3; for (int i = 0; i < this->input_ids_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteInt32( 3, this->input_ids(i), output); } // optional .loomplan.Task.Policy policy = 4 [default = POLICY_STANDARD]; if (has_policy()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 4, this->policy(), output); } output->WriteRaw(unknown_fields().data(), unknown_fields().size()); // @@protoc_insertion_point(serialize_end:loomplan.Task) } int Task::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // required int32 task_type = 1; if (has_task_type()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->task_type()); } // required bytes config = 2; if (has_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( this->config()); } // optional .loomplan.Task.Policy policy = 4 [default = POLICY_STANDARD]; if (has_policy()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->policy()); } } // repeated int32 input_ids = 3; { int data_size = 0; for (int i = 0; i < this->input_ids_size(); i++) { data_size += ::google::protobuf::internal::WireFormatLite:: Int32Size(this->input_ids(i)); } total_size += 1 * this->input_ids_size() + data_size; } total_size += unknown_fields().size(); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Task::CheckTypeAndMergeFrom( const ::google::protobuf::MessageLite& from) { MergeFrom(*::google::protobuf::down_cast(&from)); } void Task::MergeFrom(const Task& from) { GOOGLE_CHECK_NE(&from, this); input_ids_.MergeFrom(from.input_ids_); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { if (from.has_task_type()) { set_task_type(from.task_type()); } if (from.has_config()) { set_config(from.config()); } if (from.has_policy()) { set_policy(from.policy()); } } mutable_unknown_fields()->append(from.unknown_fields()); } void Task::CopyFrom(const Task& from) { if (&from == this) return; Clear(); MergeFrom(from); } bool Task::IsInitialized() const { if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; return true; } void Task::Swap(Task* other) { if (other != this) { std::swap(task_type_, other->task_type_); std::swap(config_, other->config_); input_ids_.Swap(&other->input_ids_); std::swap(policy_, other->policy_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.swap(other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); } } ::std::string Task::GetTypeName() const { return "loomplan.Task"; } // =================================================================== #ifndef _MSC_VER const int Plan::kTasksFieldNumber; const int Plan::kResultIdsFieldNumber; #endif // !_MSC_VER Plan::Plan() : ::google::protobuf::MessageLite() { SharedCtor(); // @@protoc_insertion_point(constructor:loomplan.Plan) } void Plan::InitAsDefaultInstance() { } Plan::Plan(const Plan& from) : ::google::protobuf::MessageLite() { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:loomplan.Plan) } void Plan::SharedCtor() { _cached_size_ = 0; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } Plan::~Plan() { // @@protoc_insertion_point(destructor:loomplan.Plan) SharedDtor(); } void Plan::SharedDtor() { #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER if (this != &default_instance()) { #else if (this != default_instance_) { #endif } } void Plan::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const Plan& Plan::default_instance() { #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_AddDesc_loomplan_2eproto(); #else if (default_instance_ == NULL) protobuf_AddDesc_loomplan_2eproto(); #endif return *default_instance_; } Plan* Plan::default_instance_ = NULL; Plan* Plan::New() const { return new Plan; } void Plan::Clear() { tasks_.Clear(); result_ids_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); mutable_unknown_fields()->clear(); } bool Plan::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; ::google::protobuf::io::StringOutputStream unknown_fields_string( mutable_unknown_fields()); ::google::protobuf::io::CodedOutputStream unknown_fields_stream( &unknown_fields_string); // @@protoc_insertion_point(parse_start:loomplan.Plan) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .loomplan.Task tasks = 2; case 2: { if (tag == 18) { parse_tasks: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_tasks())); } else { goto handle_unusual; } if (input->ExpectTag(18)) goto parse_tasks; if (input->ExpectTag(24)) goto parse_result_ids; break; } // repeated int32 result_ids = 3; case 3: { if (tag == 24) { parse_result_ids: DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1, 24, input, this->mutable_result_ids()))); } else if (tag == 26) { DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_result_ids()))); } else { goto handle_unusual; } if (input->ExpectTag(24)) goto parse_result_ids; if (input->ExpectAtEnd()) goto success; 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:loomplan.Plan) return true; failure: // @@protoc_insertion_point(parse_failure:loomplan.Plan) return false; #undef DO_ } void Plan::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:loomplan.Plan) // repeated .loomplan.Task tasks = 2; for (int i = 0; i < this->tasks_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessage( 2, this->tasks(i), output); } // repeated int32 result_ids = 3; for (int i = 0; i < this->result_ids_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteInt32( 3, this->result_ids(i), output); } output->WriteRaw(unknown_fields().data(), unknown_fields().size()); // @@protoc_insertion_point(serialize_end:loomplan.Plan) } int Plan::ByteSize() const { int total_size = 0; // repeated .loomplan.Task tasks = 2; total_size += 1 * this->tasks_size(); for (int i = 0; i < this->tasks_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->tasks(i)); } // repeated int32 result_ids = 3; { int data_size = 0; for (int i = 0; i < this->result_ids_size(); i++) { data_size += ::google::protobuf::internal::WireFormatLite:: Int32Size(this->result_ids(i)); } total_size += 1 * this->result_ids_size() + data_size; } total_size += unknown_fields().size(); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void Plan::CheckTypeAndMergeFrom( const ::google::protobuf::MessageLite& from) { MergeFrom(*::google::protobuf::down_cast(&from)); } void Plan::MergeFrom(const Plan& from) { GOOGLE_CHECK_NE(&from, this); tasks_.MergeFrom(from.tasks_); result_ids_.MergeFrom(from.result_ids_); mutable_unknown_fields()->append(from.unknown_fields()); } void Plan::CopyFrom(const Plan& from) { if (&from == this) return; Clear(); MergeFrom(from); } bool Plan::IsInitialized() const { if (!::google::protobuf::internal::AllAreInitialized(this->tasks())) return false; return true; } void Plan::Swap(Plan* other) { if (other != this) { tasks_.Swap(&other->tasks_); result_ids_.Swap(&other->result_ids_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.swap(other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); } } ::std::string Plan::GetTypeName() const { return "loomplan.Plan"; } // @@protoc_insertion_point(namespace_scope) } // namespace loomplan // @@protoc_insertion_point(global_scope)