Audacity 3.2.0
CommandLineArgs.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file CommandLineArgs.h
6
7 @brief Avoid dependency on argc and argv in wxAppConsoleBase
8
9 Paul Licameli
10
11 **********************************************************************/
12#ifdef _WIN32
13# include <cstddef>
14# include <vector>
15# include <string>
16#endif
17
18namespace CommandLineArgs {
20extern UTILITY_API int argc;
22extern UTILITY_API const char *const *argv;
23
24#ifdef _WIN32
26
30struct UTILITY_API MSWParser final {
31 int argc{ 0 };
32 std::vector<const char *> argv;
33
34 MSWParser();
35 ~MSWParser();
36
37private:
38 wchar_t **wideArgv{ nullptr };
39 std::vector<std::string> narrowArgv;
40};
41#endif
42
43}
UTILITY_API const char *const * argv
A copy of argv; responsibility of application startup to assign it.
UTILITY_API int argc
A copy of argc; responsibility of application startup to assign it.