summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/Event.cpp')
-rw-r--r--Swiften/EventLoop/Event.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/EventLoop/Event.cpp b/Swiften/EventLoop/Event.cpp
new file mode 100644
index 0000000..aa002d3
--- /dev/null
+++ b/Swiften/EventLoop/Event.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <Swiften/EventLoop/Event.h>
+
+#include <typeinfo>
+#include <iostream>
+
+std::ostream& operator<<(std::ostream& os, const Swift::Event& e) {
+ os << "Event(" << e.id << ",";
+ if (e.owner) {
+ os << typeid(*e.owner.get()).name();
+ }
+ else {
+ os << "null";
+ }
+ os << ")";
+ return os;
+}