KernelTaskEvent.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   (c) Art Tevs, MPI Informatik Saarbruecken                             *
00004  *       mailto: <tevs@mpi-sb.mpg.de>                                      *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  ***************************************************************************/
00012 
00013 
00014 #ifndef _NR_ENGINE_KERNEL_TASK_EVENT__H_
00015 #define _NR_ENGINE_KERNEL_TASK_EVENT__H_
00016 
00017 //----------------------------------------------------------------------------------
00018 // Includes
00019 //----------------------------------------------------------------------------------
00020 #include "KernelEvent.h"
00021 
00022 namespace nrEngine{
00023 
00024         //! Send this event if kernel start execution of a task
00025         /**
00026          * KernelStartTaskEvent will be send by the kernel if it start
00027          * a task. The event will only be sent when the kernel start ticking
00028          * so the tasks are executed first. SO before they executed this event
00029          * will be sent.
00030          * 
00031          * \ingroup sysevent
00032          **/
00033         class _NRExport KernelStartTaskEvent : public KernelEvent {
00034         
00035                 META_Event(KernelStartTaskEvent)
00036                 
00037                 private:
00038                         KernelStartTaskEvent(const std::string& taskName, TaskId id, Priority prior = Priority::IMMEDIATE)
00039                         : KernelEvent(taskName, id, prior){}
00040                                         friend class Kernel;
00041         };
00042 
00043         //! This event is sent if a task stopped/removed from pipeline
00044         /**
00045          * KernelStopTaskEvent will be send if a task is stops his execution.
00046          * Stopped tasks are automaticaly removed from the kernel's execution tree.
00047          * The event is sent after the task method taskStop() was called.
00048          *
00049          * \ingroup sysevent
00050          **/
00051         class _NRExport KernelStopTaskEvent : public KernelEvent {
00052                 
00053                 META_Event(KernelStopTaskEvent)
00054                 
00055                 private:
00056                         KernelStopTaskEvent(const std::string& taskName, TaskId id, Priority prior = Priority::IMMEDIATE)
00057                         : KernelEvent(taskName, id, prior){}
00058                         friend class Kernel;
00059         };
00060 
00061         //! Task is get into sleep state now
00062         /**
00063          * KernelSuspendTaskEvent is sent if a task is get into sleep/suspend
00064          * mode. Kernel calls taskOnSupsend() and if the function returns OK
00065          * so this event will be triggered
00066          *
00067          * \ingroup sysevent
00068          **/
00069         class _NRExport KernelSuspendTaskEvent : public KernelEvent {
00070                 
00071                 META_Event(KernelSuspendTaskEvent)
00072                 
00073                 private:
00074                         KernelSuspendTaskEvent(const std::string& taskName, TaskId id, Priority prior = Priority::IMMEDIATE)
00075                         : KernelEvent(taskName, id, prior){}
00076                         friend class Kernel;
00077         };
00078 
00079         //! Event was waked up and is runnign now
00080         /**
00081          * KernelResumeTaskEvent will be send if a task is waked up
00082          * and will resume his execution. The event is sent after a successfull
00083          * call to taskOnResume() method.
00084          *
00085          * \ingroup sysevent
00086          **/
00087         class _NRExport KernelResumeTaskEvent : public KernelEvent {
00088         
00089                 META_Event(KernelResumeTaskEvent)
00090                 
00091                 private:
00092                         KernelResumeTaskEvent(const std::string& taskName, TaskId id, Priority prior = Priority::IMMEDIATE)
00093                         : KernelEvent(taskName, id, prior){}
00094                         friend class Kernel;
00095         };
00096 
00097 }; // end namespace
00098 
00099 #endif

Generated on Wed Sep 12 23:19:42 2007 for nrEngine by  doxygen 1.5.1