wxMaxima
Loading...
Searching...
No Matches
Data Structures | Static Public Member Functions
CellList Class Reference

Data Structures

struct  SplicedIn
 
struct  TornOut
 

Static Public Member Functions

static void Check (const Cell *cell)
 Checks the integrity of the list pointers of the given cell in relation to its neighbors.
 
static void Check (const GroupCell *c)
 
static std::unique_ptr< CellSetNext (Cell *cell, std::unique_ptr< Cell > &&next)
 Replaces the successor of a given cell, and returns the old one (if any).
 
static void DeleteList (Cell *afterMe)
 Deletes the list of cells anchored at the given cell.
 
static void AppendCell (Cell *cell, std::unique_ptr< Cell > &&tail)
 Appends a cell to the end of the cell list that starts with a given cell.
 
template<typename T >
static void AppendCell (const std::unique_ptr< T > &cell, std::unique_ptr< Cell > &&tail)
 
static SplicedIn SpliceInAfter (Cell *where, std::unique_ptr< Cell > &&head, Cell *last=nullptr)
 Splices a given list of cells after the given cell.
 
static TornOut TearOut (Cell *first, Cell *last)
 Tears out a cell range and returns the list thus formed.
 

Member Function Documentation

◆ AppendCell()

void CellList::AppendCell ( Cell cell,
std::unique_ptr< Cell > &&  tail 
)
static

Appends a cell to the end of the cell list that starts with a given cell.

Parameters
cellis the cell list to append to.
tailis the cell to append. It can be a list, a single cell, or null.

◆ DeleteList()

void CellList::DeleteList ( Cell afterMe)
static

Deletes the list of cells anchored at the given cell.

Parameters
afterMeis the cell whose m_next will become null.

◆ SetNext()

std::unique_ptr< Cell > CellList::SetNext ( Cell cell,
std::unique_ptr< Cell > &&  next 
)
static

Replaces the successor of a given cell, and returns the old one (if any).

Parameters
cellis the cell to modify.
nextis the replacement succssor. It can be a list, or a single cell, or null. Null means that the cell won't have a successor.

◆ SpliceInAfter()

CellList::SplicedIn CellList::SpliceInAfter ( Cell where,
std::unique_ptr< Cell > &&  head,
Cell last = nullptr 
)
static

Splices a given list of cells after the given cell.

Parameters
whereis the cell after which the head will be spliced in. Cannot be null.
headis the head cell in the list of cells. It can be a single cell. No changes are made when head is null.
lastis the optional hint for the last cell in the spliced-in list. It's computed if not provided.
Todo:
There should be more diagnostic checks for list integrity.

◆ TearOut()

CellList::TornOut CellList::TearOut ( Cell first,
Cell last 
)
static

Tears out a cell range and returns the list thus formed.

Parameters
firstis the first cell to be torn out. Cannot be null.
lastis the last cell to be torn out. Cannot be null.
Returns
The pair of owning pointers to the cell itself, and to the tail.

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