algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::runner::Context< BrokerTag, CapsType >::Log Class Reference

A log that keeps lines in memory for the runner to emit or a test to read. More...

#include <algotradelib/src/runner/context.hpp>

Public Member Functions

void note (std::string_view message)
 Records one line; when 4096 lines are held, the oldest is dropped.
const std::vector< std::string > & lines () const noexcept
 Returns the lines recorded since the last take.
std::vector< std::string > take ()
 Removes and returns the recorded lines.

Detailed Description

template<typename BrokerTag, typename CapsType>
class algotradelib::runner::Context< BrokerTag, CapsType >::Log

A log that keeps lines in memory for the runner to emit or a test to read.

Definition at line 104 of file context.hpp.

Member Function Documentation

◆ lines()

template<typename BrokerTag, typename CapsType>
const std::vector< std::string > & algotradelib::runner::Context< BrokerTag, CapsType >::Log::lines ( ) const
inlinenoexcept

Returns the lines recorded since the last take.

Returns
The lines, oldest first.

Definition at line 121 of file context.hpp.

◆ note()

template<typename BrokerTag, typename CapsType>
void algotradelib::runner::Context< BrokerTag, CapsType >::Log::note ( std::string_view message)
inline

Records one line; when 4096 lines are held, the oldest is dropped.

Parameters
messageThe line.

Definition at line 110 of file context.hpp.

◆ take()

template<typename BrokerTag, typename CapsType>
std::vector< std::string > algotradelib::runner::Context< BrokerTag, CapsType >::Log::take ( )
inline

Removes and returns the recorded lines.

Returns
The lines, oldest first.

Definition at line 127 of file context.hpp.


The documentation for this class was generated from the following file: