\hypertarget{classfz_1_1event__base}{}\section{event\+\_\+base Class Reference} \label{classfz_1_1event__base}\index{event\_base@{event\_base}} Common base class for all events. {\ttfamily \#include $<$event.\+hpp$>$} Inheritance diagram for event\+\_\+base\+: \nopagebreak \begin{figure}[H] \begin{center} \leavevmode \includegraphics[width=222pt]{classfz_1_1event__base__inherit__graph} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \mbox{\Hypertarget{classfz_1_1event__base_aa4d3f7a0ced08f75007298282d57c922}\label{classfz_1_1event__base_aa4d3f7a0ced08f75007298282d57c922}} {\bfseries event\+\_\+base} (\mbox{\hyperlink{classfz_1_1event__base}{event\+\_\+base}} const \&)=delete \item \mbox{\Hypertarget{classfz_1_1event__base_a1ef021d577ef05af75dd96f5a845babc}\label{classfz_1_1event__base_a1ef021d577ef05af75dd96f5a845babc}} \mbox{\hyperlink{classfz_1_1event__base}{event\+\_\+base}} \& {\bfseries operator=} (\mbox{\hyperlink{classfz_1_1event__base}{event\+\_\+base}} const \&)=delete \item virtual size\+\_\+t \mbox{\hyperlink{classfz_1_1event__base_a53bf8f05d17ea31cf5612c9d6860de32}{derived\+\_\+type}} () const =0 \end{DoxyCompactItemize} \subsection{Detailed Description} Common base class for all events. If possible, use simple\+\_\+event$<$$>$ below instead of deriving from \mbox{\hyperlink{classfz_1_1event__base}{event\+\_\+base}} directly. Keep events as simple as possible. Avoid mutexes in your events. \begin{Desc} \item[Examples]\par \mbox{\hyperlink{events_8cpp-example}{events.\+cpp}}, and \mbox{\hyperlink{timer_fizzbuzz_8cpp-example}{timer\+\_\+fizzbuzz.\+cpp}}.\end{Desc} \subsection{Member Function Documentation} \mbox{\Hypertarget{classfz_1_1event__base_a53bf8f05d17ea31cf5612c9d6860de32}\label{classfz_1_1event__base_a53bf8f05d17ea31cf5612c9d6860de32}} \index{event\_base@{event\_base}!derived\_type@{derived\_type}} \index{derived\_type@{derived\_type}!event\_base@{event\_base}} \subsubsection{\texorpdfstring{derived\_type()}{derived\_type()}} {\footnotesize\ttfamily virtual size\+\_\+t derived\+\_\+type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}} The returned pointer must be unique for the derived type such that\+: \mbox{\hyperlink{classfz_1_1event__base}{event\+\_\+base}}\& a = ... \mbox{\hyperlink{classfz_1_1event__base}{event\+\_\+base}}\& b = ... assert((a.\+derived\+\_\+type() == b.\+derived\+\_\+type()) == (typeid(a) == typeid(b))); \begin{DoxyWarning}{Warning} Using \&typeid is tempting, but unspecifined (sic) According to the C++ standard, the address of a static member function is unique for each type. Unfortunately this does not prevent optimizing compilers to pool identical functions. \end{DoxyWarning} Best solution is to have your derived type return the address of a static data member of it, as done in \mbox{\hyperlink{classfz_1_1simple__event}{simple\+\_\+event}}. Implemented in \mbox{\hyperlink{classfz_1_1simple__event_a972fb5146fcc0d89081dda8484b7fc7d}{simple\+\_\+event$<$ Unique\+Type, Values $>$}}. The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} \item \mbox{\hyperlink{event_8hpp}{event.\+hpp}}\end{DoxyCompactItemize}