Go to the documentation of this file.
39 #ifndef CGU_GVAR_HANDLE_H
40 #define CGU_GVAR_HANDLE_H
47 #if defined(DOXYGEN_PARSING) || GLIB_CHECK_VERSION(2,24,0)
165 if (obj_p) g_variant_unref(obj_p);
169 if (obj_p) g_variant_ref(obj_p);
188 if (ptr && g_variant_is_floating(ptr)) {
189 g_variant_ref_sink(ptr);
212 if (ptr && g_variant_is_floating(ptr)) {
213 g_variant_ref_sink(ptr);
249 if (obj_p != gvar.obj_p) {
290 GVariant*
get()
const {
return obj_p;}
297 operator GVariant*()
const {
return obj_p;}
307 #if defined(CGU_USE_SMART_PTR_COMPARISON) || defined(DOXYGEN_PARSING)
320 return (h1.
get() == h2.
get());
350 return std::less<GVariant*>()(h1.
get(), h2.
get());
353 #endif // CGU_USE_SMART_PTR_COMPARISON
360 #if defined(CGU_USE_SMART_PTR_COMPARISON) && !defined(DOXYGEN_PARSING)
366 typedef std::size_t result_type;
368 result_type operator()(
const argument_type& h)
const {
376 #endif // CGU_USE_SMART_PTR_COMPARISON
379 #warning GvarHandle not available: glib >= 2.24.0 is required
GvarHandle & operator=(const GvarHandle &gvar)
Definition: gvar_handle.h:244
GvarHandle(GvarHandle &&gvar)
Definition: gvar_handle.h:231
Definition: application.h:44
GvarHandle & operator=(GvarHandle &&gvar)
Definition: gvar_handle.h:270
void reset(GVariant *ptr=0)
Definition: gvar_handle.h:205
bool operator!=(const GobjHandle< T > &h1, const GobjHandle< T > &h2)
Definition: gobj_handle.h:613
bool operator<(const GobjHandle< T > &h1, const GobjHandle< T > &h2)
Definition: gobj_handle.h:632
GvarHandle(GVariant *ptr=0)
Definition: gvar_handle.h:183
GVariant * get() const
Definition: gvar_handle.h:290
A specialization of std::hash for Cgu::Callback::FunctorArg, Cgu::Callback::SafeFunctorArg,...
GvarHandle(const GvarHandle &gvar)
Definition: gvar_handle.h:222
~GvarHandle()
Definition: gvar_handle.h:304
bool operator==(const GobjHandle< T > &h1, const GobjHandle< T > &h2)
Definition: gobj_handle.h:600
This is a handle for managing the reference count of GVariant objects.
Definition: gvar_handle.h:160