Skip to content

sgns::face::GenericList

An interface for a generic list. More...

#include <generic_list.hpp>

Public Types

Name
using size_t size_type
using T value_type
using ForwardIterator< GenericList< T > > iterator

Public Functions

Name
virtual ~GenericList() =default
virtual void push_back(value_type && t) =0
virtual void push_back(const value_type & t) =0
virtual void push_front(value_type && t) =0
virtual void push_front(const value_type & t) =0
virtual value_type pop_back() =0
virtual value_type pop_front() =0
virtual void erase(const iterator & begin, const iterator & end) =0
virtual iterator begin() =0
virtual iterator end() =0
virtual bool empty() const =0
virtual size_type size() const =0

Detailed Description

template <typename T >
class sgns::face::GenericList;

An interface for a generic list.

Public Types Documentation

using size_type

using sgns::face::GenericList< T >::size_type = size_t;

using value_type

using sgns::face::GenericList< T >::value_type = T;

using iterator

using sgns::face::GenericList< T >::iterator = ForwardIterator<GenericList<T>>;

Public Functions Documentation

function ~GenericList

virtual ~GenericList() =default

function push_back

virtual void push_back(
    value_type && t
) =0

Put an element to the back of the list

function push_back

virtual void push_back(
    const value_type & t
) =0

function push_front

virtual void push_front(
    value_type && t
) =0

Put an element to the front of the list

function push_front

virtual void push_front(
    const value_type & t
) =0

function pop_back

virtual value_type pop_back() =0

Get the back of the list and then remove it

function pop_front

virtual value_type pop_front() =0

Get the front of the list and then remove it

function erase

virtual void erase(
    const iterator & begin,
    const iterator & end
) =0

Erase a range of elements

function begin

virtual iterator begin() =0

function end

virtual iterator end() =0

function empty

virtual bool empty() const =0

Tell whether list is empty

function size

virtual size_type size() const =0

Obtain the size of the list


Updated on 2026-03-04 at 13:10:44 -0800