Made to Order Software Corporation Logo

LLChatLib: LLRunner Class Reference

LLRunner Class Reference

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

#include <llrun.h>

List of all members.

Public Types

enum  ERunSchedule
 

Enumeration which specifies when to run.



typedef S64 run_handle_t
 The handle for use in the API.

typedef boost::shared_ptr
< LLRunnable
run_ptr_t
 The pointer to a runnable.

Public Member Functions

run_handle_t addRunnable (run_ptr_t runnable, ERunSchedule schedule, F64 seconds)
 Add a runnable to the run list.

 LLRunner ()
 Constructor.

run_ptr_t removeRunnable (run_handle_t handle)
 Remove the specified runnable.

S32 run ()
 Run the runnables which are scheduled to run.

 ~LLRunner ()
 Destructor.


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

Constructor & Destructor Documentation

LLRunner::LLRunner (  ) 

Constructor.

LLRunner


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.

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.
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.
S32 LLRunner::run ( void   ) 

Run the runnables which are scheduled to run.

Returns:
Returns the number of runnables run.

The documentation for this class was generated from the following files:
  • /home/doug/src/oss/slitechat/trunk/LLChatLib/llcommon/llrun.h
  • /home/doug/src/oss/slitechat/trunk/LLChatLib/llcommon/llrun.cpp
Generated on Thu Sep 23 17:18:43 2010 for LLChatLib by  doxygen 1.6.3