Scopira 20080306

scopira::core::model_ptr< T > Class Template Reference

#include <model.h>

Inheritance diagram for scopira::core::model_ptr< T >:
scopira::core::model_ptr_base

List of all members.

Public Types

typedef T data_type
 the type of the data this model_ptr points too

Public Member Functions

 model_ptr (view_i *ins)
 ~model_ptr ()
void set (T *o)
model_ptroperator= (T *o)
model_ptroperator= (const model_ptr< T > &o)
bool operator== (const model_ptr< T > &rhs) const
bool operator!= (const model_ptr< T > &rhs) const
bool operator< (const model_ptr< T > &rhs) const
T * get (void) const
T & ref (void) const
T * operator-> (void) const
T & operator* (void) const
bool is_null (void) const

Protected Attributes

view_idm_ins
 the view
T * dm_ptr
 the actual pointer

Detailed Description

template<class T>
class scopira::core::model_ptr< T >

Like count_ptr, but does additional view-subscription to model_i stuff

Author:
Aleksander Demko

Constructor & Destructor Documentation

template<class T>
scopira::core::model_ptr< T >::model_ptr ( view_i ins) [inline]

Constructor, null initializing

Author:
Aleksander Demko
template<class T>
scopira::core::model_ptr< T >::~model_ptr ( ) [inline]

Destructor

Author:
Aleksander Demko

Member Function Documentation

template<class T>
T* scopira::core::model_ptr< T >::get ( void  ) const [inline]

Pretty ascii printer, redirects to internal class.

Author:
Aleksander Demko Gets the current object
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
bool scopira::core::model_ptr< T >::is_null ( void  ) const [inline]

Is the pointer null?

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
bool scopira::core::model_ptr< T >::operator!= ( const model_ptr< T > &  rhs) const [inline]

Comparison (not equals) - compares internal pointer values.

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
T& scopira::core::model_ptr< T >::operator* ( void  ) const [inline]

Convinient * deferencer.

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
T* scopira::core::model_ptr< T >::operator-> ( void  ) const [inline]

Convinient -> accesor to the object

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
bool scopira::core::model_ptr< T >::operator< ( const model_ptr< T > &  rhs) const [inline]

Comparison (less than) - compares internal pointer values.

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
model_ptr& scopira::core::model_ptr< T >::operator= ( T *  o) [inline]

Assignment.

Author:
Aleksander Demko
template<class T>
model_ptr& scopira::core::model_ptr< T >::operator= ( const model_ptr< T > &  o) [inline]

Assignment.

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
bool scopira::core::model_ptr< T >::operator== ( const model_ptr< T > &  rhs) const [inline]

Comparison (equals) - compares internal pointer values.

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
T& scopira::core::model_ptr< T >::ref ( void  ) const [inline]

Gets the current object, as a reference

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ptr.

template<class T>
void scopira::core::model_ptr< T >::set ( T *  o) [inline]

Sets the current pointer. Any old pointer will ofcourse be unreferenced.

Author:
Aleksander Demko

References scopira::core::model_ptr< T >::dm_ins, scopira::core::model_ptr_base::dm_model, and scopira::core::model_ptr< T >::dm_ptr.


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