4#include "../Foundation/Result.h"
5#include "../Strings/StringView.h"
6#include "StringsExport.h"
10struct StringFormatOutput;
26 UnexpectedOptionValue,
28 MissingPositionalValue,
30 InsufficientArgumentStorage,
31 InsufficientPositionalStorage,
32 InvalidShortOptionGroup
35 Status status = Status::Success;
36 Error error = Error::None;
55 using CustomParser = bool (*)(
void* userData,
StringSpan value);
57 Type type = Type::None;
58 void* storage =
nullptr;
59 CustomParser customParse =
nullptr;
69 [[nodiscard]]
bool requiresValue()
const;
79 char negativeShortName = 0;
80 bool required =
false;
90 bool remaining =
false;
118#if SC_PLATFORM_WINDOWS
119 [[nodiscard]]
Result setFromMainArguments(
int argc,
const wchar_t*
const* argv,
Span<StringSpan> storage);
unsigned short uint16_t
Platform independent (2) bytes unsigned int.
Definition PrimitiveTypes.h:28
unsigned char uint8_t
Platform independent (1) byte unsigned int.
Definition PrimitiveTypes.h:27
int int32_t
Platform independent (4) bytes signed int.
Definition PrimitiveTypes.h:37
Definition CommandLine.h:113
Definition CommandLine.h:73
Definition CommandLine.h:13
Definition CommandLine.h:85
Definition CommandLine.h:99
Definition CommandLine.h:43
An ascii string used as boolean result. SC_TRY macro forwards errors to caller.
Definition Result.h:13
View over a contiguous sequence of items (pointer + size in elements).
Definition Span.h:29
An read-only view over a string (to avoid including Strings library when parsing is not needed).
Definition StringSpan.h:37
Non-owning view over a range of characters with UTF Encoding.
Definition StringView.h:47