Class modeling a mutable view on an array of statistics entries.
More...
#include <stats.hh>
|
using | value_type = Stats |
| 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< StatsArray > |
| The iterator type, which is a random access iterator over stats entries.
|
|
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.
|
|
|
| StatsArray (clingo_stats_t *stats, uint64_t key) |
| Construct a statistics array from a pointer to the C API and a key.
|
|
auto | at (size_t index) const -> Stats |
| Get a statistics entry at the given index if the entry is an array.
|
|
auto | operator[] (size_t index) const -> Stats |
| Get a statistics entry at the given index if the entry is an array.
|
|
auto | push (StatsType type) const -> Stats |
| Append a new statistics entry of the given type to the array.
|
|
auto | ensure (size_t index, StatsType type) const -> Stats |
| Ensure that the array has an entry at the given index.
|
|
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.
|
|
| 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.
|
|
Class modeling a mutable view on an array of statistics entries.
◆ StatsArray()
Clingo::StatsArray::StatsArray |
( |
clingo_stats_t * |
stats, |
|
|
uint64_t |
key |
|
) |
| |
|
inlineexplicit |
Construct a statistics array from a pointer to the C API and a key.
- Parameters
-
stats | the statistics entry to construct the array from |
key | the key of the statistics entry |
◆ at()
auto Clingo::StatsArray::at |
( |
size_t |
index | ) |
const -> Stats |
|
inline |
Get a statistics entry at the given index if the entry is an array.
- Parameters
-
index | the index of the statistics entry to get |
- Returns
- a statistics entry at the given index
◆ begin()
auto Clingo::StatsArray::begin |
( |
| ) |
const -> iterator |
|
inline |
Get an iterator to the beginning of the array.
- Returns
- an iterator to the beginning of the array
◆ end()
auto Clingo::StatsArray::end |
( |
| ) |
const -> iterator |
|
inline |
Get an iterator to the end of the array.
- Returns
- an iterator to the end of the array
◆ ensure()
auto Clingo::StatsArray::ensure |
( |
size_t |
index, |
|
|
StatsType |
type |
|
) |
| const -> Stats |
|
inline |
Ensure that the array has an entry at the given index.
- Parameters
-
index | the index of the statistics entry to ensure |
type | the type of the statistics entry to ensure |
- Returns
- a statistics entry at the given index
◆ operator[]()
auto Clingo::StatsArray::operator[] |
( |
size_t |
index | ) |
const -> Stats |
|
inline |
Get a statistics entry at the given index if the entry is an array.
- Parameters
-
index | the index of the statistics entry to get |
- Returns
- a statistics entry at the given index
◆ push()
Append a new statistics entry of the given type to the array.
Appended entries have their default values; empty for arrays and lists, zero for numbers.
- Parameters
-
type | the type of the new statistics entry |
- Returns
- a statistics entry at the end of the array
The documentation for this class was generated from the following file: