libqasm
library for handling cQASM files
|
Table of all mappings within a certain scope. More...
Public Member Functions | |
void | add (const std::string &name, const values::Value &value, const tree::Maybe< ast::Mapping > &node=tree::Maybe< ast::Mapping >()) |
Adds a mapping. More... | |
values::Value | resolve (const std::string &name) const |
Resolves a mapping. More... | |
const std::unordered_map< std::string, std::pair< const values::Value, tree::Maybe< ast::Mapping > > > & | get_table () const |
Grants read access to the underlying map. More... | |
Table of all mappings within a certain scope.
Definition at line 38 of file cqasm-v1-resolver.hpp.
#include <cqasm-v1-resolver.hpp>
void cqasm::v1::resolver::MappingTable::add | ( | const std::string & | name, |
const values::Value & | value, | ||
const tree::Maybe< ast::Mapping > & | node = tree::Maybe<ast::Mapping>() |
||
) |
Adds a mapping.
Definition at line 23 of file cqasm-v1-resolver.cpp.
Value cqasm::v1::resolver::MappingTable::resolve | ( | const std::string & | name | ) | const |
Resolves a mapping.
Throws NameResolutionFailure if no mapping by the given name exists.
Definition at line 45 of file cqasm-v1-resolver.cpp.
const std::unordered_map< std::string, std::pair< const values::Value, tree::Maybe< ast::Mapping > > > & cqasm::v1::resolver::MappingTable::get_table | ( | ) | const |
Grants read access to the underlying map.
Definition at line 57 of file cqasm-v1-resolver.cpp.