Clingo
|
Class modeling a mutable map of configuration entries. More...
#include <config.hh>
Public Types | |
using | key_type = std::string_view |
The key type. | |
using | mapped_type = Config |
The mapped type. | |
using | value_type = std::pair< key_type, mapped_type > |
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< ConfigMap > |
The iterator type. | |
![]() | |
using | key_type = std::string_view |
The key type. | |
using | mapped_type = ConstConfig |
The mapped type. | |
using | value_type = std::pair< key_type, mapped_type > |
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< ConstConfigMap > |
The iterator type. | |
Public Member Functions | |
ConfigMap (clingo_config_t *stats, ProgramId key) | |
Construct from the underlying C API type and a key. | |
auto | at (size_t index) const -> value_type |
Get the name configuration entry pair at the given index in the map. | |
auto | get (std::string_view name) const -> Config |
Get the configuration entry with the given name in the map. | |
auto | operator[] (std::string_view name) const -> Config |
Get the configuration entry with the given name in the map. | |
auto | begin () const -> iterator |
Get an iterator to the beginning of the map. | |
auto | end () const -> iterator |
Get an iterator to the end of the map. | |
![]() | |
ConstConfigMap (clingo_config_t const *stats, ProgramId key) | |
Construct from the underlying C API type and a key. | |
auto | size () const -> size_t |
Get the size of the map. | |
auto | at (size_t index) const -> value_type |
Get the name configuration entry pair at the given index in the map. | |
auto | get (std::string_view name) const -> ConstConfig |
Get the configuration entry with the given name in the map. | |
auto | operator[] (std::string_view name) const -> ConstConfig |
Get the configuration entry with the given name in the map. | |
auto | contains (std::string_view name) const -> bool |
Check if the map contains a configuration entry with the given name. | |
auto | begin () const -> iterator |
Get an iterator to the beginning of the map. | |
auto | end () const -> iterator |
Get an iterator to the end of the map. | |
Class modeling a mutable map of configuration entries.
|
inlineexplicit |
Construct from the underlying C API type and a key.
stats | the underlying C API type |
key | the key of the configuration entry |
|
inline |
Get the name configuration entry pair at the given index in the map.
index | the index of the configuration entry |
Get an iterator to the beginning of the map.
Get an iterator to the end of the map.
Get the configuration entry with the given name in the map.
name | the name of the configuration entry |
Get the configuration entry with the given name in the map.
name | the name of the configuration entry |