libqasm
library for handling cQASM files
|
Represents a reference to some storage location. More...
Public Member Functions | |
Reference * | as_reference () override |
Interprets this node to a node of type Reference. More... | |
const Reference * | as_reference () const override |
Interprets this node to a node of type Reference. More... | |
![]() | |
virtual NodeType | type () const =0 |
Returns the NodeType of this node. More... | |
virtual One< Node > | copy () const =0 |
Returns a shallow copy of this node. More... | |
virtual One< Node > | clone () const =0 |
Returns a deep copy of this node. More... | |
virtual bool | equals (const Node &rhs) const =0 |
Value-based equality operator. More... | |
virtual bool | operator== (const Node &rhs) const =0 |
Pointer-based equality operator. More... | |
bool | operator!= (const Node &rhs) const |
Pointer-based inequality operator. More... | |
template<typename T > | |
T | visit (Visitor< T > &visitor) |
Visit this object. More... | |
void | dump (std::ostream &out=std::cout, int indent=0) |
Writes a debug dump of this node to the given stream. More... | |
void | dump_seq (std::ostream &out=std::cout, int indent=0) |
Alternate debug dump that represents links and node uniqueness via sequence number tags. More... | |
virtual BitRefs * | as_bit_refs () |
Interprets this node to a node of type BitRefs. More... | |
virtual const BitRefs * | as_bit_refs () const |
Interprets this node to a node of type BitRefs. More... | |
virtual ConstAxis * | as_const_axis () |
Interprets this node to a node of type ConstAxis. More... | |
virtual const ConstAxis * | as_const_axis () const |
Interprets this node to a node of type ConstAxis. More... | |
virtual ConstBool * | as_const_bool () |
Interprets this node to a node of type ConstBool. More... | |
virtual const ConstBool * | as_const_bool () const |
Interprets this node to a node of type ConstBool. More... | |
virtual ConstComplex * | as_const_complex () |
Interprets this node to a node of type ConstComplex. More... | |
virtual const ConstComplex * | as_const_complex () const |
Interprets this node to a node of type ConstComplex. More... | |
virtual ConstComplexMatrix * | as_const_complex_matrix () |
Interprets this node to a node of type ConstComplexMatrix. More... | |
virtual const ConstComplexMatrix * | as_const_complex_matrix () const |
Interprets this node to a node of type ConstComplexMatrix. More... | |
virtual ConstInt * | as_const_int () |
Interprets this node to a node of type ConstInt. More... | |
virtual const ConstInt * | as_const_int () const |
Interprets this node to a node of type ConstInt. More... | |
virtual ConstJson * | as_const_json () |
Interprets this node to a node of type ConstJson. More... | |
virtual const ConstJson * | as_const_json () const |
Interprets this node to a node of type ConstJson. More... | |
virtual ConstReal * | as_const_real () |
Interprets this node to a node of type ConstReal. More... | |
virtual const ConstReal * | as_const_real () const |
Interprets this node to a node of type ConstReal. More... | |
virtual ConstRealMatrix * | as_const_real_matrix () |
Interprets this node to a node of type ConstRealMatrix. More... | |
virtual const ConstRealMatrix * | as_const_real_matrix () const |
Interprets this node to a node of type ConstRealMatrix. More... | |
virtual ConstString * | as_const_string () |
Interprets this node to a node of type ConstString. More... | |
virtual const ConstString * | as_const_string () const |
Interprets this node to a node of type ConstString. More... | |
virtual Constant * | as_constant () |
Interprets this node to a node of type Constant. More... | |
virtual const Constant * | as_constant () const |
Interprets this node to a node of type Constant. More... | |
virtual Function * | as_function () |
Interprets this node to a node of type Function. More... | |
virtual const Function * | as_function () const |
Interprets this node to a node of type Function. More... | |
virtual QubitRefs * | as_qubit_refs () |
Interprets this node to a node of type QubitRefs. More... | |
virtual const QubitRefs * | as_qubit_refs () const |
Interprets this node to a node of type QubitRefs. More... | |
virtual VariableRef * | as_variable_ref () |
Interprets this node to a node of type VariableRef. More... | |
virtual const VariableRef * | as_variable_ref () const |
Interprets this node to a node of type VariableRef. More... | |
virtual void | serialize (::tree::cbor::MapWriter &map, const ::tree::base::PointerMap &ids) const =0 |
Serializes this node to the given map. More... | |
Static Public Member Functions | |
static std::shared_ptr< Reference > | deserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids) |
Deserializes the given node. More... | |
![]() | |
static std::shared_ptr< Node > | deserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids) |
Deserializes the given node. More... | |
Additional Inherited Members | |
![]() | |
virtual void | visit_internal (VisitorBase &visitor, void *retval=nullptr)=0 |
Internal helper method for visiter pattern. More... | |
Represents a reference to some storage location.
Definition at line 400 of file cqasm-v1-values-gen.hpp.
#include <cqasm-v1-values-gen.hpp>
|
overridevirtual |
Interprets this node to a node of type Reference.
Returns null if it has the wrong type.
Reimplemented from cqasm::v1::values::Node.
Definition at line 303 of file cqasm-v1-values-gen.cpp.
|
overridevirtual |
Interprets this node to a node of type Reference.
Returns null if it has the wrong type.
Reimplemented from cqasm::v1::values::Node.
Definition at line 311 of file cqasm-v1-values-gen.cpp.
|
static |
Deserializes the given node.
Writes a debug dump of this node to the given stream.
Definition at line 318 of file cqasm-v1-values-gen.cpp.