wxMaxima
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions
CellPtrBase Class Reference

An implementation detail for the type-specific templated cell pointers. More...

#include <CellPtr.h>

Inheritance diagram for CellPtrBase:
[legend]

Public Member Functions

 operator bool () const noexcept
 
void reset () noexcept
 
auto cmpPointers (const CellPtrBase &o) const noexcept
 This is exactly like the spaceship operator in C++20.
 
auto cmpObjects (const CellPtrBase &o) const noexcept
 This is the spaceship operator acting on pointed-to objects.
 
auto cmpObjects (const Observed *o) const noexcept
 This is the spaceship operator acting on pointed-to objects.
 
bool IsNull () const
 
bool HasOneObserved () const
 
bool HasControlBlock () const
 

Static Public Member Functions

template<typename U >
static bool constexpr is_pointer ()
 
static size_t GetLiveInstanceCount () noexcept
 

Protected Member Functions

 CellPtrBase (Observed *obj=nullptr) noexcept
 
 CellPtrBase (const CellPtrBase &o) noexcept
 
 CellPtrBase (CellPtrBase &&o) noexcept
 
CellPtrBaseoperator= (const CellPtrBase &o) noexcept
 
CellPtrBaseoperator= (CellPtrBase &&o) noexcept
 
Observedbase_get () const noexcept
 
void base_reset (Observed *obj=nullptr) noexcept
 

Detailed Description

An implementation detail for the type-specific templated cell pointers.

A CellPtrBase (and thus the derived CellPtr) can be in one of 3 states:

  1. Pointing to no object: its m_ptr is null.
  2. A sole pointer to an object: its m_ptr points to the Observed, and observed's m_ptr points back at this pointer.
  3. One of many pointers to the object: its m_ptr points to the Observed::ControlBlock, and the observed's m_ptr also points to the control block.

Member Function Documentation

◆ base_reset()

void CellPtrBase::base_reset ( Observed obj = nullptr)
protectednoexcept

Different objects must have control blocks that are either null or non-null but different.


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