Audacity 3.2.0
|
Allows registration and lookup (by name) of command types. More...
#include <CommandDirectory.h>
Classes | |
struct | RegisterType |
Public Member Functions | |
~CommandDirectory () | |
OldStyleCommandType * | LookUp (const wxString &cmdName) const |
Static Public Member Functions | |
static CommandDirectory * | Get () |
Get a pointer to the singleton instance. More... | |
Private Member Functions | |
CommandDirectory () | |
Static Private Member Functions | |
static CommandMap & | sCmdMap () |
static void | AddCommand (std::unique_ptr< OldStyleCommandType > type) |
Static Private Attributes | |
static std::unique_ptr< CommandDirectory > | mInstance |
Allows registration and lookup (by name) of command types.
A singleton. This fulfills a similar purpose to CommandManager, but for general Commands rather than menu items. Eventually they could be unified but for now they are kept separate to make things simpler.
Definition at line 30 of file CommandDirectory.h.
CommandDirectory::~CommandDirectory | ( | ) |
Definition at line 62 of file CommandDirectory.cpp.
|
private |
Definition at line 22 of file CommandDirectory.cpp.
Referenced by Get().
|
staticprivate |
Definition at line 82 of file CommandDirectory.cpp.
References details::end(), sCmdMap(), and wxT().
|
static |
Get a pointer to the singleton instance.
Definition at line 94 of file CommandDirectory.cpp.
References CommandDirectory(), mInstance, and safenew.
Referenced by CommandBuilder::BuildCommand().
OldStyleCommandType * CommandDirectory::LookUp | ( | const wxString & | cmdName | ) | const |
If a command with the given name has been registered in the directory, return a pointer to the factory for commands of that type. Otherwise return NULL.
Definition at line 66 of file CommandDirectory.cpp.
References details::end(), and sCmdMap().
Referenced by CommandBuilder::BuildCommand().
|
staticprivate |
Definition at line 76 of file CommandDirectory.cpp.
Referenced by AddCommand(), and LookUp().
|
staticprivate |
Definition at line 33 of file CommandDirectory.h.
Referenced by Get().