Aleph-w  1.9
General library for algorithms and data structures
Aleph::Snodenc< T > Class Template Reference

#include <htlist.H>

+ Inheritance diagram for Aleph::Snodenc< T >:
+ Collaboration diagram for Aleph::Snodenc< T >:

Public Member Functions

T & get_data () noexcept
 
const T & get_data () const noexcept
 
 Snodenc (const T &item) noexcept(noexcept(T(item)))
 
 Snodenc (T &&item) noexcept(noexcept(std::swap(data, item)))
 
Snodencremove_next () noexcept
 
Snodenc *& get_next () noexcept
 
Snodencremove_first () noexcept
 
Snodenc *& get_first () const noexcept
 
bool is_empty () const noexcept
 Return true if this is empty.
 
void reset () noexcept
 
void insert (Slinknc *p) noexcept
 Insert p after this More...
 
template<typename T >
Snodenc< T > * to_snodenc () noexcept
 
template<typename T >
const Snodenc< T > * to_snodenc () const noexcept
 
template<typename T >
T & to_data () noexcept
 
template<typename T >
const T & to_data () const noexcept
 

Detailed Description

template<typename T>
class Aleph::Snodenc< T >

Node belonging to a single non-circular linked list without header node.

Constructor & Destructor Documentation

◆ Snodenc() [1/2]

template<typename T>
Aleph::Snodenc< T >::Snodenc ( const T &  item)
inlinenoexcept

Construct with copy of item

◆ Snodenc() [2/2]

template<typename T>
Aleph::Snodenc< T >::Snodenc ( T &&  item)
inlinenoexcept

Costruct by moving item

Member Function Documentation

◆ get_data() [1/2]

template<typename T>
T& Aleph::Snodenc< T >::get_data ( )
inlinenoexcept

Return a modifiable reference to the data

+ Here is the caller graph for this function:

◆ get_data() [2/2]

template<typename T>
const T& Aleph::Snodenc< T >::get_data ( ) const
inlinenoexcept

Return a constant reference to the data

◆ get_first()

template<typename T>
Snodenc*& Aleph::Snodenc< T >::get_first ( ) const
inlinenoexcept

Return the node following to this.

In the case where this is a pointer to the first node, returns the first node.

Returns
a pointer to the first node.
+ Here is the call graph for this function:

◆ get_next()

template<typename T>
Snodenc*& Aleph::Snodenc< T >::get_next ( )
inlinenoexcept

Return the node following to this

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

void Aleph::Slinknc::insert ( Slinknc p)
inlinenoexceptinherited

Insert p after this

insert(p) inserts the node pointed by p after this.

Parameters
[in]ppointer to link (or node)
+ Here is the caller graph for this function:

◆ remove_first()

template<typename T>
Snodenc* Aleph::Snodenc< T >::remove_first ( )
inlinenoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

+ Here is the call graph for this function:

◆ remove_next()

template<typename T>
Snodenc* Aleph::Snodenc< T >::remove_next ( )
inlinenoexcept

Remove the node following to this.

remove_next()removes the node linked after this and returns its address.

Returns
a pointer to the removed node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

void Aleph::Slinknc::reset ( )
inlinenoexceptinherited

Reset the link to nullptr

+ Here is the caller graph for this function:

◆ to_snodenc()

template<typename T >
Snodenc< T > * Aleph::Slinknc::to_snodenc ( )
inlinenoexceptinherited

Convert this to a `Snodenc<T>.

Note
Undefined and probably buggy behavior if this is not a valid pointer

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

Leandro Rabindranath León