Back to index

unity  6.0.0
Public Member Functions | Private Attributes
unity::glib::Object< T > Class Template Reference

#include <GLibWrapper.h>

Inheritance diagram for unity::glib::Object< T >:
Inheritance graph
[legend]
Collaboration diagram for unity::glib::Object< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Object ()
 Object (T *val)
 Object (T *val, AddRef const &ref)
 Object (Object const &)
 ~Object ()
void swap (Object< T > &other)
Objectoperator= (T *val)
Objectoperator= (Object other)
 operator T * () const
 operator bool () const
T * operator-> () const
T * RawPtr () const
T * Release ()

Private Attributes

T * object_

Detailed Description

template<typename T>
class unity::glib::Object< T >

Definition at line 38 of file GLibWrapper.h.


Constructor & Destructor Documentation

template<typename T >
unity::glib::Object< T >::Object ( )

Definition at line 30 of file GLibWrapper-inl.h.

  : object_(0)
{}
template<typename T>
unity::glib::Object< T >::Object ( T *  val) [explicit]

Definition at line 35 of file GLibWrapper-inl.h.

  : object_(val)
{}
template<typename T>
unity::glib::Object< T >::Object ( T *  val,
AddRef const &  ref 
)

Definition at line 40 of file GLibWrapper-inl.h.

  : object_(val)
{
  if (object_)
    g_object_ref(object_);
}
template<typename T>
unity::glib::Object< T >::Object ( Object< T > const &  other)

Definition at line 48 of file GLibWrapper-inl.h.

  : object_(other.object_)
{
  if (object_)
    g_object_ref(object_);
}
template<typename T >
unity::glib::Object< T >::~Object ( )

Definition at line 56 of file GLibWrapper-inl.h.

{
  if (object_)
    g_object_unref(object_);
}

Member Function Documentation

template<typename T >
unity::glib::Object< T >::operator bool ( ) const

Definition at line 97 of file GLibWrapper-inl.h.

{
  return bool(object_);
}
template<typename T >
unity::glib::Object< T >::operator T * ( ) const

Definition at line 85 of file GLibWrapper-inl.h.

{
  return object_;
}
template<typename T >
T * unity::glib::Object< T >::operator-> ( ) const

Definition at line 91 of file GLibWrapper-inl.h.

{
  return object_;
}
template<typename T>
Object< T > & unity::glib::Object< T >::operator= ( T *  val)

Definition at line 69 of file GLibWrapper-inl.h.

{
  Object<T> copy(val);
  swap(copy);

  return *this;
}
template<typename T>
Object< T > & unity::glib::Object< T >::operator= ( Object< T >  other)

Definition at line 78 of file GLibWrapper-inl.h.

{
  swap(other);
  return *this;
}
template<typename T >
T * unity::glib::Object< T >::RawPtr ( ) const

Definition at line 103 of file GLibWrapper-inl.h.

{
  return object_;
}

Here is the caller graph for this function:

template<typename T >
T * unity::glib::Object< T >::Release ( )

Definition at line 109 of file GLibWrapper-inl.h.

{
  T* result = object_;
  object_ = 0;
  return result;
}

Here is the caller graph for this function:

template<typename T>
void unity::glib::Object< T >::swap ( Object< T > &  other)

Definition at line 63 of file GLibWrapper-inl.h.

{
  std::swap(this->object_, other.object_);
}

Member Data Documentation

template<typename T>
T* unity::glib::Object< T >::object_ [private]

Definition at line 61 of file GLibWrapper.h.


The documentation for this class was generated from the following files: