Inkscape
Vector Graphics Editor
|
Functions | |
template<class T > | |
GType | type () |
Returns the type used for storing an object of type T inside a value. | |
template<typename T > | |
bool | holds (GValue const *value) |
Tests whether a value contains an object of type T. | |
template<typename T > | |
bool | holds (Glib::ValueBase const &value) |
Tests whether a value contains an object of type T. | |
template<typename T > | |
T * | get (GValue *value) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr. | |
template<typename T > | |
T * | get (Glib::ValueBase &value) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr. | |
template<typename T > | |
T const * | get (GValue const *value) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr. | |
template<typename T > | |
T const * | get (Glib::ValueBase const &value) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr. | |
template<typename T > | |
Glib::ValueBase | own (std::unique_ptr< T > t) |
Return a value containing and taking ownership of the given T instance. | |
template<typename T , typename... Args> | |
Glib::ValueBase | create (Args &&... args) |
Return a value containing and owning a newly-created T instance. | |
GValue | release (Glib::ValueBase &&value) |
Release the value from its owning wrapper, leaving the original in an empty state. | |
template<typename T > | |
std::unique_ptr< T > | from_content_provider (Gdk::ContentProvider const &content_provider) |
Attempt to get a value of type T from a content provider, returning it on success, otherwise nullptr. | |
Glib::ValueBase Inkscape::Util::GlibValue::create | ( | Args &&... | args | ) |
Return a value containing and owning a newly-created T instance.
Definition at line 112 of file value-utils.h.
References own().
std::unique_ptr< T > Inkscape::Util::GlibValue::from_content_provider | ( | Gdk::ContentProvider const & | content_provider | ) |
Attempt to get a value of type T from a content provider, returning it on success, otherwise nullptr.
Definition at line 125 of file value-utils.h.
References from_content_provider().
Referenced by from_content_provider().
T * Inkscape::Util::GlibValue::get | ( | Glib::ValueBase & | value | ) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr.
Definition at line 74 of file value-utils.h.
References get().
T const * Inkscape::Util::GlibValue::get | ( | Glib::ValueBase const & | value | ) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr.
Definition at line 91 of file value-utils.h.
References get().
T * Inkscape::Util::GlibValue::get | ( | GValue * | value | ) |
T const * Inkscape::Util::GlibValue::get | ( | GValue const * | value | ) |
Returns a borrowed pointer to the T held by a value if it holds one, else nullptr.
Definition at line 81 of file value-utils.h.
References get().
bool Inkscape::Util::GlibValue::holds | ( | Glib::ValueBase const & | value | ) |
Tests whether a value contains an object of type T.
Definition at line 57 of file value-utils.h.
References holds().
bool Inkscape::Util::GlibValue::holds | ( | GValue const * | value | ) |
Tests whether a value contains an object of type T.
Definition at line 50 of file value-utils.h.
References holds().
Glib::ValueBase Inkscape::Util::GlibValue::own | ( | std::unique_ptr< T > | t | ) |
Return a value containing and taking ownership of the given T instance.
The argument must not be null.
Definition at line 101 of file value-utils.h.
References own().
|
inline |
Release the value from its owning wrapper, leaving the original in an empty state.
Definition at line 118 of file value-utils.h.
References release().
Referenced by release().
GType Inkscape::Util::GlibValue::type | ( | ) |
Returns the type used for storing an object of type T inside a value.
Definition at line 29 of file value-utils.h.
Referenced by type().