Webdar 1.0.0
Web user interface to libdar
Public Member Functions | Protected Member Functions | List of all members
events Class Reference

class events More...

#include <events.hpp>

Inheritance diagram for events:
Inheritance graph
[legend]
Collaboration diagram for events:
Collaboration graph
[legend]

Public Member Functions

 events (const events &ref)
 copy constructor More...
 
 events (events &&ref) noexcept(false)=default
 
eventsoperator= (const events &ref)=default
 
eventsoperator= (events &&ref) noexcept(false)
 
void record_actor_on_event (actor *ptr, const std::string &name)
 record an actor for an given event
 
- Public Member Functions inherited from reference
 reference ()
 usual constructor
 
 reference (const reference &ref)
 copy constructor More...
 
 reference (reference &&ref) noexcept(false)
 move constructor (only operational for objects without peering) More...
 
referenceoperator= (const reference &ref)
 assignment operator (only operational for objects without peering) More...
 
referenceoperator= (reference &&ref) noexcept(false)
 move assigment operator More...
 
virtual ~reference ()
 destructor
 
void peer_with (reference *obj)
 method used to create a relation between two objects More...
 
void break_peer_with (reference *obj)
 break the peering with the object given as argument
 
bool is_peer (reference *obj) const
 whether a peering exists with that object
 
bool is_empty () const
 whether the current object has peering
 
unsigned int size () const
 the number of peers
 

Protected Member Functions

virtual void broken_peering_from (reference *obj) override
 inherited from class reference More...
 
void register_name (const std::string &name)
 add a new event for actors to register against
 
void unregister_name (const std::string &name)
 remove an event and remove all actors that registed on it
 
void rename_name (const std::string &old_name, const std::string &new_name)
 rename an event and keep all existing peering to this new event More...
 
void act (const std::string &name)
 trigger a given event
 
- Protected Member Functions inherited from reference
virtual void broken_peering_from (reference *obj)
 to be informed when a peer has broke the peering with me More...
 
void reset_read_peers () const
 reset the peers reading
 
bool read_next_peer (reference *&peer) const
 

Detailed Description

class events

an events object contains a set of events, each one having a name. an actor object must register for one or more named event of a events object (or of different events objects) to be triggered by a named event from that object

Examples
/home/denis/Webdar/webdar/src/html_form_input_file.hpp.

Constructor & Destructor Documentation

◆ events()

events::events ( const events ref)

copy constructor

Note
all events are kept, but all registered actors to these events are not registered to the newly created object (see copy constructor of reference class)

Member Function Documentation

◆ broken_peering_from()

void events::broken_peering_from ( reference obj)
overrideprotectedvirtual

inherited from class reference

Reimplemented from reference.

◆ rename_name()

void events::rename_name ( const std::string &  old_name,
const std::string &  new_name 
)
protected

rename an event and keep all existing peering to this new event

Note
the new name must not already exist for that same object

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