mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 14:32:24 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
54 lines
1022 B
C++
54 lines
1022 B
C++
/**
|
|
PURPOSE:
|
|
(blah.)
|
|
LIBRARY DEPENDENCY:
|
|
((../src/JITEvent.cpp))
|
|
*/
|
|
|
|
#ifndef JITEVENT_HH
|
|
#define JITEVENT_HH
|
|
|
|
#include <functional>
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
#include "sim_services/EventManager/include/Event.hh"
|
|
|
|
namespace Trick {
|
|
|
|
/**
|
|
* This is a cyclic event class. It holds a cycle time, and the function to call.
|
|
*
|
|
* @author Alexander S. Lin
|
|
*
|
|
* @date April 2014
|
|
*
|
|
*/
|
|
class JITEvent : public Trick::Event {
|
|
|
|
public:
|
|
JITEvent(int(*in_func_ptr)(void), std::string in_name = "JIT_no_name" , double in_cycle = 1.0) ;
|
|
|
|
/** calls the function_ptr job */
|
|
virtual int process( long long curr_time ) ;
|
|
|
|
/** called when the event is added to the event manager */
|
|
virtual void add() {} ;
|
|
|
|
/** called when the event is removed from the event manager */
|
|
virtual void remove() {} ;
|
|
|
|
virtual void restart() {} ;
|
|
|
|
|
|
protected:
|
|
|
|
/** pointer to funtion to run when event fires */
|
|
int (*func_ptr)(void) ;
|
|
|
|
} ;
|
|
|
|
}
|
|
|
|
#endif
|