m/market labResearch, with a record.
Source on GitHub ↗

options.hpp

1#pragma once2#include "itch/feed/moldudp/live.hpp"3#include <cstddef>4#include <cstdint>5#include <optional>6#include <string>78namespace itch {9/** Settings shared by live input and file replay. */10struct BookOptions {11    std::string target;12    bool check_book = false;13    size_t max_depth = 5;14};1516struct OutputOptions {17    std::string path;18};1920struct ReplayOptions {21    std::string path;22    bool verify = false;23    bool allow_implicit_eof = false;24    bool with_offset = false;25};2627struct CheckpointOptions {28    std::string path;29    std::string resume_path;30    std::optional<uint64_t> stop_after_frame;31    uint64_t every_frames = 0;32    bool resume_csv = false;33};3435/** Validated app configuration; replay/checkpoint settings apply only to file mode.36 * CLI token tracking stays private to the parser, outside these settings.37 */38struct Options {39    bool live = false;40    BookOptions book;41    OutputOptions output;42    LiveOptions network;43    ReplayOptions replay;44    CheckpointOptions checkpoint;45};4647/** Parse command-line arguments and validate mode combinations.48 * Resolves the default checkpoint destination when continuation requests saving.49 * @throws std::runtime_error for missing, invalid, or incompatible arguments.50 */51Options parse_options(int argc, char** argv);52} // namespace itch