![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The contents of a journal, including what could not be read. More...
#include <algotradelib/src/runner/journal.hpp>
Public Member Functions | |
| bool | readable () const noexcept |
| Tests whether the file could be read. | |
| bool | intact () const noexcept |
| Tests whether everything was read. | |
Public Attributes | |
| std::vector< JournalEntry > | entries_ |
| Every line that parsed, in file order. | |
| std::size_t | unreadable_lines_ {0} |
| How many lines did not parse (on an append-only file, writes that did not finish). | |
| bool | truncated_tail_ {false} |
| Whether the last line was incomplete, as after a kill during a write. | |
| std::string | detail_ |
| What was wrong, for the operator. | |
| std::string | scope_ |
| The broker and account the file's header declares, if it has one. | |
| bool | has_header_ {false} |
| Whether a header was found; a non-empty file without one is not written to. | |
| JournalReadStatus | status_ {JournalReadStatus::READ} |
| Whether the file was read; READ for an in-memory journal. | |
The contents of a journal, including what could not be read.
Damage is returned as data: a torn last line is evidence that something was in flight.
Definition at line 464 of file journal.hpp.
|
inlinenoexcept |
Tests whether everything was read.
Definition at line 499 of file journal.hpp.
|
inlinenoexcept |
Tests whether the file could be read.
Definition at line 484 of file journal.hpp.
Referenced by intact(), and algotradelib::runner::recover_into().
| std::string algotradelib::runner::JournalReplay::detail_ |
What was wrong, for the operator.
Definition at line 472 of file journal.hpp.
Referenced by algotradelib::runner::parse_journal_bytes(), and algotradelib::runner::recover_into().
| std::vector<JournalEntry> algotradelib::runner::JournalReplay::entries_ |
Every line that parsed, in file order.
Definition at line 466 of file journal.hpp.
Referenced by algotradelib::runner::parse_journal_bytes(), algotradelib::runner::placements_of(), algotradelib::runner::recorded_placements(), algotradelib::runner::MemoryJournal::replay(), and algotradelib::runner::unresolved_instructions().
| bool algotradelib::runner::JournalReplay::has_header_ {false} |
Whether a header was found; a non-empty file without one is not written to.
Definition at line 476 of file journal.hpp.
Referenced by algotradelib::runner::parse_journal_bytes().
| std::string algotradelib::runner::JournalReplay::scope_ |
The broker and account the file's header declares, if it has one.
Definition at line 474 of file journal.hpp.
Referenced by algotradelib::runner::parse_journal_bytes().
| JournalReadStatus algotradelib::runner::JournalReplay::status_ {JournalReadStatus::READ} |
Whether the file was read; READ for an in-memory journal.
Definition at line 478 of file journal.hpp.
Referenced by algotradelib::runner::parse_journal_bytes(), and readable().
| bool algotradelib::runner::JournalReplay::truncated_tail_ {false} |
Whether the last line was incomplete, as after a kill during a write.
Definition at line 470 of file journal.hpp.
Referenced by intact(), algotradelib::runner::parse_journal_bytes(), and algotradelib::runner::recover_into().
| std::size_t algotradelib::runner::JournalReplay::unreadable_lines_ {0} |
How many lines did not parse (on an append-only file, writes that did not finish).
Definition at line 468 of file journal.hpp.
Referenced by intact(), algotradelib::runner::parse_journal_bytes(), and algotradelib::runner::recover_into().