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 Member Functions

 State (void)
 Default Constructor.
virtual ~State (void)
 Virtual Destructor.
bool operator== (StateCref) const
 Equality operator overload.
virtual void handle (void)=0
 Called by context.

Protected Member Functions

 State (StateCref) throw ( Assertion )
 Copy Constructor.
StateRef operator= (StateCref) throw ( Assertion )
 Assignment operator overload.
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

bool corelinux::State::operator== ( StateCref   )  const

Equality operator overload.

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

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


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