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

esve::kernel::Wake_State_Server Class Reference

Supervise the waking state. More...

#include <esve/kernel/Wake_State_Server.hxx>

Inheritance diagram for esve::kernel::Wake_State_Server:

esve::kernel::impl::Kernel_Node esve::kernel::Wake_State_Handler esve::kernel::Wake_State_Emitter esve::kernel::impl::Emitter esve::kernel::impl::Handler esve::kernel::Kernel_Node esve::message::impl::Active_State esve::kernel::impl::Handler esve::kernel::impl::Emitter esve::kernel::Emitter esve::kernel::Handler esve::message::Active_State esve::kernel::Handler esve::kernel::Emitter esve::message::Active_State esve::kernel::Handler esve::kernel::Emitter List of all members.

Public Member Functions

void add_handler (kernel::Handler &)
 Child handlers.

void remove_handler (kernel::Handler &)
 Child handlers.

void remove_all_handlers ()
 Child handlers.

bool active () const
 Whether to pass messages to children.

void active (bool)
 Whether to pass messages to children.

virtual bool active () const =0
 Whether to pass messages to children.

virtual void active (bool)=0
 Whether to pass messages to children.


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.

bool awake () const
 Are we awake?

virtual bool emit_check_awake ()
 Ask whoever's listening if they want to be awake.

virtual bool emit_sleep ()
 Tell folks to go to sleep.

virtual bool emit_wake ()
 Tell folks to go to wake up.


Detailed Description

Supervise the waking state.

A Wake_State_Server is both a kernel::Node, a Wake_State_Emitter, and a Wake_State_Handler.

In response to a handle_check_awake() message:

  1. As a Kernel_Node, it relays the message to its children.
  2. If one or more children return true then it sends another message, handle_wake(), otherwise it sends handle_sleep().
  3. Multiple handle_wake()s in a row will not be sent, nor will multiple handle_sleep()s.


Member Function Documentation

bool esve::kernel::Wake_State_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.

virtual bool esve::message::Active_State::active  )  const [pure virtual, inherited]
 

Whether to pass messages to children.

When active(), messages are relayed from parents to children. When active() == false, no messages are relayed.

Implemented in esve::message::impl::Active_State, and esve::kernel::Caching_Node.

virtual void esve::message::Active_State::active bool   )  [pure virtual, inherited]
 

Whether to pass messages to children.

When active(), messages are relayed from parents to children. When active() == false, no messages are relayed.

Implemented in esve::message::impl::Active_State, and esve::kernel::Caching_Node.

bool esve::message::impl::Active_State::active  )  const [virtual, inherited]
 

Whether to pass messages to children.

When active(), messages are relayed from parents to children. When active() == false, no messages are relayed.

Implements esve::message::Active_State.

void esve::message::impl::Active_State::active bool   )  [virtual, inherited]
 

Whether to pass messages to children.

When active(), messages are relayed from parents to children. When active() == false, no messages are relayed.

Implements esve::message::Active_State.


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