Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A handler object that is used as a smart reference for an object of which it can have the responsibility of the deletion. More...
#include <bayeux/materials/detail/tools.h>
Public Member Functions | |
bool | is_owned () const |
Check the object deletion responsibility. More... | |
void | set_owned (bool owned_) |
Set the object deletion responsibility flag. More... | |
void | set_alias_of (const std::string &name_) |
Set the alias information. More... | |
const std::string & | get_alias_of () const |
Return the alias information. More... | |
bool | is_alias () const |
Check for existing alias information. More... | |
void | reset_alias_of () |
Reset the alias information. More... | |
bool | has_ref () const |
Check for a existing reference. More... | |
T * | grab_ptr () |
Return a pointer to the mutable object. More... | |
const T * | get_ptr () const |
Return a pointer to the non mutable object. More... | |
T & | grab_ref () |
Return a reference to the mutable object. More... | |
const T & | get_ref () const |
Return a reference to the non mutable object. More... | |
smart_ref () | |
Default constructor. More... | |
virtual | ~smart_ref () |
Destructor. More... | |
void | reset_ref () |
Reset the internal reference and delete the object if we have the responsibility of its deletion. More... | |
void | set_ref (T *ref_) |
Set the internal reference with the responsibility of the deletion (ala boost::scoped_ptr) More... | |
void | set_ref (T &ref_) |
Set the internal reference without the responsibility of the deletion. More... | |
A handler object that is used as a smart reference for an object of which it can have the responsibility of the deletion.
|
inline |
Default constructor.
|
inlinevirtual |
Destructor.
|
inline |
Return the alias information.
|
inline |
Return a pointer to the non mutable object.
|
inline |
Return a reference to the non mutable object.
|
inline |
Return a pointer to the mutable object.
|
inline |
Return a reference to the mutable object.
|
inline |
Check for a existing reference.
|
inline |
Check for existing alias information.
|
inline |
Check the object deletion responsibility.
|
inline |
Reset the alias information.
|
inline |
Reset the internal reference and delete the object if we have the responsibility of its deletion.
|
inline |
Set the alias information.
|
inline |
Set the object deletion responsibility flag.
|
inline |
Set the internal reference with the responsibility of the deletion (ala boost::scoped_ptr)
|
inline |
Set the internal reference without the responsibility of the deletion.