68 auto iter =
sCmdMap().find(cmdName);
73 return iter->second.get();
84 wxASSERT(type != NULL);
86 auto cmdName = type->GetSymbol().Internal();
88 ,
wxT(
"A command named ") + cmdName
89 +
wxT(
" already exists."));
91 sCmdMap()[cmdName] = std::move(type);
Contains declarations for CommandDirectory class.
std::map< wxString, std::unique_ptr< OldStyleCommandType > > CommandMap
Allows registration and lookup (by name) of command types.
static std::unique_ptr< CommandDirectory > mInstance
static CommandMap & sCmdMap()
static void AddCommand(std::unique_ptr< OldStyleCommandType > type)
OldStyleCommandType * LookUp(const wxString &cmdName) const
static CommandDirectory * Get()
Get a pointer to the singleton instance.
Base class for containing data common to all commands of a given type. Also acts as a factory.
const char * end(const char *str) noexcept