Audacity 3.2.0
CommandDirectory.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity - A Digital Audio Editor
4 Copyright 1999-2009 Audacity Team
5 License: wxWidgets
6
7 Dan Horgan
8
9******************************************************************//*******************************************************************/
22
23#ifndef __COMMANDDIRECTORY__
24#define __COMMANDDIRECTORY__
25
26#include "CommandType.h"
27
29
30class AUDACITY_DLL_API CommandDirectory
31{
32private:
33 static std::unique_ptr<CommandDirectory> mInstance;
34 static CommandMap &sCmdMap();
35
36 static void AddCommand(std::unique_ptr<OldStyleCommandType> type);
37public:
41 RegisterType( std::unique_ptr<OldStyleCommandType> type )
42 { AddCommand( std::move( type ) ); }
43 };
44
46
50 OldStyleCommandType *LookUp(const wxString &cmdName) const;
51
53 static CommandDirectory *Get();
54
55private:
57};
58
59#endif /* End of include guard: __COMMANDDIRECTORY__ */
std::map< wxString, std::unique_ptr< OldStyleCommandType > > CommandMap
Definition: CommandMisc.h:36
Contains declarations for CommandType class.
Allows registration and lookup (by name) of command types.
static std::unique_ptr< CommandDirectory > mInstance
CommandOutputTargets a mix of three output classes to output progress indication, status messages and...
Base class for containing data common to all commands of a given type. Also acts as a factory.
Definition: CommandType.h:45
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:196
RegisterType(std::unique_ptr< OldStyleCommandType > type)