Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

corelinux::State Class Reference

Allow an object to alter its behavior when its internal state changes. More...

#include <State.hpp>

List of all members.

Public Methods

 State (void)
 Default Constructor.

virtual ~State (void)
 Virtual Destructor.

bool operator== (StateCref) const
 Equality operator overload. More...

virtual void handle (void)=0
 Called by context.


Protected Methods

 State (StateCref) throw ( Assertion )
 Copy Constructor. More...

StateRef operator= (StateCref) throw ( Assertion )
 Assignment operator overload. More...

void setCurrentState (ContextPtr, StatePtr) throw ( NullPointerException )
 Sets context state change.


Detailed Description

Allow an object to alter its behavior when its internal state changes.

The object will appear to change its class. State is best served as a flyweight and singleton.


Constructor & Destructor Documentation

corelinux::State::State StateCref    throw ( Assertion ) [protected]
 

Copy Constructor.

Parameters:
State  const reference
Exceptions:
Assertion  to help enforce singleton


Member Function Documentation

StateRef corelinux::State::operator= StateCref    throw ( Assertion ) [protected]
 

Assignment operator overload.

Parameters:
State  const reference
Returns:
State reference to self
Exceptions:
Assertion  to help enforce singleton

bool corelinux::State::operator== StateCref    aState const
 

Equality operator overload.

Parameters:
State  const reference
Returns:
true if equal, false otherwise


The documentation for this class was generated from the following files:
This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium