Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/control/command-setup.hpp"
Marker and Helper for writing Steam-Layer Command definitions.
Together with the Macro COMMAND_DEFINITION, such definitions may be written statically, in DSL-style:
void(CommandDef&)
Definition at line 88 of file command-setup.hpp.
Public Member Functions | |
CommandSetup (Symbol cmdID) | |
Start a command setup for defining a Steam-Layer command with the given cmdID. More... | |
operator string () const | |
operator Symbol const & () const | |
CommandSetup & | operator= (DefinitionClosure) |
core functionality: provide a command definition block. More... | |
Static Public Member Functions | |
static void | invokeDefinitionClosures () |
static size_t | pendingCnt () |
diagnostics / test | |
Friends | |
bool | operator!= (CommandSetup const &left, CommandSetup const &right) |
bool | operator== (CommandSetup const &left, CommandSetup const &right) |
Private Attributes | |
Symbol | cmdID_ |
Additional Inherited Members | |
Private Member Functions inherited from Cloneable | |
Cloneable (Cloneable &&)=delete | |
Cloneable (Cloneable const &)=default | |
Cloneable & | operator= (Cloneable &&)=delete |
Cloneable & | operator= (Cloneable const &)=delete |
CommandSetup | ( | Symbol | cmdID | ) |
Start a command setup for defining a Steam-Layer command with the given cmdID.
cmdID | the ID under with the new command will be registered |
Definition at line 85 of file command-setup.cpp.
CommandSetup & operator= | ( | DefinitionClosure | definitionBlock | ) |
core functionality: provide a command definition block.
definitionBlock | anything assignable to function<void(CommandDef&)> |
main()
). On invocation, the code block is provided with an still unbound CommandDef object, which has been registered under the Command-ID as stored in this CommandSetup object. The assumption is that this definition closure will care to define the command, state capturing and undo operations for the command definition in question. Thus, the result of invoking this closure will be to store a complete command prototype into the steam::control::CommandRegistry. Definition at line 112 of file command-setup.cpp.
|
static |
empty the definition queue and invoke definitions
Definition at line 130 of file command-setup.cpp.