inlib  1.2.0
Public Member Functions | Static Public Member Functions | Protected Attributes
inlib::sg::holder< T > Class Template Reference
Inheritance diagram for inlib::sg::holder< T >:
Inheritance graph
[legend]
Collaboration diagram for inlib::sg::holder< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void * cast (const std::string &a_class) const
virtual nodecopy () const
virtual const std::string & s_cls () const
 holder (T *a_obj)
virtual ~holder ()
 holder (const holder &a_from)
holderoperator= (const holder &a_from)

Static Public Member Functions

static const std::string & s_class ()

Protected Attributes

T * m_obj

Detailed Description

template<class T>
class inlib::sg::holder< T >

Definition at line 17 of file holder.


Constructor & Destructor Documentation

template<class T >
inlib::sg::holder< T >::holder ( T *  a_obj) [inline]

Definition at line 31 of file holder.

:m_obj(a_obj){} //it takes a_obj ownership.
template<class T >
virtual inlib::sg::holder< T >::~holder ( ) [inline, virtual]

Definition at line 32 of file holder.

{delete m_obj;}
template<class T >
inlib::sg::holder< T >::holder ( const holder< T > &  a_from) [inline]

Definition at line 34 of file holder.

:node(a_from),m_obj(0){}

Member Function Documentation

template<class T >
virtual void* inlib::sg::holder< T >::cast ( const std::string &  a_class) const [inline, virtual]

Reimplemented from inlib::sg::node.

Definition at line 24 of file holder.

                                                     {
    if(void* p = inlib::cmp_cast< holder<T> >(this,a_class)) {return p;}
    return node::cast(a_class);
  }
template<class T >
virtual node* inlib::sg::holder< T >::copy ( ) const [inline, virtual]

Implements inlib::sg::node.

Definition at line 28 of file holder.

{return new holder(*this);}
template<class T >
holder& inlib::sg::holder< T >::operator= ( const holder< T > &  a_from) [inline]

Definition at line 35 of file holder.

                                         {
    node::operator=(a_from);
    m_obj=0;
    return *this;
  }
template<class T >
static const std::string& inlib::sg::holder< T >::s_class ( ) [inline, static]

Reimplemented from inlib::sg::node.

Definition at line 19 of file holder.

                                    {
    static const std::string s_v("inlib::sg::holder");
    return s_v;
  }
template<class T >
virtual const std::string& inlib::sg::holder< T >::s_cls ( ) const [inline, virtual]

Implements inlib::sg::node.

Definition at line 29 of file holder.

{return s_class();}

Member Data Documentation

template<class T >
T* inlib::sg::holder< T >::m_obj [protected]

Definition at line 41 of file holder.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines