Clingo
|
Class to providing a view on the const directives in a logic program. More...
#include <control.hh>
Public Types | |
using | key_type = std::string_view |
The key type. | |
using | mapped_type = Symbol |
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< ConstMap > |
The iterator type. | |
Public Member Functions | |
ConstMap (clingo_const_map_t const *map) | |
Construct from the underlying C representation. | |
auto | contains (key_type name) const -> bool |
Check if the map contains the given key. | |
auto | operator[] (key_type name) const -> mapped_type |
Get the value of for the given key. | |
auto | at (size_t index) const -> value_type |
Get the key value pair at the given index. | |
auto | size () const -> size_type |
Get the size of 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. | |
Class to providing a view on the const directives in a logic program.
The class models a map from parameter names to their values.
|
inlineexplicit |
Construct from the underlying C representation.
For internal use.
|
inline |
Get the key value pair at the given index.
index | the index of the element |
Get an iterator to the beginning of the map.
Check if the map contains the given key.
name | the key to check |
Get an iterator to the end of the map.
|
inline |
Get the value of for the given key.
name | the key to look up |
Get the size of the map.