Clingo
Loading...
Searching...
No Matches
Clingo::ConfigArray Class Reference

Class modeling a mutable array of configuration entries. More...

#include <config.hh>

Inheritance diagram for Clingo::ConfigArray:
Clingo::ConstConfigArray

Public Types

using value_type = Config
 The value type.
 
using size_type = std::size_t
 The size type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 
using reference = value_type
 The reference type.
 
using pointer = Detail::ArrowProxy< value_type >
 The pointer type.
 
using iterator = Detail::RandomAccessIterator< ConfigArray >
 The iterator type.
 
- Public Types inherited from Clingo::ConstConfigArray
using value_type = ConstConfig
 The value type.
 
using size_type = std::size_t
 The size type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 
using reference = value_type
 The reference type.
 
using pointer = Detail::ArrowProxy< value_type >
 The pointer type.
 
using iterator = Detail::RandomAccessIterator< ConstConfigArray >
 The iterator type.
 

Public Member Functions

 ConfigArray (clingo_config_t *stats, ProgramId key)
 Construct from the underlying C API type and a key.
 
auto at (size_t index) const -> Config
 Get the configuration entry at the given index in the array.
 
auto operator[] (size_t index) const -> Config
 Get the configuration entry at the given index in the array.
 
auto begin () const -> iterator
 Get an iterator to the beginning of the array.
 
auto end () const -> iterator
 Get an iterator to the beginning of the array.
 
- Public Member Functions inherited from Clingo::ConstConfigArray
 ConstConfigArray (clingo_config_t const *stats, ProgramId key)
 Construct from the underlying C API type and a key.
 
auto at (size_t index) const -> ConstConfig
 Get the configuration entry at the given index in the array.
 
auto operator[] (size_t index) const -> ConstConfig
 Get the configuration entry at the given index in the 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.
 

Detailed Description

Class modeling a mutable array of configuration entries.

Constructor & Destructor Documentation

◆ ConfigArray()

Clingo::ConfigArray::ConfigArray ( clingo_config_t stats,
ProgramId  key 
)
inlineexplicit

Construct from the underlying C API type and a key.

Parameters
statsthe underlying C API type
keythe key of the configuration entry

Member Function Documentation

◆ at()

auto Clingo::ConfigArray::at ( size_t  index) const -> Config
inline

Get the configuration entry at the given index in the array.

Parameters
indexthe index of the configuration entry
Returns
the configuration entry at the given index

◆ begin()

auto Clingo::ConfigArray::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::ConfigArray::end ( ) const -> iterator
inline

Get an iterator to the beginning of the array.

Returns
an iterator to the beginning of the array

◆ operator[]()

auto Clingo::ConfigArray::operator[] ( size_t  index) const -> Config
inline

Get the configuration entry at the given index in the array.

Parameters
indexthe index of the configuration entry
Returns
the configuration entry at the given index

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