Ubuntu TV Media Scanner
A centralized index for removable media content.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
mediascanner::ListWrapper< T, List > Struct Template Reference

#include <mediascanner/glibutils.h>

+ Inheritance diagram for mediascanner::ListWrapper< T, List >:

Public Types

typedef Wrapper< List,
internal::ListCopyHelper< T > > 
inherited
 

Public Member Functions

 ListWrapper (const Wrapper< List > &other)
 
 ListWrapper (List *list)
 Constructs a ListWrapper that directly takes ownership of . More...
 
- Public Member Functions inherited from mediascanner::Wrapper< List, internal::ListCopyHelper< T > >
 Wrapper ()
 Creates an emtpy pointer not holding any object. More...
 
 Wrapper (const Wrapper< List > &other)
 Copies another pointer instance. More...
 
 ~Wrapper ()
 Destroys the smart-pointer. More...
 
List * release ()
 Releases the wrapped object. More...
 
List * get () const
 This function gives access to the wrapped object. More...
 
B * get () const
 This function casts the wrapped object to a different type. More...
 
List * dup () const
 Creates a new reference to, or a new copy of the wrapped object. More...
 
List * operator-> () const
 This operator gives access to the wrapped object's members. More...
 
void reset (List *p=0)
 This function requests to wrap a different object. More...
 
void take (List *p)
 This function requests to take ownership of a different object. More...
 
List ** out_param ()
 Resets the smart-pointer and returns a pointer to the internal object pointer. More...
 
Wrapper< List > & operator= (List *p)
 The assignment operator is an alias of the reset() method. More...
 
Wrapper< List > & operator= (const Wrapper< List > &other)
 The assignment operator is an alias of the reset() method. More...
 
 operator const List * () 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 List *p) const
 This operator compares two pointers for equality. More...
 
bool operator!= (const List *p) const
 This operator compares two pointers for inequality. More...
 

Member Typedef Documentation

template<typename T , typename List = GList>
typedef Wrapper<List, internal::ListCopyHelper<T> > mediascanner::ListWrapper< T, List >::inherited

Constructor & Destructor Documentation

template<typename T , typename List = GList>
mediascanner::ListWrapper< T, List >::ListWrapper ( const Wrapper< List > &  other)
inline
template<typename T , typename List = GList>
mediascanner::ListWrapper< T, List >::ListWrapper ( List *  list)
inlineexplicit

Constructs a ListWrapper that directly takes ownership of .

This constructor is useful since creating a deep copy of a list can be pretty expensive.