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

Class modeling an immutable array of configuration entries. More...

#include <config.hh>

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

Public Types

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

 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.
 

Friends

class ConfigArray
 

Detailed Description

Class modeling an immutable array of configuration entries.

Constructor & Destructor Documentation

◆ ConstConfigArray()

Clingo::ConstConfigArray::ConstConfigArray ( clingo_config_t const 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::ConstConfigArray::at ( size_t  index) const -> ConstConfig
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::ConstConfigArray::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::ConstConfigArray::end ( ) const -> iterator
inline

Get an iterator to the end of the array.

Returns
an iterator to the end of the array

◆ operator[]()

auto Clingo::ConstConfigArray::operator[] ( size_t  index) const -> ConstConfig
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

◆ size()

auto Clingo::ConstConfigArray::size ( ) const -> size_t
inline

Get the size of the array.

Returns
the size of the array

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