libqasm
library for handling cQASM files
Namespaces | Typedefs | Functions
cqasm-v1-types.hpp File Reference

Defines the types of values available within cQASM's type system, as well as some utility functions. More...

Go to the source code of this file.

Namespaces

 cqasm
 Toplevel namespace with entry points for the new API.
 
 cqasm::v1
 Namespace for the "new" cQASM 1.x API.
 
 cqasm::v1::types
 Namespace for the classes representing the types available within cQASM.
 

Typedefs

using cqasm::v1::types::Type = tree::One< TypeBase >
 A cQASM type. More...
 
using cqasm::v1::types::Types = tree::Any< TypeBase >
 Zero or more cQASM types. More...
 

Functions

Types cqasm::v1::types::from_spec (const std::string &spec)
 Constructs a set of types from a shorthand string representation. More...
 
bool cqasm::v1::types::type_check (const Type &expected, const Type &actual)
 Returns whether the actual type matches the constraints of the expected type. More...
 
std::ostream & cqasm::v1::types::operator<< (std::ostream &os, const Type &type)
 Stream << overload for a single type. More...
 
std::ostream & cqasm::v1::types::operator<< (std::ostream &os, const Types &types)
 Stream << overload for zero or more types. More...
 

Detailed Description

Defines the types of values available within cQASM's type system, as well as some utility functions.

Definition in file cqasm-v1-types.hpp.

#include "cqasm-v1-types-gen.hpp"
Include dependency graph for cqasm-v1-types.hpp:
This graph shows which files directly or indirectly include this file: