Clingo
|
Class modeling an immutable view on an array of statistics entries. More...
#include <stats.hh>
Public Types | |
using | value_type = ConstStats |
The value type of the array, which are stats entries. | |
using | size_type = std::size_t |
The size type of the array. | |
using | difference_type = std::ptrdiff_t |
The difference type of the array. | |
using | reference = value_type |
The reference type of the array, which are stats entries. | |
using | pointer = Detail::ArrowProxy< value_type > |
The pointer type of the array, which is a proxy to stats entries. | |
using | iterator = Detail::RandomAccessIterator< ConstStatsArray > |
The iterator type, which is a random access iterator over stats entries. | |
Public Member Functions | |
ConstStatsArray (clingo_stats_t const *stats, uint64_t key) | |
Construct a statistics array from a pointer to the C API and a key. | |
auto | at (size_t index) const -> ConstStats |
Get a statistics entry at the given index if the entry is an array. | |
auto | operator[] (size_t index) const -> ConstStats |
Get a statistics entry at the given index if the entry is an array. | |
auto | size () const -> size_t |
Get the size of the array. | |
auto | begin () const -> iterator |
Get an iterator to the beginning of the array. | |
auto | end () const -> iterator |
Get an iterator to the end of the array. | |
Friends | |
class | StatsArray |
Class modeling an immutable view on an array of statistics entries.
|
inlineexplicit |
Construct a statistics array from a pointer to the C API and a key.
stats | the statistics entry to construct the array from |
key | the key of the statistics entry |
|
inline |
Get a statistics entry at the given index if the entry is an array.
index | the index of the statistics entry to get |
Get an iterator to the beginning of the array.
Get an iterator to the end of the array.
|
inline |
Get a statistics entry at the given index if the entry is an array.
index | the index of the statistics entry to get |
Get the size of the array.