![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cAppState.h>
Public Member Functions | |
| cStringF | get_ArgsStr () const noexcept |
| ITERATE_t | get_ArgsQty () const noexcept |
| cStringF | GetArgsEnum (ITERATE_t i) const |
| command line arg. More... | |
| void | InitArgsF (const FILECHAR_t *pszCommandArgs, const FILECHAR_t *pszSep=nullptr) |
| void | InitArgs2 (int argc, APP_ARGS_t argv) |
| ITERATE_t | FindCommandArg (const FILECHAR_t *pszCommandArg, bool bRegex=true, bool bIgnoreCase=true) const |
| ITERATE_t _cdecl | FindCommandArgs (bool bIgnoreCase, const FILECHAR_t *pszCommandArgFind,...) const |
| bool | HasCommandArg (const FILECHAR_t *pszCommandArg, bool bRegex=true, bool bIgnoreCase=true) const |
Static Public Member Functions | |
| static bool | IsArgSwitch (wchar_t ch) noexcept |
Public Attributes | |
| cArrayString< FILECHAR_t > | m_asArgs |
| Array of parsed m_sArguments. [0]=appname.exe, [1]=first arg. NOT nullptr terminated like APP_ARGS_t. Honors quoted text. More... | |
Parse and store command line args used to start an app. Handle Windows and POSIX/DOS formats. Use FILECHAR_t Like MFC CCommandLineInfo
| ITERATE_t Gray::cAppArgs::FindCommandArg | ( | const FILECHAR_t * | pszCommandArg, |
| bool | bRegex = true, |
||
| bool | bIgnoreCase = true |
||
| ) | const |
Find a command line arg as regex or ignoring case.
| ITERATE_t Gray::cAppArgs::FindCommandArgs | ( | bool | bIgnoreCase, |
| const FILECHAR_t * | pszCommandArgFind, | ||
| ... | |||
| ) | const |
Find one of several possible command line args maybe ignoring case. nullptr terminated list.
|
noexcept |
|
noexcept |
Unparsed Command line args as a single line/string. might be used for cOSProcess. Does not contain App.exe name.
command line arg.
Get a command line argument parsed param by index. Command line arguments honor "quoted strings" as a single argument.
|
inline |
Do we have a particular argument? pszCommandArg
| void Gray::cAppArgs::InitArgs2 | ( | int | argc, |
| APP_ARGS_t | argv | ||
| ) |
Posix, _CONSOLE or DOS style arguments. main() style init. set pre-parsed arguments from console style start. ppszArgs[0] = app path
| void Gray::cAppArgs::InitArgsF | ( | const FILECHAR_t * | pszCommandArgs, |
| const FILECHAR_t * | pszSep = nullptr |
||
| ) |
set m_sArguments and parse pszCommandArgs to cArrayString. Windows WinMain() style init.
|
inlinestaticnoexcept |
Is FILECHAR_t char 'ch' a command line switch char?
| cArrayString<FILECHAR_t> Gray::cAppArgs::m_asArgs |
Array of parsed m_sArguments. [0]=appname.exe, [1]=first arg. NOT nullptr terminated like APP_ARGS_t. Honors quoted text.