template<typename T, typename Tr = Glib::Container_Helpers::TypeTraits<T>>
class Glib::ArrayHandler< T, Tr >
A utility for converting between std::vector and plain C arrays.
This would normally only be used by glibmm or gtkmm itself, or similar libraries that wrap C APIs.
For instance:
std::vector<Glib::ustring> PixbufFormat::get_mime_types() const
{
}
or
void Display::store_clipboard(
const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_,
const std::vector<Glib::ustring>& targets)
{
if (!targets.size ())
{
gdk_display_store_clipboard(gobj(),
time_,
targets.size ());
}
}
Note that usage below is wrong - data() returns a pointer to data owned by a temporary ArrayKeeper returned by vector_to_array(), which is destroyed at the end of this instruction. For details, see Glib::ArrayKeeper.