namespace {
+class GetEventTypeVistor : public boost::static_visitor<EventType> {
+public:
+ template <typename Event>
+ inline EventType operator()(const Event &event) const {
+ return Event::EVENT_TYPE;
+ }
+};
+
class EncodeEventVisitor : public boost::static_visitor<void> {
public:
EncodeEventVisitor(bufferlist &bl) : m_bl(bl) {
void UnknownEvent::dump(Formatter *f) const {
}
+EventType EventEntry::get_event_type() const {
+ return boost::apply_visitor(GetEventTypeVistor(), event);
+}
+
void EventEntry::encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
boost::apply_visitor(EncodeEventVisitor(bl), event);
}
return out;
}
-
Event event;
+ EventType get_event_type() const;
+
void encode(bufferlist& bl) const;
void decode(bufferlist::iterator& it);
void dump(Formatter *f) const;