Bromeon
Classes | Functions
Events

Facilities for object-oriented event handling using callbacks. More...

Classes

class  thor::Action
 Class for dynamic actions that are connected with SFML events. More...
struct  thor::ActionContext< ActionIdentifier >
 Structure containing information about the context in which an action has occurred. More...
class  thor::ActionMap< ActionIdentifier >
 Class template that associates identifiers with dynamic actions. More...
class  thor::Connection
 Class that manages the connection between an event and a listener. More...
class  thor::ScopedConnection
 Class that manages the connection between an event and a listener and disconnects it at destruction. More...
class  thor::EventSystem< Event, EventIdentifier >
 Class for object-oriented handling of user-defined events. More...
struct  thor::Joystick
 Small wrapper class for joystick number and button number. More...

Functions

std::string thor::ToString (sf::Keyboard::Key key)
 Returns a string representation of key.
std::string thor::ToString (sf::Mouse::Button button)
 Returns a string representation of button.
sf::Keyboard::Key thor::ToKeyboardKey (const std::string &string)
 Returns the key interpretation of string.
sf::Mouse::Button thor::ToMouseButton (const std::string &string)
 Returns the mouse button interpretation of string.
Action thor::operator|| (const Action &lhs, const Action &rhs)
 OR operator of two actions: The resulting action is in effect if at least one of lhs and rhs is active.
Action thor::operator&& (const Action &lhs, const Action &rhs)
 AND operator of two actions: The resulting action is in effect if both lhs and rhs are active.

Detailed Description

Facilities for object-oriented event handling using callbacks.


Function Documentation

sf::Keyboard::Key thor::ToKeyboardKey ( const std::string &  string)

Returns the key interpretation of string.

The passed string shall be identical to the enum identifier. For example:

 thor::ToKeyboardKey("BackSlash") == sf::Keyboard::BackSlash
Exceptions:
StringConversionExceptionif the string doesn't match a key.
sf::Mouse::Button thor::ToMouseButton ( const std::string &  string)

Returns the mouse button interpretation of string.

The passed string shall be identical to the enum identifier. For example:

 thor::ToMouseButton("Right") == sf::Mouse::Right
Exceptions:
StringConversionExceptionif the string doesn't match a mouse button.
std::string thor::ToString ( sf::Keyboard::Key  key)

Returns a string representation of key.

The returned string is identical to the enum identifier. For example:

 thor::ToString(sf::Keyboard::BackSlash) == "BackSlash"
Exceptions:
StringConversionExceptionin case of invalid key.
std::string thor::ToString ( sf::Mouse::Button  button)

Returns a string representation of button.

The returned string is identical to the enum identifier. For example:

 thor::ToString(sf::Mouse::Right) == "Right"
Exceptions:
StringConversionExceptionin case of invalid mouse button.