From e70f0b4de81d24d22a29a2af03c669368fce6af2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 24 Nov 2018 20:38:48 +0100 Subject: wanda: initial commit --- src/variant.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/variant.cpp (limited to 'src/variant.cpp') 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 -- cgit v1.2.3