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_axis (Axis &node) |
Visitor function for Axis nodes. More... | |
virtual T | visit_bool (Bool &node) |
Visitor function for Bool nodes. More... | |
virtual T | visit_complex (Complex &node) |
Visitor function for Complex nodes. More... | |
virtual T | visit_complex_matrix (ComplexMatrix &node) |
Visitor function for ComplexMatrix nodes. More... | |
virtual T | visit_int (Int &node) |
Visitor function for Int nodes. More... | |
virtual T | visit_json (Json &node) |
Visitor function for Json nodes. More... | |
virtual T | visit_qubit (Qubit &node) |
Visitor function for Qubit nodes. More... | |
virtual T | visit_real (Real &node) |
Visitor function for Real nodes. More... | |
virtual T | visit_real_matrix (RealMatrix &node) |
Visitor function for RealMatrix nodes. More... | |
virtual T | visit_string (String &node) |
Visitor function for String nodes. More... | |
virtual T | visit_type_base (TypeBase &node) |
Fallback function for TypeBase 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_axis (Axis &node, void *retval) override |
Internal visitor function for Axis nodes. More... | |
void | raw_visit_bool (Bool &node, void *retval) override |
Internal visitor function for Bool nodes. More... | |
void | raw_visit_complex (Complex &node, void *retval) override |
Internal visitor function for Complex nodes. More... | |
void | raw_visit_complex_matrix (ComplexMatrix &node, void *retval) override |
Internal visitor function for ComplexMatrix nodes. More... | |
void | raw_visit_int (Int &node, void *retval) override |
Internal visitor function for Int nodes. More... | |
void | raw_visit_json (Json &node, void *retval) override |
Internal visitor function for Json nodes. More... | |
void | raw_visit_qubit (Qubit &node, void *retval) override |
Internal visitor function for Qubit nodes. More... | |
void | raw_visit_real (Real &node, void *retval) override |
Internal visitor function for Real nodes. More... | |
void | raw_visit_real_matrix (RealMatrix &node, void *retval) override |
Internal visitor function for RealMatrix nodes. More... | |
void | raw_visit_string (String &node, void *retval) override |
Internal visitor function for String nodes. More... | |
void | raw_visit_type_base (TypeBase &node, void *retval) override |
Internal visitor function for TypeBase nodes. More... | |
template<> | |
void | raw_visit_node (Node &node, void *retval) |
Internal visitor function for nodes of any type. More... | |
template<> | |
void | raw_visit_axis (Axis &node, void *retval) |
Internal visitor function for Axis nodes. More... | |
template<> | |
void | raw_visit_bool (Bool &node, void *retval) |
Internal visitor function for Bool nodes. More... | |
template<> | |
void | raw_visit_complex (Complex &node, void *retval) |
Internal visitor function for Complex nodes. More... | |
template<> | |
void | raw_visit_complex_matrix (ComplexMatrix &node, void *retval) |
Internal visitor function for ComplexMatrix nodes. More... | |
template<> | |
void | raw_visit_int (Int &node, void *retval) |
Internal visitor function for Int nodes. More... | |
template<> | |
void | raw_visit_json (Json &node, void *retval) |
Internal visitor function for Json nodes. More... | |
template<> | |
void | raw_visit_qubit (Qubit &node, void *retval) |
Internal visitor function for Qubit nodes. More... | |
template<> | |
void | raw_visit_real (Real &node, void *retval) |
Internal visitor function for Real nodes. More... | |
template<> | |
void | raw_visit_real_matrix (RealMatrix &node, void *retval) |
Internal visitor function for RealMatrix nodes. More... | |
template<> | |
void | raw_visit_string (String &node, void *retval) |
Internal visitor function for String nodes. More... | |
template<> | |
void | raw_visit_type_base (TypeBase &node, void *retval) |
Internal visitor function for TypeBase nodes. More... | |
template<> | |
void | raw_visit_node (Node &node, void *retval) |
Internal visitor function for nodes of any type. More... | |
template<> | |
void | raw_visit_axis (Axis &node, void *retval) |
Internal visitor function for Axis nodes. More... | |
template<> | |
void | raw_visit_bool (Bool &node, void *retval) |
Internal visitor function for Bool nodes. More... | |
template<> | |
void | raw_visit_complex (Complex &node, void *retval) |
Internal visitor function for Complex nodes. More... | |
template<> | |
void | raw_visit_complex_matrix (ComplexMatrix &node, void *retval) |
Internal visitor function for ComplexMatrix nodes. More... | |
template<> | |
void | raw_visit_int (Int &node, void *retval) |
Internal visitor function for Int nodes. More... | |
template<> | |
void | raw_visit_json (Json &node, void *retval) |
Internal visitor function for Json nodes. More... | |
template<> | |
void | raw_visit_qubit (Qubit &node, void *retval) |
Internal visitor function for Qubit nodes. More... | |
template<> | |
void | raw_visit_real (Real &node, void *retval) |
Internal visitor function for Real nodes. More... | |
template<> | |
void | raw_visit_real_matrix (RealMatrix &node, void *retval) |
Internal visitor function for RealMatrix nodes. More... | |
template<> | |
void | raw_visit_string (String &node, void *retval) |
Internal visitor function for String nodes. More... | |
template<> | |
void | raw_visit_type_base (TypeBase &node, void *retval) |
Internal visitor function for TypeBase 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 84 of file cqasm-v1-types-gen.hpp.
#include <cqasm-v1-types-gen.hpp>
|
overrideprotectedvirtual |
Internal visitor function for nodes of any type.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1453 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Axis
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1471 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Bool
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1489 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Complex
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1507 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for ComplexMatrix
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1525 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Int
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1543 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Json
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1561 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Qubit
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1579 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for Real
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1597 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for RealMatrix
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1615 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for String
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1633 of file cqasm-v1-types-gen.hpp.
|
overrideprotectedvirtual |
Internal visitor function for TypeBase
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1651 of file cqasm-v1-types-gen.hpp.
|
pure virtual |
Fallback function for nodes of any type.
|
inlinevirtual |
Visitor function for Axis
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1373 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for Bool
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1380 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for Complex
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1387 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for ComplexMatrix
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1394 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for Int
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1401 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for Json
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1408 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for Qubit
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1415 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for Real
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1422 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for RealMatrix
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1429 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Visitor function for String
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1436 of file cqasm-v1-types-gen.hpp.
|
inlinevirtual |
Fallback function for TypeBase
nodes.
Reimplemented in cqasm::v1::types::Dumper, and cqasm::v1::types::RecursiveVisitor.
Definition at line 1443 of file cqasm-v1-types-gen.hpp.
|
protectedvirtual |
Internal visitor function for nodes of any type.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1470 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Axis
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1479 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Bool
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1488 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Complex
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1497 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for ComplexMatrix
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1506 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Int
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1515 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Json
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1524 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Qubit
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1533 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for Real
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1542 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for RealMatrix
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1551 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for String
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1560 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for TypeBase
nodes.
Implements cqasm::v1::types::VisitorBase.
Definition at line 1569 of file cqasm-v1-types-gen.cpp.
|
protectedvirtual |
Internal visitor function for nodes of any type.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Axis
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Bool
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Complex
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for ComplexMatrix
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Int
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Json
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Qubit
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for Real
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for RealMatrix
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for String
nodes.
Implements cqasm::v1::types::VisitorBase.
|
protectedvirtual |
Internal visitor function for TypeBase
nodes.
Implements cqasm::v1::types::VisitorBase.