LLRunner Class Reference

This class manages a set of LLRunnable objects. More...

#include <llrun.h>

Collaboration diagram for LLRunner:

Collaboration graph
List of all members.

Public Types

typedef boost::shared_ptr<
 The pointer to a runnable.
typedef S64 run_handle_t
 The handle for use in the API.
 Enumeration which specifies when to run. More...

Public Member Functions

 LLRunner ()
 ~LLRunner ()
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< LLRunInforun_list_t

Protected Attributes

run_list_t mRunOnce
run_list_t mRunEvery
run_handle_t mNextHandle


struct  LLRunInfo

Detailed Description

This class manages a set of LLRunnable objects.

An instance of this class has a collection of LLRunnable objects which are scheduled to run on a repeating or one time basis.

See also:

Definition at line 50 of file llrun.h.

Member Typedef Documentation

typedef S64 LLRunner::run_handle_t

The handle for use in the API.

Definition at line 61 of file llrun.h.

typedef std::vector<LLRunInfo> LLRunner::run_list_t [protected]

Definition at line 135 of file llrun.h.

typedef boost::shared_ptr<LLRunnable> LLRunner::run_ptr_t

The pointer to a runnable.

Definition at line 56 of file llrun.h.

Member Enumeration Documentation

enum LLRunner::ERunSchedule

Enumeration which specifies when to run.


Definition at line 76 of file llrun.h.

Constructor & Destructor Documentation

LLRunner::LLRunner (  ) 



Definition at line 44 of file llrun.cpp.

LLRunner::~LLRunner (  ) 


Definition at line 49 of file llrun.cpp.

References mRunEvery, and mRunOnce.

Member Function Documentation

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.
Returns the handle to the runnable. handle == 0 means failure.

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  ) 

Remove the specified runnable.

handle The handle of the runnable to remove.
Returns the pointer to the runnable removed which may be empty.

Definition at line 128 of file llrun.cpp.

References end, and mRunOnce.

S32 LLRunner::run (  ) 

Run the runnables which are scheduled to run.

Returns the number of runnables run.

Definition at line 55 of file llrun.cpp.

References end, LLFrameTimer::getTotalSeconds(), mRunEvery, and mRunOnce.

Referenced by LLPumpIO::pump(), and LLApp::stepFrame().

Member Data Documentation

run_handle_t LLRunner::mNextHandle [protected]

Definition at line 138 of file llrun.h.

Referenced by addRunnable().

run_list_t LLRunner::mRunEvery [protected]

Definition at line 137 of file llrun.h.

Referenced by addRunnable(), run(), and ~LLRunner().

run_list_t LLRunner::mRunOnce [protected]

Definition at line 136 of file llrun.h.

Referenced by addRunnable(), removeRunnable(), run(), and ~LLRunner().

The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:42 2010 for Second Life Viewer by  doxygen 1.4.7