29 m_rnd_op_idx(0, n_ops - 1)
33 FLOW_LOG_INFO(
"Op_list [" <<
static_cast<const void*
>(
this) <<
"]: will store [" << n_ops <<
"] ops.");
35 for (
size_t idx = 0; idx != n_ops; ++idx)
37 m_ops[idx] = create_op_func(idx);
60 "op index [" << idx <<
"] from [0, " <<
size() <<
").");
const Op & random_op(size_t *chosen_idx=0) const
Returns (*this)[R], where we randomly select R as if by random_idx() and communicate it to the caller...
Op_list(log::Logger *logger_ptr, size_t n_ops, const Create_op_func &create_op_func)
Populates the async::Op list, which is immutable after this returns.
util::Rnd_gen_uniform_range_mt< size_t > m_rnd_op_idx
Random number facility for generating random indices in [0, m_ops.size()).
const std::vector< Op > & ops_sequence() const
Returns reference to immutable internally stored sequence of async::Op in order consistent with other...
const Op & operator[](size_t idx) const
Returns reference to immutable async::Op at the given index in [0, size()).
std::vector< Op > m_ops
The payload of async::Op objects.
size_t random_idx() const
Returns a randomly selected index from range [O, size()).
size_t size() const
Returns the number of async::Op stored in this Op_list.
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
#define FLOW_LOG_INFO(ARG_stream_fragment)
Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
#define FLOW_LOG_TRACE(ARG_stream_fragment)
Logs a TRACE message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...
Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...
boost::any Op
An object of this opaque type represents a collection of 1 or more async::Task, past or future,...
@ S_ASYNC
Simply post the given task to execute asynchronously in some execution context – as soon as the conte...
Flow_log_component
The flow::log::Component payload enumeration comprising various log components used by Flow's own int...