LLRunner Class Reference

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

#include <llrun.h>

List of all members.

Public Types

enum  ERunSchedule { RUN_IN, RUN_EVERY, RUN_SCHEDULE_COUNT }
 Enumeration which specifies when to run. More...
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.

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< LLRunInforun_list_t

Protected Attributes

run_list_t mRunOnce
run_list_t mRunEvery
run_handle_t mNextHandle

Classes

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:
LLRunnable

Definition at line 50 of file llrun.h.


Member Typedef Documentation

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

The pointer to a runnable.

Definition at line 56 of file llrun.h.

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.


Member Enumeration Documentation

Enumeration which specifies when to run.

Enumerator:
RUN_IN 
RUN_EVERY 
RUN_SCHEDULE_COUNT 

Definition at line 76 of file llrun.h.


Constructor & Destructor Documentation

LLRunner::LLRunner (  ) 

Constructor.

LLRunner

Definition at line 44 of file llrun.cpp.

LLRunner::~LLRunner (  ) 

Destructor.

Definition at line 49 of file llrun.cpp.

References mRunEvery, and mRunOnce.


Member Function Documentation

S32 LLRunner::run ( void   ) 

Run the runnables which are scheduled to run.

Returns:
Returns the number of runnables run.

Definition at line 55 of file llrun.cpp.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
runnable The runnable to run() on schedule.
schedule Specifies the run schedule.
seconds When to run the runnable as interpreted by schedule.
Returns:
Returns the handle to the runnable. handle == 0 means failure.

Definition at line 103 of file llrun.cpp.

References LLFrameTimer::getTotalSeconds(), indra::ipc::xml_rpc::handle(), INVALID_RUN_HANDLE, mNextHandle, mRunEvery, mRunOnce, RUN_EVERY, and RUN_IN.

Referenced by LLPumpIO::sleepChain().

Here is the call graph for this function:

Here is the caller graph for this function:

LLRunner::run_ptr_t LLRunner::removeRunnable ( LLRunner::run_handle_t  handle  ) 

Remove the specified runnable.

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

Definition at line 128 of file llrun.cpp.

References mRunEvery, and mRunOnce.


Member Data Documentation

Definition at line 136 of file llrun.h.

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

Definition at line 137 of file llrun.h.

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

Definition at line 138 of file llrun.h.

Referenced by addRunnable().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:01:35 2008 for SecondLife by  doxygen 1.5.5