23 #include "queue_xml_callbacks.h" 29 void goby::transitional::QueueContentHandler::startElement(
30 const XMLCh*
const uri,
31 const XMLCh*
const localname,
32 const XMLCh*
const qname,
33 const Attributes& attrs)
36 Tag current_tag = tags_map_[toNative(localname)];
37 parents_.insert(current_tag);
45 q_.back().mutable_key()->set_type(goby::transitional::protobuf::QUEUE_DCCL);
52 void goby::transitional::QueueContentHandler::endElement(
53 const XMLCh*
const uri,
54 const XMLCh*
const localname,
55 const XMLCh*
const qname)
57 std::string trimmed_data = boost::trim_copy(current_text);
59 Tag current_tag = tags_map_[toNative(localname)];
60 parents_.erase(current_tag);
63 using google::protobuf::uint32;
69 case tag_ack: q_.back().set_ack(as<bool>(trimmed_data));
break;
71 case tag_blackout_time: q_.back().set_blackout_time(as<uint32>(trimmed_data));
break;
73 case tag_max_queue: q_.back().set_max_queue(as<uint32>(trimmed_data));
break;
75 case tag_newest_first: q_.back().set_newest_first(as<bool>(trimmed_data));
break;
77 case tag_id: q_.back().mutable_key()->set_id(as<uint32>(trimmed_data));
break;
79 case tag_priority_base:
80 case tag_priority_time_const:
85 if (!in_message_var() && !in_header_var())
86 q_.back().set_name(trimmed_data);
89 case tag_ttl: q_.back().set_ttl(as<uint32>(trimmed_data));
break;
91 case tag_value_base: q_.back().set_value_base(as<double>(trimmed_data));
break;