00001 #include "utilities/message.h" 00002 00003 namespace utilities 00004 { 00005 Message::Message() {} 00006 00007 Message::Message(const Message& src) 00008 : receipt_time_(src.receipt_time_), variant_(src.variant_) 00009 { 00010 } 00011 00012 Message::~Message() {} 00013 00014 void Message::setReceiptTime(const ros::Time& receipt_time) 00015 { 00016 receipt_time_ = receipt_time; 00017 } 00018 00019 const ros::Time& Message::getReceiptTime() const { return receipt_time_; } 00020 00021 void Message::setVariant(const variant_topic_tools::MessageVariant& variant) 00022 { 00023 variant_ = variant; 00024 } 00025 00026 const variant_topic_tools::MessageVariant& Message::getVariant() const 00027 { 00028 return variant_; 00029 } 00030 00031 bool Message::isEmpty() const { return variant_.isEmpty(); } 00032 00033 void Message::clear() 00034 { 00035 receipt_time_ = ros::Time(); 00036 variant_.clear(); 00037 } 00038 }