Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

esve::kernel::Sync_Update_Server Class Reference

Provide synchronous updates across wake/sleep cycles. More...

#include <esve/kernel/Sync_Update_Server.hxx>

Inheritance diagram for esve::kernel::Sync_Update_Server:

esve::kernel::Wake_State_Handler esve::kernel::Sync_Update_Sender esve::kernel::impl::Handler esve::message::impl::Tick_Receiver esve::message::impl::Update_Sender esve::kernel::Handler esve::message::Tick_Receiver esve::message::Update_Sender List of all members.

Public Member Functions

void reset ()
 Reset the dt interval to zero. Useful after waking up.

void remove_all ()
 Child update() receivers.

virtual void add (Update_Receiver &)=0
 Child update() receivers.

virtual void remove (Update_Receiver &)=0
 Child update() receivers.


Protected Member Functions

bool handle_check_awake (bool currently_awake)
 Do you want to be awake?

bool handle_wake ()
 The command to wake up.

bool handle_sleep ()
 The command to sleep.

void tick ()
 Receive the tick() message.

bool awake () const
 Are we awake?

void send_update ()
 Send the update() message to all children.

void send_update (double dt)
 Send the update() message to all children.


Detailed Description

Provide synchronous updates across wake/sleep cycles.

A Sync_Update_Server is both a Wake_State_Handler and a Sync_Update_Sender.

When a Sync_Update_Server receives handle_wake(), it calls Sync_Update_Sender::reset() on itself. In this manner a consistent time-delta is provided to children.

A Sync_Update_Server will not send synchronized update()s unless it is awake().


Member Function Documentation

bool esve::kernel::Sync_Update_Server::handle_check_awake bool  currently_awake  )  [protected, virtual]
 

Do you want to be awake?

If currently awake, a return value of true indicates a desire to stay awake. If not currently awake, a return value of true indicates a desire to wake up.

Implements esve::kernel::Wake_State_Handler.


Generated on Tue May 30 11:40:56 2006 for esve by doxygen 1.3.4