|
| Wrapper () |
| Creates an emtpy pointer not holding any object. More...
|
|
| Wrapper (const Wrapper< T > &other) |
| Copies another pointer instance. More...
|
|
| ~Wrapper () |
| Destroys the smart-pointer. More...
|
|
T * | release () |
| Releases the wrapped object. More...
|
|
T * | get () const |
| This function gives access to the wrapped object. More...
|
|
T * | dup () const |
| Creates a new reference to, or a new copy of the wrapped object. More...
|
|
template<typename B > |
B * | get () const |
| This function casts the wrapped object to a different type. More...
|
|
T * | operator-> () const |
| This operator gives access to the wrapped object's members. More...
|
|
void | reset (T *p=0) |
| This function requests to wrap a different object. More...
|
|
void | take (T *p) |
| This function requests to take ownership of a different object. More...
|
|
T ** | out_param () |
| Resets the smart-pointer and returns a pointer to the internal object pointer. More...
|
|
Wrapper< T > & | operator= (T *p) |
| The assignment operator is an alias of the reset() method. More...
|
|
Wrapper< T > & | operator= (const Wrapper< T > &other) |
| The assignment operator is an alias of the reset() method. More...
|
|
| operator const T * () const |
| This operator casts the wrapped object to another type. More...
|
|
bool | operator! () const |
| This operator checks if this pointer actually wraps an object. More...
|
|
bool | operator== (const T *p) const |
| This operator compares two pointers for equality. More...
|
|
bool | operator!= (const T *p) const |
| This operator compares two pointers for inequality. More...
|
|
template<typename T, typename CopyHelper = internal::CopyHelper<T>>
class mediascanner::Wrapper< T, CopyHelper >
A shared smart-pointer for GLib related types.
Via its helper classes this smart-pointer supports a wide variety of GLib related types, such as GObjects, GstMiniObjects, boxed types, and even simple GLists.
- See Also
- internal::CopyHelper, internal::CastHelper
template<typename T, typename CopyHelper = internal::CopyHelper<T>>
This function requests to wrap a different object.
If the wrapped objects are reference-counted, the reference to the old object is dropped, and a reference to the new object is stored. For other types the old object is freed and a copy of the new object is stored.
- Parameters
-
p | The new object to store, or null . |
- See Also
- take(), out_param()
template<typename T, typename CopyHelper = internal::CopyHelper<T>>
This function requests to take ownership of a different object.
If the wrapped objects are reference-counted, the reference to the old object is dropped, for other types the old object is freed. As this function takes ownership of the passed object, no new reference is created, and no copy is created.
- Parameters
-
p | The new object to store, or null . |
- See Also
- reset(), out_param()