Loading...
Searching...
No Matches
by::tbicontainable< K, V > Class Template Referenceabstract

Template bidirectional container interface. More...

#include <tbicontainable.hpp>

Inheritance diagram for by::tbicontainable< K, V >:
by::tnbicontainer< std::string, node > by::tnbicontainer< K, V > by::tnchain< K, V, nmap > by::tnchain< std::string, node, tnmap< std::string, node, immutableTactic > > by::tnmap< K, V, strTactic > by::tnchain< K, V, _defaultContainer > by::tnmap< K, V, TACTIC > by::dumScope by::tndumChain< K, V, defaultContainer > by::tndumMap< K, V, TACTIC >

Public Member Functions

Voperator[] (const K &key)
 
const Voperator[] (const K &key) const
 
virtual ncnt len () const =0
 
ncnt isEmpty () const
 
virtual nbool in (const K &key) const =0
 
nbool in (const K *it) const BY_SIDE_FUNC(in)
 
nbool in (const V &val) const
 
nbool in (const V *it) const BY_SIDE_FUNC(in)
 
nbool in (std::function< nbool(const K &key, const V &val)> l) const
 
template<typename V1 >
nbool in (std::function< nbool(const K &key, const V1 &val)> l) const
 
virtual Vget (const K &key)=0
 
const Vget (const K &key) const BY_CONST_FUNC(get(key)) V *get(const K *it) BY_SIDE_FUNC(get)
 
template<typename V1 >
V1get ()
 
template<typename V1 >
const V1get () const BY_CONST_FUNC(get< V1 >()) template< typename V1 > V1 *get(const K &key)
 
template<typename V1 >
const V1get (const K &key) const BY_CONST_FUNC(get< V1 >(key)) template< typename V1 > V1 *get(const K *it) BY_SIDE_FUNC(get< V1 >)
 
template<typename V1 >
tnarr< V1, strTactic > getAll () const
 
template<typename V1 >
tnarr< V1, strTactic > getAll (std::function< nbool(const K &, const V1 &)> l) const
 
tnarr< V, strTactic > getAll (std::function< nbool(const K &, const V &)> l) const
 
template<typename V1 >
void each (std::function< nbool(const K &, V1 &)> l)
 
void each (std::function< nbool(const K &, V &)> l)
 
iter begin (const K *it) const BY_SIDE_FUNC(it
 
iter begin iterate (0))
 
iter rbegin () const
 
iter rbegin (const K &key) const
 
iter rbegin (const K *it) const BY_SIDE_FUNC(it
 
iter rbegin riterate (0))
 
virtual iter end () const
 
virtual iter rend () const
 
virtual iter last () const
 
iter iterate (ncnt step) const
 
iter iterate (ncnt step, nbool isBoundary) const
 
iter iterate (const K &key) const
 
iter iterate (const K *it) const BY_SIDE_FUNC(it
 
iter iterate begin ())
 
iter iterate (const K &key, nbool isBoundary) const
 
iter iterate (const K *key, nbool isBoundary) const BY_SIDE_FUNC(key
 
iter iterate iterate (0, isBoundary))
 
iter riterate (ncnt step) const
 
iter riterate (ncnt step, nbool isBoundary) const
 
iter riterate (const K &key) const
 
iter riterate (const K *it) const BY_SIDE_FUNC(it
 
iter riterate rbegin ())
 
iter riterate (const K &key, nbool isBoundary) const
 
iter riterate (const K *key, nbool isBoundary) const BY_SIDE_FUNC(key
 
iter riterate riterate (0, isBoundary))
 
virtual nbool add (const K &key, const V &val)=0
 
nbool add (const K *key, const V &val) BY_SIDE_FUNC(key
 
nbool add (const K &key, const V *val) BY_SIDE_FUNC(val
 
nbool add (key, *val)
 
nbool add (const K *key, const V *val) BY_SIDE_FUNC(key||val
 
ncnt add (const iter &from, const iter &to)
 
ncnt add (const tbicontainable &rhs)
 
ncnt add (const tbicontainable *it) BY_SIDE_FUNC(add)
 
virtual nbool del (const K &key)=0
 
nbool del (const K *it) BY_SIDE_FUNC(del)
 
virtual nbool del (const iter &at)=0
 
nbool del (const iter *it) BY_SIDE_FUNC(del)
 
virtual nbool del (const iter &from, const iter &end)=0
 
nbool del (const iter *from, const iter &end) BY_SIDE_FUNC(from
 
nbool del (const iter &from, const iter *end) BY_SIDE_FUNC(end
 
nbool del (from, *end)
 
nbool del (const iter *from, const iter *end) BY_SIDE_FUNC(from &&end
 
nbool del (const tbicontainable &rhs)
 
nbool del (const tbicontainable *it) BY_SIDE_FUNC(del)
 
virtual void rel ()=0
 

Public Attributes

template<typename V1 >
const V1 *get(const K *key) const BY_CONST_FUNC(get< V1 >(key)) template< typename V1 > V1 *get(std V get )(std::function< nbool(const K &, const V &)> l)
 
template<typename V1 >
const V1 *get(std::function< nbool(const K &, const V1 &)> l) const BY_CONST_FUNC(get(l)) const V *get(std tnarr< V, strTactic getAll )(const K *it) const BY_SIDE_FUNC(getAll)
 
template<typename V1 >
void each(std::function< nbool(const K &, const V1 &)> l) const BY_CONST_FUNC(each(l)) void each(std ite begin )(const K &key) const
 
iter begin it
 
iter rbegin it
 
iter iterate it
 
iter iterate key
 
iter riterate it
 
iter riterate key
 
nbool add key
 
nbool add false
 
nbool false
 
nbool del from
 
nbool del false
 

Protected Member Functions

virtual iteration_onMakeIteration (const K *key, nbool isReversed, ncnt step, nbool isBoundary) const =0
 
virtual void _getAll (const K &key, narr &tray) const =0
 

Detailed Description

template<typename K, typename V>
class by::tbicontainable< K, V >

Template bidirectional container interface.

Key-value container template with bidirectional iterator support.

Remarks
tbicontainable has API treating iter ref and element as its parameter.

Member Function Documentation

◆ del()

template<typename K , typename V >
virtual nbool by::tbicontainable< K, V >::del ( const K & key)
pure virtual

delete all elements matched by given key.

Parameters
keykey to be deleted

Implemented in by::tnchain< K, V, _defaultContainer >, by::tnchain< K, V, nmap >, by::tnmap< K, V, TACTIC >, and by::tnmap< K, V, strTactic >.

◆ iterate()

template<typename K , typename V >
iter by::tbicontainable< K, V >::iterate ( ncnt step,
nbool isBoundary ) const
Parameters
stepdetermines which element the iter will point to. If 0 is entered, an iter will be created that points to the frontmost element.
isBoundarydetermines whether this iter belongs to the end boundary of the inner container. for example, if there is a container with len() of 3, and a reversed boundary iter that points to the 2nd element for that container is created, and a chain is formed by linking this iter, when iterating over the chain, the 3rd element of the container will be iterated in reverse order.

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