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

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
 
- Public Member Functions inherited from scopira::core::model_ptr_base
 model_ptr_base (void)
 ctor
 
model_i *const & get_model_ptr (void) const
 gets the raw base pointer (really specialized use here)
 

Protected Attributes

view_idm_ins
 the view
 
T * dm_ptr
 the actual pointer
 
- Protected Attributes inherited from scopira::core::model_ptr_base
model_idm_model
 internal: 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

◆ model_ptr()

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

Constructor, null initializing

Author
Aleksander Demko

◆ ~model_ptr()

template<class T>
scopira::core::model_ptr< T >::~model_ptr ( )
inline

Destructor

Author
Aleksander Demko

Member Function Documentation

◆ get()

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

◆ is_null()

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

Is the pointer null?

Author
Aleksander Demko

◆ operator!=()

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.

◆ operator*()

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

Convinient * deferencer.

Author
Aleksander Demko

◆ operator->()

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

Convinient -> accesor to the object

Author
Aleksander Demko

◆ operator<()

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

◆ operator=() [1/2]

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

Assignment.

Author
Aleksander Demko

◆ operator=() [2/2]

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.

◆ operator==()

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.

◆ ref()

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

Gets the current object, as a reference

Author
Aleksander Demko

◆ set()

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_base::dm_model.


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