aboutsummaryrefslogtreecommitdiff
path: root/src/variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/variant.cpp')
-rw-r--r--src/variant.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/variant.cpp b/src/variant.cpp
new file mode 100644
index 0000000..54e484e
--- /dev/null
+++ b/src/variant.cpp
@@ -0,0 +1,17 @@
+#include "variant.hpp"
+
+namespace wanda {
+
+variant::variant(GVariant * value) : m_value{value} { }
+
+variant::~variant() {
+ if(m_value) {
+ g_variant_unref(m_value);
+ }
+}
+
+bool variant::is_of_type(GVariantType const * const type) const {
+ return g_variant_is_of_type(m_value, type);
+}
+
+} \ No newline at end of file