Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
Menge::SceneGraph::ContextResult Class Reference

Defines the result of the context's consideration of user input. More...

#include <Context.h>

Public Member Functions

 ContextResult (bool handled, bool needsRedraw)
 Constructor. More...
 
ContextResultoperator= (const ContextResult &res)
 Simple assignment operator overloaded. More...
 
void setHandled (bool state)
 Sets the "handled" state to the given boolean state. More...
 
bool isHandled () const
 Reports if the result considers the event handled. More...
 
void setNeedsRedraw (bool state)
 Sets the "needs redraw" state to the given boolean state. More...
 
bool needsRedraw () const
 Reports if the result believes the event handling requires a redraw. More...
 
void set (bool handled, bool redraw)
 Sets the handled and needs redraw state simultaneously. More...
 
void combine (const ContextResult &res)
 Combines the provided context result with this one; flags are combined with a boolean OR. More...
 

Protected Attributes

bool _handled
 Reports if the event has been handled (and no one else needs to worry about it).
 
bool _redraw
 Reports if the event requires a redraw on the scene.
 

Friends

class Context
 

Detailed Description

Defines the result of the context's consideration of user input.

Constructor & Destructor Documentation

Menge::SceneGraph::ContextResult::ContextResult ( bool  handled,
bool  needsRedraw 
)
inline

Constructor.

Parameters
handledSet to true if the event has been handled and does not need to be considered by any other handler.
needsRedrawSet to true if the processing of the event requires a redraw.

Member Function Documentation

void Menge::SceneGraph::ContextResult::combine ( const ContextResult res)
inline

Combines the provided context result with this one; flags are combined with a boolean OR.

Parameters
resThe context results to combine with this.
bool Menge::SceneGraph::ContextResult::isHandled ( ) const
inline

Reports if the result considers the event handled.

Returns
True if the result considers the event handled, false otherwise.
bool Menge::SceneGraph::ContextResult::needsRedraw ( ) const
inline

Reports if the result believes the event handling requires a redraw.

Returns
True if the result requires a redraw, false otherwise.
ContextResult& Menge::SceneGraph::ContextResult::operator= ( const ContextResult res)
inline

Simple assignment operator overloaded.

Parameters
resConst reference to the ContextResult instance to copy from.
Returns
A reference to this context result.
void Menge::SceneGraph::ContextResult::set ( bool  handled,
bool  redraw 
)
inline

Sets the handled and needs redraw state simultaneously.

Parameters
handledTrue if the result should consider the event handled, false otherwise.
redrawTrue means the result should believe the event requires a redraw, otherwise false.
void Menge::SceneGraph::ContextResult::setHandled ( bool  state)
inline

Sets the "handled" state to the given boolean state.

Parameters
stateTrue means the result should consider the event handled, otherwise false.
void Menge::SceneGraph::ContextResult::setNeedsRedraw ( bool  state)
inline

Sets the "needs redraw" state to the given boolean state.

Parameters
stateTrue means the result should believe the event requires a redraw, otherwise false.

The documentation for this class was generated from the following file: