iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::Event Class Reference

#include <nrt/Core/Debugging/EventLog.H>

Event is a simple proxy class for an event, similar to lock classes for mutex.

Just like providing lock() and unlock() functions for mutex objects poses problems, for example with exceptions which may leave a mutex locked, providing event start and stop functions poses similar problems. Hence, similar to the concept of lock objects, the nrt::EventLog facility uses Event objects.

Basically, an Event starts when it is constructed and ends when it is destructed. Event is intended to be used with nrt::EventLog. Indeed, only nrt::EventLog can construct new events. This is because an Event must be attached to ean EventLog so that the Event can report to the EventLog upon destruction. Thus, EventLog can create Event objects, these can then be kept alive or passed along (using move semantics), and when Event objects get destructed they update their end time in the EventLog.

See Also
nrt::EventLog::event(), nrt::EventLog, nrt::EventLogEntry

Definition at line 88 of file EventLog.H.

Public Member Functions

 Event (Event &&e)
 Move constructor.
 Event ()=delete
 Forbid default construction.
 Event (Event const &e)=delete
 Forbid copy-construction.
Eventoperator= (Event &&e)
 Move assignment.
Eventoperator= (Event const &e)=delete
 Forbid copy.
 ~Event ()
 The event will be marked as finished in the EventLog when the Event destructor is called.


class EventLog

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