Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::RunLoop Class Reference

#include <vcf/FoundationKit/RunLoop.h>

List of all members.

Public Types

enum  TimerEvents { teTimedOut = CUSTOM_EVENT_TYPES + 5002 }

Public Member Functions

void run ()
void run (const String &mode, const DateTime &duration)
void stop ()
RunLoopPeergetPeer ()
void addSource (RunLoopSource *source)
void removeSource (RunLoopSource *source)
uint32 addTimer (const String &mode, Object *source, EventHandler *handler, uint32 timeoutInMilliSeconds)
uint32 addTimer (const String &mode, uint32 timeoutInMilliSeconds)
void removeTimer (uint32 timerID)
void postEvent (Event *event)
void postEvent (Event *event, EventHandler *handler, bool deleteHandler=true)
ThreadgetOwningThread ()
bool isStopped ()
String getCurrentRunMode ()
void internal_executeOnce (const String &mode)
 This is called repeatedly by the run loop peer in it's internal loop code.
void internal_cancelled (const String &mode)
void internal_processReceivedEvent (PostedEvent *postedEvent)
 Called when the peer run loop gets a posted event.
void internal_processTimer (const String &mode, Object *source, EventHandler *handler)
 Called by the peer run loop when a timer elapses.

Public Attributes

Delegate LoopEvents
Delegate TimerEvents

Protected Member Functions

void doSources ()
 called repeated for each loop iteration of the run loop.
void pushCurrentMode (const String &mode)
void popCurrentMode ()
 RunLoop (Thread *thread)
virtual ~RunLoop ()

Protected Attributes

RunLoopPeerpeer_
bool stopped_
ThreadowningThread_
std::vector< RunLoopSource * > sources_
std::deque< Stringmodes_
Mutex mutex_

Friends

class Thread


Member Enumeration Documentation

enum VCF::RunLoop::TimerEvents
 

Enumerator:
teTimedOut 


Constructor & Destructor Documentation

VCF::RunLoop::RunLoop Thread thread  )  [protected]
 

virtual VCF::RunLoop::~RunLoop  )  [protected, virtual]
 


Member Function Documentation

void VCF::RunLoop::addSource RunLoopSource source  ) 
 

uint32 VCF::RunLoop::addTimer const String mode,
uint32  timeoutInMilliSeconds
 

uint32 VCF::RunLoop::addTimer const String mode,
Object source,
EventHandler handler,
uint32  timeoutInMilliSeconds
 

void VCF::RunLoop::doSources  )  [protected]
 

called repeated for each loop iteration of the run loop.

Each call iterates through all of the sources and calls RunLoopSource::perform() on the source instance

String VCF::RunLoop::getCurrentRunMode  ) 
 

Thread* VCF::RunLoop::getOwningThread  )  [inline]
 

RunLoopPeer* VCF::RunLoop::getPeer  ) 
 

void VCF::RunLoop::internal_cancelled const String mode  ) 
 

void VCF::RunLoop::internal_executeOnce const String mode  ) 
 

This is called repeatedly by the run loop peer in it's internal loop code.

void VCF::RunLoop::internal_processReceivedEvent PostedEvent postedEvent  ) 
 

Called when the peer run loop gets a posted event.

void VCF::RunLoop::internal_processTimer const String mode,
Object source,
EventHandler handler
 

Called by the peer run loop when a timer elapses.

bool VCF::RunLoop::isStopped  )  [inline]
 

void VCF::RunLoop::popCurrentMode  )  [protected]
 

void VCF::RunLoop::postEvent Event event,
EventHandler handler,
bool  deleteHandler = true
 

void VCF::RunLoop::postEvent Event event  ) 
 

void VCF::RunLoop::pushCurrentMode const String mode  )  [protected]
 

void VCF::RunLoop::removeSource RunLoopSource source  ) 
 

void VCF::RunLoop::removeTimer uint32  timerID  ) 
 

void VCF::RunLoop::run const String mode,
const DateTime duration
 

void VCF::RunLoop::run  ) 
 

void VCF::RunLoop::stop  ) 
 


Friends And Related Function Documentation

friend class Thread [friend]
 


Member Data Documentation

Delegate VCF::RunLoop::LoopEvents
 

std::deque<String> VCF::RunLoop::modes_ [protected]
 

Mutex VCF::RunLoop::mutex_ [protected]
 

Thread* VCF::RunLoop::owningThread_ [protected]
 

RunLoopPeer* VCF::RunLoop::peer_ [protected]
 

std::vector<RunLoopSource*> VCF::RunLoop::sources_ [protected]
 

bool VCF::RunLoop::stopped_ [protected]
 

Delegate VCF::RunLoop::TimerEvents
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information