summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-04-28 15:36:22 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-04-28 15:41:57 (GMT)
commitc4b64106e7b9493c7b28cc653797457d5f7fbdda (patch)
tree8ff1bde1f9ade25561408f02de530f1386b32180 /Swiften
parentbe642f17bfa2df7cb88ddb5fb4aa37438d9e2110 (diff)
downloadswift-contrib-c4b64106e7b9493c7b28cc653797457d5f7fbdda.zip
swift-contrib-c4b64106e7b9493c7b28cc653797457d5f7fbdda.tar.bz2
Make ToplevelElement and Payload inherit from Element.
Change-Id: I962e59a25e49d593c62fa852d60e178f349eb3c4
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Elements/Element.cpp14
-rw-r--r--Swiften/Elements/Element.h16
-rw-r--r--Swiften/Elements/Payload.h4
-rw-r--r--Swiften/Elements/ToplevelElement.h3
-rw-r--r--Swiften/SConscript1
5 files changed, 35 insertions, 3 deletions
diff --git a/Swiften/Elements/Element.cpp b/Swiften/Elements/Element.cpp
new file mode 100644
index 0000000..6014ea2
--- /dev/null
+++ b/Swiften/Elements/Element.cpp
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2010-2014 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <Swiften/Elements/Element.h>
+
+namespace Swift {
+
+Element::~Element() {
+}
+
+}
diff --git a/Swiften/Elements/Element.h b/Swiften/Elements/Element.h
new file mode 100644
index 0000000..d07dae2
--- /dev/null
+++ b/Swiften/Elements/Element.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2010-2014 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/API.h>
+
+namespace Swift {
+ class SWIFTEN_API Element {
+ public:
+ virtual ~Element();
+ };
+}
diff --git a/Swiften/Elements/Payload.h b/Swiften/Elements/Payload.h
index 7d6789c..7cc00da 100644
--- a/Swiften/Elements/Payload.h
+++ b/Swiften/Elements/Payload.h
@@ -9,10 +9,10 @@
#include <boost/shared_ptr.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Elements/ToplevelElement.h>
+#include <Swiften/Elements/Element.h>
namespace Swift {
- class SWIFTEN_API Payload : public ToplevelElement {
+ class SWIFTEN_API Payload : public Element {
public:
typedef boost::shared_ptr<Payload> ref;
public:
diff --git a/Swiften/Elements/ToplevelElement.h b/Swiften/Elements/ToplevelElement.h
index b3f60c7..bce90b9 100644
--- a/Swiften/Elements/ToplevelElement.h
+++ b/Swiften/Elements/ToplevelElement.h
@@ -7,9 +7,10 @@
#pragma once
#include <Swiften/Base/API.h>
+#include <Swiften/Elements/Element.h>
namespace Swift {
- class SWIFTEN_API ToplevelElement {
+ class SWIFTEN_API ToplevelElement : public Element {
public:
ToplevelElement() {}
SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(ToplevelElement)
diff --git a/Swiften/SConscript b/Swiften/SConscript
index d898bfa..7656c83 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -122,6 +122,7 @@ if env["SCONS_STAGE"] == "build" :
"Elements/Form.cpp",
"Elements/FormField.cpp",
"Elements/StreamFeatures.cpp",
+ "Elements/Element.cpp",
"Elements/ToplevelElement.cpp",
"Elements/IQ.cpp",
"Elements/Payload.cpp",