Skip to content

Class Ase::EventList

template <class Event, class Compare>

ClassList > Ase > EventList

Maintain an array of unique Event structures with change notification.

  • #include <eventlist.hh>

Public Types

Type Name
typedef typename EventVector::const_iterator CIter
typedef std::function< void(const Event &event, int mod)> Notify

Public Functions

Type Name
EventList (const Notify & n={}, const Compare & c={})
CIter begin () const
Create a read-only copy of this EventList (possibly cached).
void clear_silently ()
Return the numberof elements.
EventVector copy () const
Const iterator that points one past the last element.
CIter end () const
Const iterator that points to the first element.
bool equals (const EventVector & ev) const
const Event * first () const
Return pointer to element that is >= event or nullptr.
bool insert (const Event & event, Event * replaced=nullptr)
const Event * last () const
Return first element or nullptr.
const Event * lookup (const Event & event) const
Return true if event was removed, notifies.
const Event * lookup_after (const Event & event) const
Return pointer to matching event or nullptr.
OrderedEventList::ConstP ordered_events ()
Clear list without notification.
bool remove (const Event & event, Event * removed=nullptr)
Only replace event , notifies.
bool replace (const Event & event, Event * replaced=nullptr)
Insert or replace event , notifies.
size_t size () const
Return last element or nullptr.

Public Types Documentation

typedef CIter

using Ase::EventList< Event, Compare >::CIter =  typename EventVector::const_iterator;

typedef Notify

using Ase::EventList< Event, Compare >::Notify =  std::function<void (const Event &event, int mod)>;

Public Functions Documentation

function EventList

inline explicit Ase::EventList::EventList (
    const Notify & n={},
    const Compare & c={}
) 

function begin

inline CIter Ase::EventList::begin () const

function clear_silently

inline void Ase::EventList::clear_silently () 

function copy

inline EventVector Ase::EventList::copy () const

function end

inline CIter Ase::EventList::end () const

function equals

inline bool Ase::EventList::equals (
    const EventVector & ev
) const

function first

inline const Event * Ase::EventList::first () const

function insert

inline bool Ase::EventList::insert (
    const Event & event,
    Event * replaced=nullptr
) 

function last

inline const Event * Ase::EventList::last () const

function lookup

inline const Event * Ase::EventList::lookup (
    const Event & event
) const

function lookup_after

inline const Event * Ase::EventList::lookup_after (
    const Event & event
) const

function ordered_events

template<class OrderedEventList>
inline OrderedEventList::ConstP Ase::EventList::ordered_events () 

function remove

inline bool Ase::EventList::remove (
    const Event & event,
    Event * removed=nullptr
) 

function replace

inline bool Ase::EventList::replace (
    const Event & event,
    Event * replaced=nullptr
) 

function size

inline size_t Ase::EventList::size () const


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/eventlist.hh