Immutable owning argument snapshot, including argv[0]; copies share immutable storage.
More...
#include <ui_app.hpp>
|
| int | argc () const noexcept |
| const char *const * | argv () const noexcept |
| std::size_t | size () const noexcept |
| std::string_view | operator[] (std::size_t index) const |
| std::span< conststd::string >::iterator | begin () const noexcept |
| std::span< conststd::string >::iterator | end () const noexcept |
|
| static std::expected< Arguments, ProcessContextError > | capture (int argc, const char *const *argv) |
| | Opaque immutable storage; no implementation borrow is exposed.
|
Immutable owning argument snapshot, including argv[0]; copies share immutable storage.
◆ argc()
| int portals::ui::app::Arguments::argc |
( |
| ) |
const |
|
noexcept |
- Returns
- Copied argument count, including argv[0] when supplied.
◆ argv()
| const char *const * portals::ui::app::Arguments::argv |
( |
| ) |
const |
|
noexcept |
- Returns
- Read-only null-terminated pointer array, retained by this snapshot.
◆ begin()
| std::span< conststd::string >::iterator portals::ui::app::Arguments::begin |
( |
| ) |
const |
|
noexcept |
- Returns
- Immutable range beginning, retained by this snapshot.
◆ capture()
| std::expected< Arguments, ProcessContextError > portals::ui::app::Arguments::capture |
( |
int | argc, |
|
|
const char *const * | argv ) |
|
static |
Opaque immutable storage; no implementation borrow is exposed.
Copy standalone arguments without registering or modifying the process context.
- Parameters
-
| argc | Nonnegative argument count, including the program name when present. |
| argv | Array of argc non-null C strings; nullptr is allowed for argc zero. |
- Returns
- Owning copy, or INVALID_ARGUMENT/NO_MEMORY. Bytes are preserved as supplied by main().
◆ end()
| std::span< conststd::string >::iterator portals::ui::app::Arguments::end |
( |
| ) |
const |
|
noexcept |
- Returns
- Immutable range end, retained by this snapshot.
◆ operator[]()
| std::string_view portals::ui::app::Arguments::operator[] |
( |
std::size_t | index | ) |
const |
- Parameters
-
| index | Zero-based argument index. |
- Returns
- Borrowed argument bytes, retained by this snapshot.
- Exceptions
-
| std::out_of_range | When index is not less than size(). |
◆ size()
| std::size_t portals::ui::app::Arguments::size |
( |
| ) |
const |
|
noexcept |
- Returns
- Number of copied arguments, including the program name.
◆ args
- Returns
- Owning snapshot, or typed UNINITIALIZED before successful initialize/runApp(argc, argv).
The documentation for this class was generated from the following file: