The object_ptr holds a pointer to an object. More...
#include <object_ptr.hpp>
Inherits oos::object_base_ptr.
Public Types | |
typedef T | object_type |
Public Member Functions | |
object_ptr () | |
object_ptr (const object_ptr &x) | |
object_ptr (const object_ref< T > &x) | |
object_ptr & | operator= (const object_ptr &x) |
object_ptr (object *o) | |
object_ptr (object_proxy *proxy) | |
virtual const char * | type () const |
T * | operator-> () const |
Return the pointer to the object of type T. More... | |
T & | operator* () const |
Return the reference to the object of type T. More... | |
T * | get () const |
Return the pointer to the object of type T. More... | |
Public Member Functions inherited from oos::object_base_ptr | |
bool | operator== (const object_base_ptr &x) const |
bool | operator!= (const object_base_ptr &x) const |
void | reset (const object *o=0) |
bool | is_loaded () const |
long | id () const |
void | id (long i) |
object * | ptr () const |
object * | lookup_object () const |
virtual bool | is_reference () const |
bool | is_internal () const |
unsigned long | ref_count () const |
unsigned long | ptr_count () const |
Additional Inherited Members | |
Protected Member Functions inherited from oos::object_base_ptr | |
object_base_ptr (bool is_ref) | |
Creates and empty base pointer. More... | |
object_base_ptr (const object_base_ptr &x) | |
object_base_ptr & | operator= (const object_base_ptr &x) |
object_base_ptr (object *o, bool is_ref) | |
Creates an object_base_ptr with a given object. More... | |
object_base_ptr (object_proxy *op, bool is_ref) | |
Creates an object_base_ptr with a given object_proxy. More... | |
Detailed Description
template<class T>
class oos::object_ptr< T >
The object_ptr holds a pointer to an object.
- Template Parameters
-
T The type of the object.
The object_ptr holds a pointer to an object. The object_ptr is a wrapper class for the object class It has a reference count mechanism. The objects inserted into the object_store are returned as a object_ptr and should be used through the object_ptr class.
Member Typedef Documentation
typedef T oos::object_ptr< T >::object_type |
Shortcut for object type.
Constructor & Destructor Documentation
|
inline |
Create an empty object_ptr
|
inline |
Copies object_ptr
- Parameters
-
x The object_ptr to copy
|
inline |
Copies a object_ref
- Parameters
-
x The object_ref to copy
|
inline |
Create an object_ptr from an object
- Parameters
-
o The object.
|
inlineexplicit |
Create an object_ptr from an object_proxy
- Parameters
-
proxy The object_proxy.
Member Function Documentation
|
inline |
Return the pointer to the object of type T.
Return the pointer to the object of type T. If there isn't a valid object 0 (null) is returned.
- Returns
- The pointer to the object of type T.
|
inline |
Return the reference to the object of type T.
Return the reference to the object of type T. If there isn't a valid object 0 (null) is returned.
- Returns
- The reference to the object of type T.
|
inline |
Return the pointer to the object of type T.
Return the pointer to the object of type T. If there isn't a valid object 0 (null) is returned.
- Returns
- The pointer to the object of type T.
|
inline |
|
inlinevirtual |
Return the type string of the object
- Returns
- The type string of the object.
Implements oos::object_base_ptr.
The documentation for this class was generated from the following file:
- object/object_ptr.hpp