#include <llrun.h>
Collaboration diagram for LLRunner:
Public Types | |
typedef boost::shared_ptr< LLRunnable > | run_ptr_t |
The pointer to a runnable. | |
typedef S64 | run_handle_t |
The handle for use in the API. | |
RUN_IN | |
RUN_EVERY | |
RUN_SCHEDULE_COUNT | |
enum | ERunSchedule { RUN_IN, RUN_EVERY, RUN_SCHEDULE_COUNT } |
Enumeration which specifies when to run. More... | |
Public Member Functions | |
LLRunner () | |
Constructor. | |
~LLRunner () | |
Destructor. | |
S32 | run () |
Run the runnables which are scheduled to run. | |
run_handle_t | addRunnable (run_ptr_t runnable, ERunSchedule schedule, F64 seconds) |
Add a runnable to the run list. | |
run_ptr_t | removeRunnable (run_handle_t handle) |
Remove the specified runnable. | |
Protected Types | |
typedef std::vector< LLRunInfo > | run_list_t |
Protected Attributes | |
run_list_t | mRunOnce |
run_list_t | mRunEvery |
run_handle_t | mNextHandle |
Classes | |
struct | LLRunInfo |
An instance of this class has a collection of LLRunnable objects which are scheduled to run on a repeating or one time basis.
Definition at line 50 of file llrun.h.
typedef S64 LLRunner::run_handle_t |
typedef std::vector<LLRunInfo> LLRunner::run_list_t [protected] |
typedef boost::shared_ptr<LLRunnable> LLRunner::run_ptr_t |
LLRunner::~LLRunner | ( | ) |
LLRunner::run_handle_t LLRunner::addRunnable | ( | run_ptr_t | runnable, | |
ERunSchedule | schedule, | |||
F64 | seconds | |||
) |
Add a runnable to the run list.
The handle of the runnable is unique to each addition. If the same runnable is added a second time with the same or different schedule, this method will return a new handle.
runnable | The runnable to run() on schedule. | |
schedule | Specifies the run schedule. | |
seconds | When to run the runnable as interpreted by schedule. |
Definition at line 103 of file llrun.cpp.
References LLFrameTimer::getTotalSeconds(), INVALID_RUN_HANDLE, mNextHandle, mRunEvery, mRunOnce, RUN_EVERY, and RUN_IN.
Referenced by LLPumpIO::sleepChain().
LLRunner::run_ptr_t LLRunner::removeRunnable | ( | run_handle_t | handle | ) |
S32 LLRunner::run | ( | ) |
Run the runnables which are scheduled to run.
Definition at line 55 of file llrun.cpp.
References end, LLFrameTimer::getTotalSeconds(), mRunEvery, and mRunOnce.
Referenced by LLPumpIO::pump(), and LLApp::stepFrame().
run_handle_t LLRunner::mNextHandle [protected] |
run_list_t LLRunner::mRunEvery [protected] |
run_list_t LLRunner::mRunOnce [protected] |
Definition at line 136 of file llrun.h.
Referenced by addRunnable(), removeRunnable(), run(), and ~LLRunner().