ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::lemon_interop::ObservedMap< GR, Map, A, Policy > Class Template Reference

a map of LEMON whose writes are told as Changed< A , int , V >, the id of the item its handle More...

#include <ADS/interop/lemon/Maps.h>

Public types

using Key = typename Map::Key
 the items
using Value = typename Map::Value
 the values
using Event = mod::Changed< A , int , Value >
 a write
using modifications = mod::list< Event >
 the events
using Subject = typename Policy::template bind< modifications , ObservedMap >
 the subject

Public member functions

template<class... O>
 ObservedMap (const GR &g, Map &m, O &... o)
 the map \( m \) of the items of \( g \), the static observers o...; both must stay alive
Value operator[] (const Key &k) const
 the value of \( k \)
void set (const Key &k, const Value &v)
 the value of \( k \) set to \( v \), and Changed
const Map & map (void) const
 the map below
Subject & subject (void)
 the subject, for ADS::batch() and ADS::quiet()
template<class O>
requires ( Subject::dynamic )
int attach (O &o)
 attaches the observer \( o \) and gives its number
void detach (int id)
 detaches the observer number \( \mathit{id} \)

Detailed description

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
class ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >

a map of LEMON whose writes are told as Changed< A , int , V >, the id of the item its handle

Member typedef documentation

◆ Event

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
using ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::Event = mod::Changed< A , int , Value >

a write

◆ Key

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
using ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::Key = typename Map::Key

the items

◆ modifications

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
using ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::modifications = mod::list< Event >

the events

◆ Subject

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
using ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::Subject = typename Policy::template bind< modifications , ObservedMap >

the subject

◆ Value

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
using ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::Value = typename Map::Value

the values

Constructor and destructor documentation

◆ ObservedMap()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
template<class... O>
ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::ObservedMap ( const GR & g,
Map & m,
O &... o )
inline

the map \( m \) of the items of \( g \), the static observers o...; both must stay alive

Member function documentation

◆ attach()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
template<class O>
requires ( Subject::dynamic )
int ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::attach ( O & o)
inline

attaches the observer \( o \) and gives its number

Precondition
no batch is open

◆ detach()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
void ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::detach ( int id)
inline

detaches the observer number \( \mathit{id} \)

Precondition
it is attached, no batch is open

◆ map()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
const Map & ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::map ( void ) const
inlinenodiscard

the map below

◆ operator[]()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
Value ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::operator[] ( const Key & k) const
inlinenodiscard

the value of \( k \)

◆ set()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
void ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::set ( const Key & k,
const Value & v )
inline

the value of \( k \) set to \( v \), and Changed

◆ subject()

template<class GR, class Map, class A = mod::Cost, class Policy = Dynamic<>>
Subject & ADS::lemon_interop::ObservedMap< GR, Map, A, Policy >::subject ( void )
inlinenodiscard

the subject, for ADS::batch() and ADS::quiet()


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