00001
00002
00003 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
00004 #include "IndexMessages.pb.h"
00005 #include <google/protobuf/stubs/once.h>
00006 #include <google/protobuf/io/coded_stream.h>
00007 #include <google/protobuf/wire_format_lite_inl.h>
00008 #include <google/protobuf/descriptor.h>
00009 #include <google/protobuf/reflection_ops.h>
00010 #include <google/protobuf/wire_format.h>
00011
00012 namespace aitools {
00013 namespace invertedindex {
00014
00015 namespace {
00016
00017 const ::google::protobuf::Descriptor* Configuration_descriptor_ = NULL;
00018 const ::google::protobuf::internal::GeneratedMessageReflection*
00019 Configuration_reflection_ = NULL;
00020 const ::google::protobuf::EnumDescriptor* Configuration_InputFormat_descriptor_ = NULL;
00021 const ::google::protobuf::EnumDescriptor* Configuration_Sorting_descriptor_ = NULL;
00022 const ::google::protobuf::Descriptor* Header_descriptor_ = NULL;
00023 const ::google::protobuf::internal::GeneratedMessageReflection*
00024 Header_reflection_ = NULL;
00025
00026 }
00027
00028
00029 void protobuf_AssignDesc_IndexMessages_2eproto() {
00030 protobuf_AddDesc_IndexMessages_2eproto();
00031 const ::google::protobuf::FileDescriptor* file =
00032 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
00033 "IndexMessages.proto");
00034 GOOGLE_CHECK(file != NULL);
00035 Configuration_descriptor_ = file->message_type(0);
00036 static const int Configuration_offsets_[5] = {
00037 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, input_directory_),
00038 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, index_directory_),
00039 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, available_memory_),
00040 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, postlist_sorting_),
00041 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, input_format_),
00042 };
00043 Configuration_reflection_ =
00044 new ::google::protobuf::internal::GeneratedMessageReflection(
00045 Configuration_descriptor_,
00046 Configuration::default_instance_,
00047 Configuration_offsets_,
00048 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, _has_bits_[0]),
00049 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Configuration, _unknown_fields_),
00050 -1,
00051 ::google::protobuf::DescriptorPool::generated_pool(),
00052 ::google::protobuf::MessageFactory::generated_factory(),
00053 sizeof(Configuration));
00054 Configuration_InputFormat_descriptor_ = Configuration_descriptor_->enum_type(0);
00055 Configuration_Sorting_descriptor_ = Configuration_descriptor_->enum_type(1);
00056 Header_descriptor_ = file->message_type(1);
00057 static const int Header_offsets_[8] = {
00058 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, payload_),
00059 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, key_count_),
00060 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, value_count_),
00061 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, minor_version_),
00062 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, major_version_),
00063 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, indexing_duration_),
00064 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, value_class_name_),
00065 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, postlist_sorting_),
00066 };
00067 Header_reflection_ =
00068 new ::google::protobuf::internal::GeneratedMessageReflection(
00069 Header_descriptor_,
00070 Header::default_instance_,
00071 Header_offsets_,
00072 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, _has_bits_[0]),
00073 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Header, _unknown_fields_),
00074 -1,
00075 ::google::protobuf::DescriptorPool::generated_pool(),
00076 ::google::protobuf::MessageFactory::generated_factory(),
00077 sizeof(Header));
00078 }
00079
00080 namespace {
00081
00082 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
00083 inline void protobuf_AssignDescriptorsOnce() {
00084 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
00085 &protobuf_AssignDesc_IndexMessages_2eproto);
00086 }
00087
00088 void protobuf_RegisterTypes(const ::std::string&) {
00089 protobuf_AssignDescriptorsOnce();
00090 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
00091 Configuration_descriptor_, &Configuration::default_instance());
00092 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
00093 Header_descriptor_, &Header::default_instance());
00094 }
00095
00096 }
00097
00098 void protobuf_ShutdownFile_IndexMessages_2eproto() {
00099 delete Configuration::default_instance_;
00100 delete Configuration_reflection_;
00101 delete Header::default_instance_;
00102 delete Header_reflection_;
00103 }
00104
00105 void protobuf_AddDesc_IndexMessages_2eproto() {
00106 static bool already_here = false;
00107 if (already_here) return;
00108 already_here = true;
00109 GOOGLE_PROTOBUF_VERIFY_VERSION;
00110
00111 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
00112 "\n\023IndexMessages.proto\022\025aitools.invertedi"
00113 "ndex\"\373\002\n\rConfiguration\022\027\n\017input_director"
00114 "y\030\001 \001(\t\022\027\n\017index_directory\030\002 \001(\t\022\036\n\020avai"
00115 "lable_memory\030\003 \001(\r:\0042000\022P\n\020postlist_sor"
00116 "ting\030\004 \001(\0162,.aitools.invertedindex.Confi"
00117 "guration.Sorting:\010DISABLED\022W\n\014input_form"
00118 "at\030\005 \001(\01620.aitools.invertedindex.Configu"
00119 "ration.InputFormat:\017PSEUDO_INVERTED\"5\n\013I"
00120 "nputFormat\022\021\n\rREAL_INVERTED\020\000\022\023\n\017PSEUDO_"
00121 "INVERTED\020\001\"6\n\007Sorting\022\014\n\010DISABLED\020\000\022\r\n\tA"
00122 "SCENDING\020\001\022\016\n\nDESCENDING\020\002\"\354\001\n\006Header\022\017\n"
00123 "\007payload\030\001 \001(\003\022\021\n\tkey_count\030\002 \001(\003\022\023\n\013val"
00124 "ue_count\030\003 \001(\003\022\025\n\rminor_version\030\004 \001(\005\022\025\n"
00125 "\rmajor_version\030\005 \001(\005\022\031\n\021indexing_duratio"
00126 "n\030\006 \001(\005\022\030\n\020value_class_name\030\007 \001(\t\022F\n\020pos"
00127 "tlist_sorting\030\010 \001(\0162,.aitools.invertedin"
00128 "dex.Configuration.SortingB)\n%de.aitools."
00129 "aq.invertedindex.generatedH\001", 708);
00130 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
00131 "IndexMessages.proto", &protobuf_RegisterTypes);
00132 Configuration::default_instance_ = new Configuration();
00133 Header::default_instance_ = new Header();
00134 Configuration::default_instance_->InitAsDefaultInstance();
00135 Header::default_instance_->InitAsDefaultInstance();
00136 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_IndexMessages_2eproto);
00137 }
00138
00139
00140 struct StaticDescriptorInitializer_IndexMessages_2eproto {
00141 StaticDescriptorInitializer_IndexMessages_2eproto() {
00142 protobuf_AddDesc_IndexMessages_2eproto();
00143 }
00144 } static_descriptor_initializer_IndexMessages_2eproto_;
00145
00146
00147
00148
00149 const ::google::protobuf::EnumDescriptor* Configuration_InputFormat_descriptor() {
00150 protobuf_AssignDescriptorsOnce();
00151 return Configuration_InputFormat_descriptor_;
00152 }
00153 bool Configuration_InputFormat_IsValid(int value) {
00154 switch(value) {
00155 case 0:
00156 case 1:
00157 return true;
00158 default:
00159 return false;
00160 }
00161 }
00162
00163 #ifndef _MSC_VER
00164 const Configuration_InputFormat Configuration::REAL_INVERTED;
00165 const Configuration_InputFormat Configuration::PSEUDO_INVERTED;
00166 const Configuration_InputFormat Configuration::InputFormat_MIN;
00167 const Configuration_InputFormat Configuration::InputFormat_MAX;
00168 #endif // _MSC_VER
00169 const ::google::protobuf::EnumDescriptor* Configuration_Sorting_descriptor() {
00170 protobuf_AssignDescriptorsOnce();
00171 return Configuration_Sorting_descriptor_;
00172 }
00173 bool Configuration_Sorting_IsValid(int value) {
00174 switch(value) {
00175 case 0:
00176 case 1:
00177 case 2:
00178 return true;
00179 default:
00180 return false;
00181 }
00182 }
00183
00184 #ifndef _MSC_VER
00185 const Configuration_Sorting Configuration::DISABLED;
00186 const Configuration_Sorting Configuration::ASCENDING;
00187 const Configuration_Sorting Configuration::DESCENDING;
00188 const Configuration_Sorting Configuration::Sorting_MIN;
00189 const Configuration_Sorting Configuration::Sorting_MAX;
00190 #endif // _MSC_VER
00191 const ::std::string Configuration::_default_input_directory_;
00192 const ::std::string Configuration::_default_index_directory_;
00193 #ifndef _MSC_VER
00194 const int Configuration::kInputDirectoryFieldNumber;
00195 const int Configuration::kIndexDirectoryFieldNumber;
00196 const int Configuration::kAvailableMemoryFieldNumber;
00197 const int Configuration::kPostlistSortingFieldNumber;
00198 const int Configuration::kInputFormatFieldNumber;
00199 #endif // !_MSC_VER
00200
00201 Configuration::Configuration() {
00202 SharedCtor();
00203 }
00204
00205 void Configuration::InitAsDefaultInstance() {
00206 }
00207
00208 Configuration::Configuration(const Configuration& from) {
00209 SharedCtor();
00210 MergeFrom(from);
00211 }
00212
00213 void Configuration::SharedCtor() {
00214 _cached_size_ = 0;
00215 input_directory_ = const_cast< ::std::string*>(&_default_input_directory_);
00216 index_directory_ = const_cast< ::std::string*>(&_default_index_directory_);
00217 available_memory_ = 2000u;
00218 postlist_sorting_ = 0;
00219 input_format_ = 1;
00220 ::memset(_has_bits_, 0, sizeof(_has_bits_));
00221 }
00222
00223 Configuration::~Configuration() {
00224 SharedDtor();
00225 }
00226
00227 void Configuration::SharedDtor() {
00228 if (input_directory_ != &_default_input_directory_) {
00229 delete input_directory_;
00230 }
00231 if (index_directory_ != &_default_index_directory_) {
00232 delete index_directory_;
00233 }
00234 if (this != default_instance_) {
00235 }
00236 }
00237
00238 const ::google::protobuf::Descriptor* Configuration::descriptor() {
00239 protobuf_AssignDescriptorsOnce();
00240 return Configuration_descriptor_;
00241 }
00242
00243 const Configuration& Configuration::default_instance() {
00244 if (default_instance_ == NULL) protobuf_AddDesc_IndexMessages_2eproto(); return *default_instance_;
00245 }
00246
00247 Configuration* Configuration::default_instance_ = NULL;
00248
00249 Configuration* Configuration::New() const {
00250 return new Configuration;
00251 }
00252
00253 void Configuration::Clear() {
00254 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00255 if (_has_bit(0)) {
00256 if (input_directory_ != &_default_input_directory_) {
00257 input_directory_->clear();
00258 }
00259 }
00260 if (_has_bit(1)) {
00261 if (index_directory_ != &_default_index_directory_) {
00262 index_directory_->clear();
00263 }
00264 }
00265 available_memory_ = 2000u;
00266 postlist_sorting_ = 0;
00267 input_format_ = 1;
00268 }
00269 ::memset(_has_bits_, 0, sizeof(_has_bits_));
00270 mutable_unknown_fields()->Clear();
00271 }
00272
00273 bool Configuration::MergePartialFromCodedStream(
00274 ::google::protobuf::io::CodedInputStream* input) {
00275 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
00276 ::google::protobuf::uint32 tag;
00277 while ((tag = input->ReadTag()) != 0) {
00278 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
00279
00280 case 1: {
00281 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00282 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
00283 goto handle_uninterpreted;
00284 }
00285 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
00286 input, this->mutable_input_directory()));
00287 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00288 this->input_directory().data(), this->input_directory().length(),
00289 ::google::protobuf::internal::WireFormat::PARSE);
00290 if (input->ExpectTag(18)) goto parse_index_directory;
00291 break;
00292 }
00293
00294
00295 case 2: {
00296 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00297 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
00298 goto handle_uninterpreted;
00299 }
00300 parse_index_directory:
00301 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
00302 input, this->mutable_index_directory()));
00303 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00304 this->index_directory().data(), this->index_directory().length(),
00305 ::google::protobuf::internal::WireFormat::PARSE);
00306 if (input->ExpectTag(24)) goto parse_available_memory;
00307 break;
00308 }
00309
00310
00311 case 3: {
00312 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00313 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00314 goto handle_uninterpreted;
00315 }
00316 parse_available_memory:
00317 DO_(::google::protobuf::internal::WireFormatLite::ReadUInt32(
00318 input, &available_memory_));
00319 _set_bit(2);
00320 if (input->ExpectTag(32)) goto parse_postlist_sorting;
00321 break;
00322 }
00323
00324
00325 case 4: {
00326 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00327 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00328 goto handle_uninterpreted;
00329 }
00330 parse_postlist_sorting:
00331 int value;
00332 DO_(::google::protobuf::internal::WireFormatLite::ReadEnum(input, &value));
00333 if (::aitools::invertedindex::Configuration_Sorting_IsValid(value)) {
00334 set_postlist_sorting(static_cast< ::aitools::invertedindex::Configuration_Sorting >(value));
00335 } else {
00336 mutable_unknown_fields()->AddVarint(4, value);
00337 }
00338 if (input->ExpectTag(40)) goto parse_input_format;
00339 break;
00340 }
00341
00342
00343 case 5: {
00344 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00345 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00346 goto handle_uninterpreted;
00347 }
00348 parse_input_format:
00349 int value;
00350 DO_(::google::protobuf::internal::WireFormatLite::ReadEnum(input, &value));
00351 if (::aitools::invertedindex::Configuration_InputFormat_IsValid(value)) {
00352 set_input_format(static_cast< ::aitools::invertedindex::Configuration_InputFormat >(value));
00353 } else {
00354 mutable_unknown_fields()->AddVarint(5, value);
00355 }
00356 if (input->ExpectAtEnd()) return true;
00357 break;
00358 }
00359
00360 default: {
00361 handle_uninterpreted:
00362 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
00363 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
00364 return true;
00365 }
00366 DO_(::google::protobuf::internal::WireFormat::SkipField(
00367 input, tag, mutable_unknown_fields()));
00368 break;
00369 }
00370 }
00371 }
00372 return true;
00373 #undef DO_
00374 }
00375
00376 void Configuration::SerializeWithCachedSizes(
00377 ::google::protobuf::io::CodedOutputStream* output) const {
00378 ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
00379 if (raw_buffer != NULL) {
00380 Configuration::SerializeWithCachedSizesToArray(raw_buffer);
00381 return;
00382 }
00383
00384
00385 if (_has_bit(0)) {
00386 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00387 this->input_directory().data(), this->input_directory().length(),
00388 ::google::protobuf::internal::WireFormat::SERIALIZE);
00389 ::google::protobuf::internal::WireFormatLite::WriteString(
00390 1, this->input_directory(), output);
00391 }
00392
00393
00394 if (_has_bit(1)) {
00395 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00396 this->index_directory().data(), this->index_directory().length(),
00397 ::google::protobuf::internal::WireFormat::SERIALIZE);
00398 ::google::protobuf::internal::WireFormatLite::WriteString(
00399 2, this->index_directory(), output);
00400 }
00401
00402
00403 if (_has_bit(2)) {
00404 ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->available_memory(), output);
00405 }
00406
00407
00408 if (_has_bit(3)) {
00409 ::google::protobuf::internal::WireFormatLite::WriteEnum(
00410 4, this->postlist_sorting(), output);
00411 }
00412
00413
00414 if (_has_bit(4)) {
00415 ::google::protobuf::internal::WireFormatLite::WriteEnum(
00416 5, this->input_format(), output);
00417 }
00418
00419 if (!unknown_fields().empty()) {
00420 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
00421 unknown_fields(), output);
00422 }
00423 }
00424
00425 ::google::protobuf::uint8* Configuration::SerializeWithCachedSizesToArray(
00426 ::google::protobuf::uint8* target) const {
00427
00428 if (_has_bit(0)) {
00429 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00430 this->input_directory().data(), this->input_directory().length(),
00431 ::google::protobuf::internal::WireFormat::SERIALIZE);
00432 target =
00433 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
00434 1, this->input_directory(), target);
00435 }
00436
00437
00438 if (_has_bit(1)) {
00439 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00440 this->index_directory().data(), this->index_directory().length(),
00441 ::google::protobuf::internal::WireFormat::SERIALIZE);
00442 target =
00443 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
00444 2, this->index_directory(), target);
00445 }
00446
00447
00448 if (_has_bit(2)) {
00449 target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->available_memory(), target);
00450 }
00451
00452
00453 if (_has_bit(3)) {
00454 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
00455 4, this->postlist_sorting(), target);
00456 }
00457
00458
00459 if (_has_bit(4)) {
00460 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
00461 5, this->input_format(), target);
00462 }
00463
00464 if (!unknown_fields().empty()) {
00465 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
00466 unknown_fields(), target);
00467 }
00468 return target;
00469 }
00470
00471 int Configuration::ByteSize() const {
00472 int total_size = 0;
00473
00474 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00475
00476 if (has_input_directory()) {
00477 total_size += 1 +
00478 ::google::protobuf::internal::WireFormatLite::StringSize(
00479 this->input_directory());
00480 }
00481
00482
00483 if (has_index_directory()) {
00484 total_size += 1 +
00485 ::google::protobuf::internal::WireFormatLite::StringSize(
00486 this->index_directory());
00487 }
00488
00489
00490 if (has_available_memory()) {
00491 total_size += 1 +
00492 ::google::protobuf::internal::WireFormatLite::UInt32Size(
00493 this->available_memory());
00494 }
00495
00496
00497 if (has_postlist_sorting()) {
00498 total_size += 1 +
00499 ::google::protobuf::internal::WireFormatLite::EnumSize(this->postlist_sorting());
00500 }
00501
00502
00503 if (has_input_format()) {
00504 total_size += 1 +
00505 ::google::protobuf::internal::WireFormatLite::EnumSize(this->input_format());
00506 }
00507
00508 }
00509 if (!unknown_fields().empty()) {
00510 total_size +=
00511 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
00512 unknown_fields());
00513 }
00514 _cached_size_ = total_size;
00515 return total_size;
00516 }
00517
00518 void Configuration::MergeFrom(const ::google::protobuf::Message& from) {
00519 GOOGLE_CHECK_NE(&from, this);
00520 const Configuration* source =
00521 ::google::protobuf::internal::dynamic_cast_if_available<const Configuration*>(
00522 &from);
00523 if (source == NULL) {
00524 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
00525 } else {
00526 MergeFrom(*source);
00527 }
00528 }
00529
00530 void Configuration::MergeFrom(const Configuration& from) {
00531 GOOGLE_CHECK_NE(&from, this);
00532 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00533 if (from._has_bit(0)) {
00534 set_input_directory(from.input_directory());
00535 }
00536 if (from._has_bit(1)) {
00537 set_index_directory(from.index_directory());
00538 }
00539 if (from._has_bit(2)) {
00540 set_available_memory(from.available_memory());
00541 }
00542 if (from._has_bit(3)) {
00543 set_postlist_sorting(from.postlist_sorting());
00544 }
00545 if (from._has_bit(4)) {
00546 set_input_format(from.input_format());
00547 }
00548 }
00549 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
00550 }
00551
00552 void Configuration::CopyFrom(const ::google::protobuf::Message& from) {
00553 if (&from == this) return;
00554 Clear();
00555 MergeFrom(from);
00556 }
00557
00558 void Configuration::CopyFrom(const Configuration& from) {
00559 if (&from == this) return;
00560 Clear();
00561 MergeFrom(from);
00562 }
00563
00564 bool Configuration::IsInitialized() const {
00565
00566 return true;
00567 }
00568
00569 void Configuration::Swap(Configuration* other) {
00570 if (other != this) {
00571 std::swap(input_directory_, other->input_directory_);
00572 std::swap(index_directory_, other->index_directory_);
00573 std::swap(available_memory_, other->available_memory_);
00574 std::swap(postlist_sorting_, other->postlist_sorting_);
00575 std::swap(input_format_, other->input_format_);
00576 std::swap(_has_bits_[0], other->_has_bits_[0]);
00577 _unknown_fields_.Swap(&other->_unknown_fields_);
00578 std::swap(_cached_size_, other->_cached_size_);
00579 }
00580 }
00581
00582 ::google::protobuf::Metadata Configuration::GetMetadata() const {
00583 protobuf_AssignDescriptorsOnce();
00584 ::google::protobuf::Metadata metadata;
00585 metadata.descriptor = Configuration_descriptor_;
00586 metadata.reflection = Configuration_reflection_;
00587 return metadata;
00588 }
00589
00590
00591
00592
00593 const ::std::string Header::_default_value_class_name_;
00594 #ifndef _MSC_VER
00595 const int Header::kPayloadFieldNumber;
00596 const int Header::kKeyCountFieldNumber;
00597 const int Header::kValueCountFieldNumber;
00598 const int Header::kMinorVersionFieldNumber;
00599 const int Header::kMajorVersionFieldNumber;
00600 const int Header::kIndexingDurationFieldNumber;
00601 const int Header::kValueClassNameFieldNumber;
00602 const int Header::kPostlistSortingFieldNumber;
00603 #endif // !_MSC_VER
00604
00605 Header::Header() {
00606 SharedCtor();
00607 }
00608
00609 void Header::InitAsDefaultInstance() {
00610 }
00611
00612 Header::Header(const Header& from) {
00613 SharedCtor();
00614 MergeFrom(from);
00615 }
00616
00617 void Header::SharedCtor() {
00618 _cached_size_ = 0;
00619 payload_ = GOOGLE_LONGLONG(0);
00620 key_count_ = GOOGLE_LONGLONG(0);
00621 value_count_ = GOOGLE_LONGLONG(0);
00622 minor_version_ = 0;
00623 major_version_ = 0;
00624 indexing_duration_ = 0;
00625 value_class_name_ = const_cast< ::std::string*>(&_default_value_class_name_);
00626 postlist_sorting_ = 0;
00627 ::memset(_has_bits_, 0, sizeof(_has_bits_));
00628 }
00629
00630 Header::~Header() {
00631 SharedDtor();
00632 }
00633
00634 void Header::SharedDtor() {
00635 if (value_class_name_ != &_default_value_class_name_) {
00636 delete value_class_name_;
00637 }
00638 if (this != default_instance_) {
00639 }
00640 }
00641
00642 const ::google::protobuf::Descriptor* Header::descriptor() {
00643 protobuf_AssignDescriptorsOnce();
00644 return Header_descriptor_;
00645 }
00646
00647 const Header& Header::default_instance() {
00648 if (default_instance_ == NULL) protobuf_AddDesc_IndexMessages_2eproto(); return *default_instance_;
00649 }
00650
00651 Header* Header::default_instance_ = NULL;
00652
00653 Header* Header::New() const {
00654 return new Header;
00655 }
00656
00657 void Header::Clear() {
00658 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00659 payload_ = GOOGLE_LONGLONG(0);
00660 key_count_ = GOOGLE_LONGLONG(0);
00661 value_count_ = GOOGLE_LONGLONG(0);
00662 minor_version_ = 0;
00663 major_version_ = 0;
00664 indexing_duration_ = 0;
00665 if (_has_bit(6)) {
00666 if (value_class_name_ != &_default_value_class_name_) {
00667 value_class_name_->clear();
00668 }
00669 }
00670 postlist_sorting_ = 0;
00671 }
00672 ::memset(_has_bits_, 0, sizeof(_has_bits_));
00673 mutable_unknown_fields()->Clear();
00674 }
00675
00676 bool Header::MergePartialFromCodedStream(
00677 ::google::protobuf::io::CodedInputStream* input) {
00678 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
00679 ::google::protobuf::uint32 tag;
00680 while ((tag = input->ReadTag()) != 0) {
00681 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
00682
00683 case 1: {
00684 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00685 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00686 goto handle_uninterpreted;
00687 }
00688 DO_(::google::protobuf::internal::WireFormatLite::ReadInt64(
00689 input, &payload_));
00690 _set_bit(0);
00691 if (input->ExpectTag(16)) goto parse_key_count;
00692 break;
00693 }
00694
00695
00696 case 2: {
00697 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00698 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00699 goto handle_uninterpreted;
00700 }
00701 parse_key_count:
00702 DO_(::google::protobuf::internal::WireFormatLite::ReadInt64(
00703 input, &key_count_));
00704 _set_bit(1);
00705 if (input->ExpectTag(24)) goto parse_value_count;
00706 break;
00707 }
00708
00709
00710 case 3: {
00711 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00712 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00713 goto handle_uninterpreted;
00714 }
00715 parse_value_count:
00716 DO_(::google::protobuf::internal::WireFormatLite::ReadInt64(
00717 input, &value_count_));
00718 _set_bit(2);
00719 if (input->ExpectTag(32)) goto parse_minor_version;
00720 break;
00721 }
00722
00723
00724 case 4: {
00725 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00726 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00727 goto handle_uninterpreted;
00728 }
00729 parse_minor_version:
00730 DO_(::google::protobuf::internal::WireFormatLite::ReadInt32(
00731 input, &minor_version_));
00732 _set_bit(3);
00733 if (input->ExpectTag(40)) goto parse_major_version;
00734 break;
00735 }
00736
00737
00738 case 5: {
00739 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00740 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00741 goto handle_uninterpreted;
00742 }
00743 parse_major_version:
00744 DO_(::google::protobuf::internal::WireFormatLite::ReadInt32(
00745 input, &major_version_));
00746 _set_bit(4);
00747 if (input->ExpectTag(48)) goto parse_indexing_duration;
00748 break;
00749 }
00750
00751
00752 case 6: {
00753 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00754 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00755 goto handle_uninterpreted;
00756 }
00757 parse_indexing_duration:
00758 DO_(::google::protobuf::internal::WireFormatLite::ReadInt32(
00759 input, &indexing_duration_));
00760 _set_bit(5);
00761 if (input->ExpectTag(58)) goto parse_value_class_name;
00762 break;
00763 }
00764
00765
00766 case 7: {
00767 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00768 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
00769 goto handle_uninterpreted;
00770 }
00771 parse_value_class_name:
00772 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
00773 input, this->mutable_value_class_name()));
00774 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00775 this->value_class_name().data(), this->value_class_name().length(),
00776 ::google::protobuf::internal::WireFormat::PARSE);
00777 if (input->ExpectTag(64)) goto parse_postlist_sorting;
00778 break;
00779 }
00780
00781
00782 case 8: {
00783 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) !=
00784 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
00785 goto handle_uninterpreted;
00786 }
00787 parse_postlist_sorting:
00788 int value;
00789 DO_(::google::protobuf::internal::WireFormatLite::ReadEnum(input, &value));
00790 if (::aitools::invertedindex::Configuration_Sorting_IsValid(value)) {
00791 set_postlist_sorting(static_cast< ::aitools::invertedindex::Configuration_Sorting >(value));
00792 } else {
00793 mutable_unknown_fields()->AddVarint(8, value);
00794 }
00795 if (input->ExpectAtEnd()) return true;
00796 break;
00797 }
00798
00799 default: {
00800 handle_uninterpreted:
00801 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
00802 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
00803 return true;
00804 }
00805 DO_(::google::protobuf::internal::WireFormat::SkipField(
00806 input, tag, mutable_unknown_fields()));
00807 break;
00808 }
00809 }
00810 }
00811 return true;
00812 #undef DO_
00813 }
00814
00815 void Header::SerializeWithCachedSizes(
00816 ::google::protobuf::io::CodedOutputStream* output) const {
00817 ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_);
00818 if (raw_buffer != NULL) {
00819 Header::SerializeWithCachedSizesToArray(raw_buffer);
00820 return;
00821 }
00822
00823
00824 if (_has_bit(0)) {
00825 ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->payload(), output);
00826 }
00827
00828
00829 if (_has_bit(1)) {
00830 ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->key_count(), output);
00831 }
00832
00833
00834 if (_has_bit(2)) {
00835 ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->value_count(), output);
00836 }
00837
00838
00839 if (_has_bit(3)) {
00840 ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->minor_version(), output);
00841 }
00842
00843
00844 if (_has_bit(4)) {
00845 ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->major_version(), output);
00846 }
00847
00848
00849 if (_has_bit(5)) {
00850 ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->indexing_duration(), output);
00851 }
00852
00853
00854 if (_has_bit(6)) {
00855 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00856 this->value_class_name().data(), this->value_class_name().length(),
00857 ::google::protobuf::internal::WireFormat::SERIALIZE);
00858 ::google::protobuf::internal::WireFormatLite::WriteString(
00859 7, this->value_class_name(), output);
00860 }
00861
00862
00863 if (_has_bit(7)) {
00864 ::google::protobuf::internal::WireFormatLite::WriteEnum(
00865 8, this->postlist_sorting(), output);
00866 }
00867
00868 if (!unknown_fields().empty()) {
00869 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
00870 unknown_fields(), output);
00871 }
00872 }
00873
00874 ::google::protobuf::uint8* Header::SerializeWithCachedSizesToArray(
00875 ::google::protobuf::uint8* target) const {
00876
00877 if (_has_bit(0)) {
00878 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->payload(), target);
00879 }
00880
00881
00882 if (_has_bit(1)) {
00883 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->key_count(), target);
00884 }
00885
00886
00887 if (_has_bit(2)) {
00888 target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->value_count(), target);
00889 }
00890
00891
00892 if (_has_bit(3)) {
00893 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->minor_version(), target);
00894 }
00895
00896
00897 if (_has_bit(4)) {
00898 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->major_version(), target);
00899 }
00900
00901
00902 if (_has_bit(5)) {
00903 target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->indexing_duration(), target);
00904 }
00905
00906
00907 if (_has_bit(6)) {
00908 ::google::protobuf::internal::WireFormat::VerifyUTF8String(
00909 this->value_class_name().data(), this->value_class_name().length(),
00910 ::google::protobuf::internal::WireFormat::SERIALIZE);
00911 target =
00912 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
00913 7, this->value_class_name(), target);
00914 }
00915
00916
00917 if (_has_bit(7)) {
00918 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
00919 8, this->postlist_sorting(), target);
00920 }
00921
00922 if (!unknown_fields().empty()) {
00923 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
00924 unknown_fields(), target);
00925 }
00926 return target;
00927 }
00928
00929 int Header::ByteSize() const {
00930 int total_size = 0;
00931
00932 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
00933
00934 if (has_payload()) {
00935 total_size += 1 +
00936 ::google::protobuf::internal::WireFormatLite::Int64Size(
00937 this->payload());
00938 }
00939
00940
00941 if (has_key_count()) {
00942 total_size += 1 +
00943 ::google::protobuf::internal::WireFormatLite::Int64Size(
00944 this->key_count());
00945 }
00946
00947
00948 if (has_value_count()) {
00949 total_size += 1 +
00950 ::google::protobuf::internal::WireFormatLite::Int64Size(
00951 this->value_count());
00952 }
00953
00954
00955 if (has_minor_version()) {
00956 total_size += 1 +
00957 ::google::protobuf::internal::WireFormatLite::Int32Size(
00958 this->minor_version());
00959 }
00960
00961
00962 if (has_major_version()) {
00963 total_size += 1 +
00964 ::google::protobuf::internal::WireFormatLite::Int32Size(
00965 this->major_version());
00966 }
00967
00968
00969 if (has_indexing_duration()) {
00970 total_size += 1 +
00971 ::google::protobuf::internal::WireFormatLite::Int32Size(
00972 this->indexing_duration());
00973 }
00974
00975
00976 if (has_value_class_name()) {
00977 total_size += 1 +
00978 ::google::protobuf::internal::WireFormatLite::StringSize(
00979 this->value_class_name());
00980 }
00981
00982
00983 if (has_postlist_sorting()) {
00984 total_size += 1 +
00985 ::google::protobuf::internal::WireFormatLite::EnumSize(this->postlist_sorting());
00986 }
00987
00988 }
00989 if (!unknown_fields().empty()) {
00990 total_size +=
00991 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
00992 unknown_fields());
00993 }
00994 _cached_size_ = total_size;
00995 return total_size;
00996 }
00997
00998 void Header::MergeFrom(const ::google::protobuf::Message& from) {
00999 GOOGLE_CHECK_NE(&from, this);
01000 const Header* source =
01001 ::google::protobuf::internal::dynamic_cast_if_available<const Header*>(
01002 &from);
01003 if (source == NULL) {
01004 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
01005 } else {
01006 MergeFrom(*source);
01007 }
01008 }
01009
01010 void Header::MergeFrom(const Header& from) {
01011 GOOGLE_CHECK_NE(&from, this);
01012 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
01013 if (from._has_bit(0)) {
01014 set_payload(from.payload());
01015 }
01016 if (from._has_bit(1)) {
01017 set_key_count(from.key_count());
01018 }
01019 if (from._has_bit(2)) {
01020 set_value_count(from.value_count());
01021 }
01022 if (from._has_bit(3)) {
01023 set_minor_version(from.minor_version());
01024 }
01025 if (from._has_bit(4)) {
01026 set_major_version(from.major_version());
01027 }
01028 if (from._has_bit(5)) {
01029 set_indexing_duration(from.indexing_duration());
01030 }
01031 if (from._has_bit(6)) {
01032 set_value_class_name(from.value_class_name());
01033 }
01034 if (from._has_bit(7)) {
01035 set_postlist_sorting(from.postlist_sorting());
01036 }
01037 }
01038 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
01039 }
01040
01041 void Header::CopyFrom(const ::google::protobuf::Message& from) {
01042 if (&from == this) return;
01043 Clear();
01044 MergeFrom(from);
01045 }
01046
01047 void Header::CopyFrom(const Header& from) {
01048 if (&from == this) return;
01049 Clear();
01050 MergeFrom(from);
01051 }
01052
01053 bool Header::IsInitialized() const {
01054
01055 return true;
01056 }
01057
01058 void Header::Swap(Header* other) {
01059 if (other != this) {
01060 std::swap(payload_, other->payload_);
01061 std::swap(key_count_, other->key_count_);
01062 std::swap(value_count_, other->value_count_);
01063 std::swap(minor_version_, other->minor_version_);
01064 std::swap(major_version_, other->major_version_);
01065 std::swap(indexing_duration_, other->indexing_duration_);
01066 std::swap(value_class_name_, other->value_class_name_);
01067 std::swap(postlist_sorting_, other->postlist_sorting_);
01068 std::swap(_has_bits_[0], other->_has_bits_[0]);
01069 _unknown_fields_.Swap(&other->_unknown_fields_);
01070 std::swap(_cached_size_, other->_cached_size_);
01071 }
01072 }
01073
01074 ::google::protobuf::Metadata Header::GetMetadata() const {
01075 protobuf_AssignDescriptorsOnce();
01076 ::google::protobuf::Metadata metadata;
01077 metadata.descriptor = Header_descriptor_;
01078 metadata.reflection = Header_reflection_;
01079 return metadata;
01080 }
01081
01082
01083 }
01084 }