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

Create a read-only copy of this EventList (possibly cached).

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

function clear_silently

Return the numberof elements.

inline void Ase::EventList::clear_silently () 

function copy

Const iterator that points one past the last element.

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

function end

Const iterator that points to the first element.

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

function equals

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

function first

Return pointer to element that is >= event or nullptr.

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

function insert

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

function last

Return first element or nullptr.

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

function lookup

Return true if event was removed, notifies.

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

function lookup_after

Return pointer to matching event or nullptr.

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

function ordered_events

Clear list without notification.

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

function remove

Only replace event , notifies.

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

function replace

Insert or replace event , notifies.

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

function size

Return last element or nullptr.

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


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