Base class for the object pointer and reference class.
More...
#include <object_ptr.hpp>
Inherited by oos::object_ptr< item_type >, oos::object_ref< C >, oos::object_ptr< T >, and oos::object_ref< T >.
|
class | object_reader |
|
class | object_writer |
|
class | object_creator |
|
class | object_serializer |
|
struct | object_proxy |
|
template<class T > |
class | object_ref |
|
template<class T > |
class | object_ptr |
|
OOS_API std::ostream & | operator<< (std::ostream &out, const object_base_ptr &x) |
|
Base class for the object pointer and reference class.
This is the base class for the object pointer and reference class. The class holds the proxy of the object and the id of the object.
oos::object_base_ptr::object_base_ptr |
( |
bool |
is_ref | ) |
|
|
explicitprotected |
Creates and empty base pointer.
Creates and empty base pointer. The boolean tells the class if the object is handled as a reference or an pointer. The difference is that the reference couldn't be deleted from the object_store and the pointer can.
- Parameters
-
is_ref | If true the object is handled as a reference. |
oos::object_base_ptr::object_base_ptr |
( |
object * |
o, |
|
|
bool |
is_ref |
|
) |
| |
|
protected |
oos::object_base_ptr::object_base_ptr |
( |
object_proxy * |
op, |
|
|
bool |
is_ref |
|
) |
| |
|
protected |
Creates an object_base_ptr with a given object_proxy.
Creates an object_base_ptr with a given object_proxy. The boolean tells the object_base_ptr if it should be handled as a reference or a pointer.
- Parameters
-
op | The object_proxy of the object_base_ptr |
is_ref | If true the object is handled as a reference. |
long oos::object_base_ptr::id |
( |
| ) |
const |
Returns the object id.
- Returns
- The id of the object.
void oos::object_base_ptr::id |
( |
long |
i | ) |
|
Sets the object id. If a proxy is set an exception is thrown.
- Parameters
-
bool oos::object_base_ptr::is_internal |
( |
| ) |
const |
bool oos::object_base_ptr::is_loaded |
( |
| ) |
const |
Returns if the object is loaded.
- Returns
- True if the object is loaded.
virtual bool oos::object_base_ptr::is_reference |
( |
| ) |
const |
|
virtual |
Returns if the object is treated as a reference.
- Returns
- True if the object is treated like a reference.
object* oos::object_base_ptr::lookup_object |
( |
| ) |
const |
Returns the object
- Returns
- The object.
Assign operator.
- Parameters
-
object* oos::object_base_ptr::ptr |
( |
| ) |
const |
Returns the object
- Returns
- The object.
unsigned long oos::object_base_ptr::ptr_count |
( |
| ) |
const |
Returns the pointer count.
- Returns
- The pointer count.
unsigned long oos::object_base_ptr::ref_count |
( |
| ) |
const |
Returns the reference count.
- Returns
- The reference count.
void oos::object_base_ptr::reset |
( |
const object * |
o = 0 | ) |
|
virtual const char* oos::object_base_ptr::type |
( |
| ) |
const |
|
pure virtual |
OOS_API std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const object_base_ptr & |
x |
|
) |
| |
|
friend |
Prints the underlaying object
- Parameters
-
out | The output stream to write on. |
x | The object pointer to print. |
- Returns
- The output stream.
The documentation for this class was generated from the following file: