libqasm
library for handling cQASM files
|
Type of an arbitrary string. More...
Public Member Functions | |
String (const cqasm::v1::primitives::Bool &assignable=cqasm::v1::primitives::initialize< cqasm::v1::primitives::Bool >()) | |
Constructor. More... | |
void | find_reachable (::tree::base::PointerMap &map) const override |
Registers all reachable nodes with the given PointerMap. More... | |
void | check_complete (const ::tree::base::PointerMap &map) const override |
Returns whether this String is complete/fully defined. More... | |
NodeType | type () const override |
Returns the NodeType of this node. More... | |
String * | as_string () override |
Interprets this node to a node of type String. More... | |
const String * | as_string () const override |
Interprets this node to a node of type String. More... | |
One< Node > | copy () const override |
Returns a shallow copy of this node. More... | |
One< Node > | clone () const override |
Returns a deep copy of this node. More... | |
bool | equals (const Node &rhs) const override |
Value-based equality operator. More... | |
bool | operator== (const Node &rhs) const override |
Pointer-based equality operator. More... | |
void | serialize (::tree::cbor::MapWriter &map, const ::tree::base::PointerMap &ids) const override |
Serializes this node to the given map. More... | |
![]() | |
TypeBase (const cqasm::v1::primitives::Bool &assignable=cqasm::v1::primitives::initialize< cqasm::v1::primitives::Bool >()) | |
Constructor. More... | |
TypeBase * | as_type_base () override |
Interprets this node to a node of type TypeBase. More... | |
const TypeBase * | as_type_base () const override |
Interprets this node to a node of type TypeBase. 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 Axis * | as_axis () |
Interprets this node to a node of type Axis. More... | |
virtual const Axis * | as_axis () const |
Interprets this node to a node of type Axis. More... | |
virtual Bool * | as_bool () |
Interprets this node to a node of type Bool. More... | |
virtual const Bool * | as_bool () const |
Interprets this node to a node of type Bool. More... | |
virtual Complex * | as_complex () |
Interprets this node to a node of type Complex. More... | |
virtual const Complex * | as_complex () const |
Interprets this node to a node of type Complex. More... | |
virtual ComplexMatrix * | as_complex_matrix () |
Interprets this node to a node of type ComplexMatrix. More... | |
virtual const ComplexMatrix * | as_complex_matrix () const |
Interprets this node to a node of type ComplexMatrix. More... | |
virtual Int * | as_int () |
Interprets this node to a node of type Int. More... | |
virtual const Int * | as_int () const |
Interprets this node to a node of type Int. More... | |
virtual Json * | as_json () |
Interprets this node to a node of type Json. More... | |
virtual const Json * | as_json () const |
Interprets this node to a node of type Json. More... | |
virtual Qubit * | as_qubit () |
Interprets this node to a node of type Qubit. More... | |
virtual const Qubit * | as_qubit () const |
Interprets this node to a node of type Qubit. More... | |
virtual Real * | as_real () |
Interprets this node to a node of type Real. More... | |
virtual const Real * | as_real () const |
Interprets this node to a node of type Real. More... | |
virtual RealMatrix * | as_real_matrix () |
Interprets this node to a node of type RealMatrix. More... | |
virtual const RealMatrix * | as_real_matrix () const |
Interprets this node to a node of type RealMatrix. More... | |
Static Public Member Functions | |
static std::shared_ptr< String > | deserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids) |
Deserializes the given node. More... | |
![]() | |
static std::shared_ptr< TypeBase > | 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... | |
Protected Member Functions | |
void | visit_internal (VisitorBase &visitor, void *retval) override |
Helper method for visiting nodes. More... | |
Additional Inherited Members | |
![]() | |
cqasm::v1::primitives::Bool | assignable |
Whether a value of this type can be assigned (true), or can only be read (false). More... | |
Type of an arbitrary string.
Definition at line 1122 of file cqasm-v1-types-gen.hpp.
#include <cqasm-v1-types-gen.hpp>
cqasm::v1::types::String::String | ( | const cqasm::v1::primitives::Bool & | assignable = cqasm::v1::primitives::initialize<cqasm::v1::primitives::Bool>() | ) |
Constructor.
Definition at line 1352 of file cqasm-v1-types-gen.cpp.
|
override |
Registers all reachable nodes with the given PointerMap.
Definition at line 1359 of file cqasm-v1-types-gen.cpp.
|
override |
Returns whether this String
is complete/fully defined.
Definition at line 1366 of file cqasm-v1-types-gen.cpp.
|
overridevirtual |
Returns the NodeType
of this node.
Implements cqasm::v1::types::Node.
Definition at line 1373 of file cqasm-v1-types-gen.cpp.
|
overrideprotectedvirtual |
Helper method for visiting nodes.
Implements cqasm::v1::types::Node.
Definition at line 1380 of file cqasm-v1-types-gen.cpp.
|
overridevirtual |
Interprets this node to a node of type String.
Returns null if it has the wrong type.
Reimplemented from cqasm::v1::types::Node.
Definition at line 1388 of file cqasm-v1-types-gen.cpp.
|
overridevirtual |
Interprets this node to a node of type String.
Returns null if it has the wrong type.
Reimplemented from cqasm::v1::types::Node.
Definition at line 1396 of file cqasm-v1-types-gen.cpp.
Returns a shallow copy of this node.
Implements cqasm::v1::types::Node.
Definition at line 1403 of file cqasm-v1-types-gen.cpp.
Returns a deep copy of this node.
Implements cqasm::v1::types::Node.
Definition at line 1410 of file cqasm-v1-types-gen.cpp.
|
overridevirtual |
Value-based equality operator.
Ignores annotations!
Implements cqasm::v1::types::Node.
Definition at line 1418 of file cqasm-v1-types-gen.cpp.
|
overridevirtual |
Pointer-based equality operator.
Implements cqasm::v1::types::Node.
Definition at line 1428 of file cqasm-v1-types-gen.cpp.
|
overridevirtual |
Serializes this node to the given map.
Implements cqasm::v1::types::Node.
Definition at line 1438 of file cqasm-v1-types-gen.cpp.
|
static |
Deserializes the given node.
Writes a debug dump of this node to the given stream.
Definition at line 1453 of file cqasm-v1-types-gen.cpp.