|
LibCXX 0.26.1
|
Reference pointer implementation. More...
#include <ptrimpl.H>
Public Types | |
| typedef objClass | obj_type |
| Define this reference's base type. | |
Public Member Functions | |
| template<typename baseClass > requires derived_from_obj<objClass> | |
| ptrImpl (const const_ref< objClass, baseClass > &o) noexcept | |
| ptrImpl (const ptrImpl< objClass > &o) noexcept LIBCXX_INLINE | |
| The default copy constructor. | |
| template<typename baseClass > requires derived_from_obj<objClass> | |
| ptrImpl (const ref< objClass, baseClass > &o) noexcept | |
| template<typename baseClass > requires derived_from_obj<objClass> | |
| ptrImpl (const_ptr< objClass, baseClass > &&o) noexcept | |
| Move constructor. | |
| template<typename baseClass > requires derived_from_obj<objClass> | |
| ptrImpl (const_ref< objClass, baseClass > &&o) noexcept | |
| template<typename impl_objClass = objClass> requires derived_from_obj<impl_objClass> | |
| ptrImpl (objClass *pArg) noexcept LIBCXX_INLINE | |
| Default constructor. | |
| template<typename baseClass > requires derived_from_obj<objClass> | |
| ptrImpl (ptr< objClass, baseClass > &&o) noexcept | |
| Move constructor. | |
| ptrImpl (ptrImpl< objClass > &&o) noexcept LIBCXX_INLINE | |
| Move constructor. | |
| template<typename baseClass > requires derived_from_obj<objClass> | |
| ptrImpl (ref< objClass, baseClass > &&o) noexcept | |
| ~ptrImpl () LIBCXX_INLINE | |
| Default destructor. | |
| bool | null () const noexcept LIBCXX_INLINE |
| Check if this is an unbound reference. | |
| operator bool () const noexcept | |
| Make it work in boolean context. | |
| bool | operator! () const noexcept |
| Make it work in boolean context. | |
| ptrImpl< objClass > & | operator= (const ptrImpl< objClass > &o) noexcept LIBCXX_INLINE |
| The default assignment operator. | |
| ptrImpl< objClass > & | operator= (ptrImpl< objClass > &&o) noexcept LIBCXX_INLINE |
| The move operator. | |
Protected Member Functions | |
| objClass * | getrefP () const noexcept LIBCXX_INLINE |
| Return the underlying pointer. | |
| void | setRef (objClass *newRefP) noexcept LIBCXX_INLINE |
| Update reference pointer. | |
| void | setRef_noconscheck (objClass *newRefP) noexcept LIBCXX_INLINE |
| Update reference pointer. | |
Protected Attributes | |
| objClass * | refP |
| Object that this reference is bound to. | |
Friends | |
| template<typename , typename > | |
| class | const_ptr |
| template<typename , typename > | |
| class | const_ref |
| class | obj |
| template<typename , typename > | |
| class | ptr |
| template<typename , typename > | |
| class | ref |
Reference pointer implementation.
This class stores the pointer to the underlying reference-counted object, and implements its housekeeping functions.
| typedef objClass x::ptrImpl< objClass >::obj_type |
Define this reference's base type.
|
noexcept |
Default constructor.
| pArg | If pArg is not NULL, the object's reference count gets incremented. When pArg is NULL, this is an unbound reference. |
| x::ptrImpl< objClass >::~ptrImpl | ( | ) |
Default destructor.
|
noexcept |
The default copy constructor.
| o | An existing reference. If this reference is bound to an instance of objClass, its reference count gets incremented. |
|
explicitnoexcept |
|
explicitnoexcept |
|
explicitnoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
Move constructor.
| o | An existing reference. |
|
inlinenoexcept |
Move constructor.
| o | An existing reference. |
|
inlinenoexcept |
Move constructor.
| o | An existing reference. |
|
inlineprotectednoexcept |
Return the underlying pointer.
|
inlinenoexcept |
Check if this is an unbound reference.
true, if this reference is not bound to an instance, false otherwise. Referenced by x::workerpoolObj< workerThreadType >::~workerpoolObj(), x::lockpoolObj< lockid_t, compare_t, lockop_t, starve >::checklocks(), x::serialization::default_traits::classcreate(), x::eventqueuedestroynotifyObj< argType >::destroyed(), x::weakmapObj< K, T, M >::find_or_create(), x::ibasiciofilteriter< in_iter, input_type, output_type >::internal_fill(), x::singletonapp::managedSingletonFactoryObj< appObjClass, appBaseClass, factory_type, argsClass, argsBase, ret_args >::new_thread(), x::hierObj< hier_type, node_type >::iterator::operator*(), x::ibasiciofilteriter< in_iter, input_type, output_type >::operator++(), x::hierObj< hier_type, node_type >::iterator::operator++(), x::yaml::mappingnodeObj::iterator::operator<(), x::yaml::sequencenodeObj::iterator::operator<(), x::yaml::mappingnodeObj::iterator::operator<=(), x::yaml::sequencenodeObj::iterator::operator<=(), x::const_ref< objClass, baseClass >::operator=(), x::ibasiciofilteriter< in_iter, input_type, output_type >::operator==(), x::hierObj< hier_type, node_type >::iterator::operator==(), x::yaml::mappingnodeObj::iterator::operator==(), x::yaml::sequencenodeObj::iterator::operator==(), x::yaml::mappingnodeObj::iterator::operator>(), x::yaml::sequencenodeObj::iterator::operator>(), x::yaml::mappingnodeObj::iterator::operator>=(), x::yaml::sequencenodeObj::iterator::operator>=(), x::http::useragentObj::request(), x::serialize::serialize_value_nonconst< ptr< obj_type, base_type > >::serialize_bytes(), x::interface< refType >::setref(), and x::hierObj< hier_type, node_type >::readlockObj::to_child().
|
inlineexplicitnoexcept |
Make it work in boolean context.
|
inlinenoexcept |
Make it work in boolean context.
|
inlinenoexcept |
The default assignment operator.
| o | An existing reference. If this reference is bound to an instance of objClass, its reference count gets incremented. |
|
inlinenoexcept |
The move operator.
| o | An existing reference. |
|
inlineprotectednoexcept |
Update reference pointer.
Set the reference to point to a new instance of the object class. The new instance's reference count gets incremented. The current reference's count gets decremented. If it becomes 0 the current object the reference points to gets destroyed. The reference gets repointed to the new object.
| newRefP | New object, may be NULL |
|
inlineprotectednoexcept |
Update reference pointer.
Same as setRef(), except that newRefP is from another ptr or ref, and not a raw pointer, so we don't need to do the ref_in_constructor() check.
|
friend |
|
protected |
Object that this reference is bound to.
This pointer is NULL when this reference is not bound to any object.
Referenced by x::const_ref< objClass, baseClass >::getrefP(), and x::const_ptr< objClass, baseClass >::operator=().