libqasm
library for handling cQASM files
|
Base class for the visitor pattern for the tree. More...
Public Member Functions | |
virtual T | visit_node (Node &node)=0 |
Fallback function for nodes of any type. More... | |
virtual T | visit_bit_refs (BitRefs &node) |
Visitor function for BitRefs nodes. More... | |
virtual T | visit_const_axis (ConstAxis &node) |
Visitor function for ConstAxis nodes. More... | |
virtual T | visit_const_bool (ConstBool &node) |
Visitor function for ConstBool nodes. More... | |
virtual T | visit_const_complex (ConstComplex &node) |
Visitor function for ConstComplex nodes. More... | |
virtual T | visit_const_complex_matrix (ConstComplexMatrix &node) |
Visitor function for ConstComplexMatrix nodes. More... | |
virtual T | visit_const_int (ConstInt &node) |
Visitor function for ConstInt nodes. More... | |
virtual T | visit_const_json (ConstJson &node) |
Visitor function for ConstJson nodes. More... | |
virtual T | visit_const_real (ConstReal &node) |
Visitor function for ConstReal nodes. More... | |
virtual T | visit_const_real_matrix (ConstRealMatrix &node) |
Visitor function for ConstRealMatrix nodes. More... | |
virtual T | visit_const_string (ConstString &node) |
Visitor function for ConstString nodes. More... | |
virtual T | visit_constant (Constant &node) |
Fallback function for Constant nodes. More... | |
virtual T | visit_function (Function &node) |
Visitor function for Function nodes. More... | |
virtual T | visit_qubit_refs (QubitRefs &node) |
Visitor function for QubitRefs nodes. More... | |
virtual T | visit_reference (Reference &node) |
Fallback function for Reference nodes. More... | |
virtual T | visit_variable_ref (VariableRef &node) |
Visitor function for VariableRef nodes. More... | |
![]() | |
virtual | ~VisitorBase ()=default |
Virtual destructor for proper cleanup. More... | |
Protected Member Functions | |
void | raw_visit_node (Node &node, void *retval) override |
Internal visitor function for nodes of any type. More... | |
void | raw_visit_bit_refs (BitRefs &node, void *retval) override |
Internal visitor function for BitRefs nodes. More... | |
void | raw_visit_const_axis (ConstAxis &node, void *retval) override |
Internal visitor function for ConstAxis nodes. More... | |
void | raw_visit_const_bool (ConstBool &node, void *retval) override |
Internal visitor function for ConstBool nodes. More... | |
void | raw_visit_const_complex (ConstComplex &node, void *retval) override |
Internal visitor function for ConstComplex nodes. More... | |
void | raw_visit_const_complex_matrix (ConstComplexMatrix &node, void *retval) override |
Internal visitor function for ConstComplexMatrix nodes. More... | |
void | raw_visit_const_int (ConstInt &node, void *retval) override |
Internal visitor function for ConstInt nodes. More... | |
void | raw_visit_const_json (ConstJson &node, void *retval) override |
Internal visitor function for ConstJson nodes. More... | |
void | raw_visit_const_real (ConstReal &node, void *retval) override |
Internal visitor function for ConstReal nodes. More... | |
void | raw_visit_const_real_matrix (ConstRealMatrix &node, void *retval) override |
Internal visitor function for ConstRealMatrix nodes. More... | |
void | raw_visit_const_string (ConstString &node, void *retval) override |
Internal visitor function for ConstString nodes. More... | |
void | raw_visit_constant (Constant &node, void *retval) override |
Internal visitor function for Constant nodes. More... | |
void | raw_visit_function (Function &node, void *retval) override |
Internal visitor function for Function nodes. More... | |
void | raw_visit_qubit_refs (QubitRefs &node, void *retval) override |
Internal visitor function for QubitRefs nodes. More... | |
void | raw_visit_reference (Reference &node, void *retval) override |
Internal visitor function for Reference nodes. More... | |
void | raw_visit_variable_ref (VariableRef &node, void *retval) override |
Internal visitor function for VariableRef nodes. More... | |
template<> | |
void | raw_visit_node (Node &node, void *retval) |
Internal visitor function for nodes of any type. More... | |
template<> | |
void | raw_visit_bit_refs (BitRefs &node, void *retval) |
Internal visitor function for BitRefs nodes. More... | |
template<> | |
void | raw_visit_const_axis (ConstAxis &node, void *retval) |
Internal visitor function for ConstAxis nodes. More... | |
template<> | |
void | raw_visit_const_bool (ConstBool &node, void *retval) |
Internal visitor function for ConstBool nodes. More... | |
template<> | |
void | raw_visit_const_complex (ConstComplex &node, void *retval) |
Internal visitor function for ConstComplex nodes. More... | |
template<> | |
void | raw_visit_const_complex_matrix (ConstComplexMatrix &node, void *retval) |
Internal visitor function for ConstComplexMatrix nodes. More... | |
template<> | |
void | raw_visit_const_int (ConstInt &node, void *retval) |
Internal visitor function for ConstInt nodes. More... | |
template<> | |
void | raw_visit_const_json (ConstJson &node, void *retval) |
Internal visitor function for ConstJson nodes. More... | |
template<> | |
void | raw_visit_const_real (ConstReal &node, void *retval) |
Internal visitor function for ConstReal nodes. More... | |
template<> | |
void | raw_visit_const_real_matrix (ConstRealMatrix &node, void *retval) |
Internal visitor function for ConstRealMatrix nodes. More... | |
template<> | |
void | raw_visit_const_string (ConstString &node, void *retval) |
Internal visitor function for ConstString nodes. More... | |
template<> | |
void | raw_visit_constant (Constant &node, void *retval) |
Internal visitor function for Constant nodes. More... | |
template<> | |
void | raw_visit_function (Function &node, void *retval) |
Internal visitor function for Function nodes. More... | |
template<> | |
void | raw_visit_qubit_refs (QubitRefs &node, void *retval) |
Internal visitor function for QubitRefs nodes. More... | |
template<> | |
void | raw_visit_reference (Reference &node, void *retval) |
Internal visitor function for Reference nodes. More... | |
template<> | |
void | raw_visit_variable_ref (VariableRef &node, void *retval) |
Internal visitor function for VariableRef nodes. More... | |
template<> | |
void | raw_visit_node (Node &node, void *retval) |
Internal visitor function for nodes of any type. More... | |
template<> | |
void | raw_visit_bit_refs (BitRefs &node, void *retval) |
Internal visitor function for BitRefs nodes. More... | |
template<> | |
void | raw_visit_const_axis (ConstAxis &node, void *retval) |
Internal visitor function for ConstAxis nodes. More... | |
template<> | |
void | raw_visit_const_bool (ConstBool &node, void *retval) |
Internal visitor function for ConstBool nodes. More... | |
template<> | |
void | raw_visit_const_complex (ConstComplex &node, void *retval) |
Internal visitor function for ConstComplex nodes. More... | |
template<> | |
void | raw_visit_const_complex_matrix (ConstComplexMatrix &node, void *retval) |
Internal visitor function for ConstComplexMatrix nodes. More... | |
template<> | |
void | raw_visit_const_int (ConstInt &node, void *retval) |
Internal visitor function for ConstInt nodes. More... | |
template<> | |
void | raw_visit_const_json (ConstJson &node, void *retval) |
Internal visitor function for ConstJson nodes. More... | |
template<> | |
void | raw_visit_const_real (ConstReal &node, void *retval) |
Internal visitor function for ConstReal nodes. More... | |
template<> | |
void | raw_visit_const_real_matrix (ConstRealMatrix &node, void *retval) |
Internal visitor function for ConstRealMatrix nodes. More... | |
template<> | |
void | raw_visit_const_string (ConstString &node, void *retval) |
Internal visitor function for ConstString nodes. More... | |
template<> | |
void | raw_visit_constant (Constant &node, void *retval) |
Internal visitor function for Constant nodes. More... | |
template<> | |
void | raw_visit_function (Function &node, void *retval) |
Internal visitor function for Function nodes. More... | |
template<> | |
void | raw_visit_qubit_refs (QubitRefs &node, void *retval) |
Internal visitor function for QubitRefs nodes. More... | |
template<> | |
void | raw_visit_reference (Reference &node, void *retval) |
Internal visitor function for Reference nodes. More... | |
template<> | |
void | raw_visit_variable_ref (VariableRef &node, void *retval) |
Internal visitor function for VariableRef nodes. More... | |
Base class for the visitor pattern for the tree.
To operate on the tree, derive from this class, describe your operation by overriding the appropriate visit functions. and then call node->visit(your_visitor)
. The default implementations for the node-specific functions fall back to the more generic functions, eventually leading to visit_node()
, which must be implemented with the desired behavior for unknown nodes.
Definition at line 112 of file cqasm-v1-values-gen.hpp.
#include <cqasm-v1-values-gen.hpp>
|
overrideprotectedvirtual |
Internal visitor function for nodes of any type.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1917 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for BitRefs
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1935 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstAxis
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1953 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstBool
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1971 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstComplex
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1989 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstComplexMatrix
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2007 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstInt
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2025 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstJson
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2043 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstReal
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2061 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstRealMatrix
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2079 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ConstString
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2097 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Constant
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2115 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Function
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2133 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for QubitRefs
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2151 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Reference
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2169 of file cqasm-v1-values-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for VariableRef
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2187 of file cqasm-v1-values-gen.hpp.
|
pure virtual |
Fallback function for nodes of any type.
|
inlinevirtual |
Visitor function for BitRefs
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1809 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstAxis
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1816 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstBool
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1823 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstComplex
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1830 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstComplexMatrix
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1837 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstInt
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1844 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstJson
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1851 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstReal
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1858 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstRealMatrix
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1865 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for ConstString
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1872 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Fallback function for Constant
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1879 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for Function
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1886 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for QubitRefs
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1893 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Fallback function for Reference
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1900 of file cqasm-v1-values-gen.hpp.
|
inlinevirtual |
Visitor function for VariableRef
nodes.
Reimplemented in cqasm::v1::values::Dumper, and cqasm::v1::values::RecursiveVisitor.
Definition at line 1907 of file cqasm-v1-values-gen.hpp.
|
protectedvirtual |
Internal visitor function for nodes of any type.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1914 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for BitRefs
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1923 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstAxis
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1932 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstBool
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1941 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstComplex
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1950 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstComplexMatrix
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1959 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstInt
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1968 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstJson
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1977 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstReal
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1986 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstRealMatrix
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 1995 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for ConstString
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2004 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for Constant
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2013 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for Function
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2022 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for QubitRefs
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2031 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for Reference
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2040 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for VariableRef
nodes.
Implements cqasm::v1::values::VisitorBase.
Definition at line 2049 of file cqasm-v1-values-gen.cpp.
|
protectedvirtual |
Internal visitor function for nodes of any type.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for BitRefs
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstAxis
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstBool
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstComplex
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstComplexMatrix
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstInt
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstJson
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstReal
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstRealMatrix
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for ConstString
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for Constant
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for Function
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for QubitRefs
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for Reference
nodes.
Implements cqasm::v1::values::VisitorBase.
|
protectedvirtual |
Internal visitor function for VariableRef
nodes.
Implements cqasm::v1::values::VisitorBase.