libqasm
library for handling cQASM files
Public Member Functions | Static Public Member Functions | List of all members
cqasm::v1::semantic::Statement Class Reference

A statement. More...

Public Member Functions

 Statement (const Any< AnnotationData > &annotations=Any< AnnotationData >())
 Constructor. More...
 
Statementas_statement () override
 Interprets this node to a node of type Statement. More...
 
const Statementas_statement () const override
 Interprets this node to a node of type Statement. More...
 
- Public Member Functions inherited from cqasm::v1::semantic::Annotated
 Annotated (const Any< AnnotationData > &annotations=Any< AnnotationData >())
 Constructor. More...
 
Annotatedas_annotated () override
 Interprets this node to a node of type Annotated. More...
 
const Annotatedas_annotated () const override
 Interprets this node to a node of type Annotated. More...
 
- Public Member Functions inherited from cqasm::v1::semantic::Node
virtual NodeType type () const =0
 Returns the NodeType of this node. More...
 
virtual One< Nodecopy () const =0
 Returns a shallow copy of this node. More...
 
virtual One< Nodeclone () 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 >
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 AnnotationDataas_annotation_data ()
 Interprets this node to a node of type AnnotationData. More...
 
virtual const AnnotationDataas_annotation_data () const
 Interprets this node to a node of type AnnotationData. More...
 
virtual Blockas_block ()
 Interprets this node to a node of type Block. More...
 
virtual const Blockas_block () const
 Interprets this node to a node of type Block. More...
 
virtual BreakStatementas_break_statement ()
 Interprets this node to a node of type BreakStatement. More...
 
virtual const BreakStatementas_break_statement () const
 Interprets this node to a node of type BreakStatement. More...
 
virtual Bundleas_bundle ()
 Interprets this node to a node of type Bundle. More...
 
virtual const Bundleas_bundle () const
 Interprets this node to a node of type Bundle. More...
 
virtual BundleExtas_bundle_ext ()
 Interprets this node to a node of type BundleExt. More...
 
virtual const BundleExtas_bundle_ext () const
 Interprets this node to a node of type BundleExt. More...
 
virtual ContinueStatementas_continue_statement ()
 Interprets this node to a node of type ContinueStatement. More...
 
virtual const ContinueStatementas_continue_statement () const
 Interprets this node to a node of type ContinueStatement. More...
 
virtual ErrorModelas_error_model ()
 Interprets this node to a node of type ErrorModel. More...
 
virtual const ErrorModelas_error_model () const
 Interprets this node to a node of type ErrorModel. More...
 
virtual ForLoopas_for_loop ()
 Interprets this node to a node of type ForLoop. More...
 
virtual const ForLoopas_for_loop () const
 Interprets this node to a node of type ForLoop. More...
 
virtual ForeachLoopas_foreach_loop ()
 Interprets this node to a node of type ForeachLoop. More...
 
virtual const ForeachLoopas_foreach_loop () const
 Interprets this node to a node of type ForeachLoop. More...
 
virtual GotoInstructionas_goto_instruction ()
 Interprets this node to a node of type GotoInstruction. More...
 
virtual const GotoInstructionas_goto_instruction () const
 Interprets this node to a node of type GotoInstruction. More...
 
virtual IfElseas_if_else ()
 Interprets this node to a node of type IfElse. More...
 
virtual const IfElseas_if_else () const
 Interprets this node to a node of type IfElse. More...
 
virtual IfElseBranchas_if_else_branch ()
 Interprets this node to a node of type IfElseBranch. More...
 
virtual const IfElseBranchas_if_else_branch () const
 Interprets this node to a node of type IfElseBranch. More...
 
virtual Instructionas_instruction ()
 Interprets this node to a node of type Instruction. More...
 
virtual const Instructionas_instruction () const
 Interprets this node to a node of type Instruction. More...
 
virtual InstructionBaseas_instruction_base ()
 Interprets this node to a node of type InstructionBase. More...
 
virtual const InstructionBaseas_instruction_base () const
 Interprets this node to a node of type InstructionBase. More...
 
virtual Mappingas_mapping ()
 Interprets this node to a node of type Mapping. More...
 
virtual const Mappingas_mapping () const
 Interprets this node to a node of type Mapping. More...
 
virtual Programas_program ()
 Interprets this node to a node of type Program. More...
 
virtual const Programas_program () const
 Interprets this node to a node of type Program. More...
 
virtual RepeatUntilLoopas_repeat_until_loop ()
 Interprets this node to a node of type RepeatUntilLoop. More...
 
virtual const RepeatUntilLoopas_repeat_until_loop () const
 Interprets this node to a node of type RepeatUntilLoop. More...
 
virtual SetInstructionas_set_instruction ()
 Interprets this node to a node of type SetInstruction. More...
 
virtual const SetInstructionas_set_instruction () const
 Interprets this node to a node of type SetInstruction. More...
 
virtual Structuredas_structured ()
 Interprets this node to a node of type Structured. More...
 
virtual const Structuredas_structured () const
 Interprets this node to a node of type Structured. More...
 
virtual Subcircuitas_subcircuit ()
 Interprets this node to a node of type Subcircuit. More...
 
virtual const Subcircuitas_subcircuit () const
 Interprets this node to a node of type Subcircuit. More...
 
virtual Variableas_variable ()
 Interprets this node to a node of type Variable. More...
 
virtual const Variableas_variable () const
 Interprets this node to a node of type Variable. More...
 
virtual Versionas_version ()
 Interprets this node to a node of type Version. More...
 
virtual const Versionas_version () const
 Interprets this node to a node of type Version. More...
 
virtual WhileLoopas_while_loop ()
 Interprets this node to a node of type WhileLoop. More...
 
virtual const WhileLoopas_while_loop () const
 Interprets this node to a node of type WhileLoop. 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< Statementdeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 
- Static Public Member Functions inherited from cqasm::v1::semantic::Annotated
static std::shared_ptr< Annotateddeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 
- Static Public Member Functions inherited from cqasm::v1::semantic::Node
static std::shared_ptr< Nodedeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 

Additional Inherited Members

- Public Attributes inherited from cqasm::v1::semantic::Annotated
Any< AnnotationDataannotations
 Zero or more annotations attached to this object. More...
 
- Protected Member Functions inherited from cqasm::v1::semantic::Node
virtual void visit_internal (VisitorBase &visitor, void *retval=nullptr)=0
 Internal helper method for visiter pattern. More...
 

Detailed Description

A statement.

Unused before 1.2, as only bundles existed before then.

Definition at line 826 of file cqasm-v1-semantic-gen.hpp.

#include <cqasm-v1-semantic-gen.hpp>

Inheritance diagram for cqasm::v1::semantic::Statement:
Inheritance graph
[legend]
Collaboration diagram for cqasm::v1::semantic::Statement:
Collaboration graph
[legend]

Constructor & Destructor Documentation

◆ Statement()

cqasm::v1::semantic::Statement::Statement ( const Any< AnnotationData > &  annotations = Any<AnnotationData>())

Constructor.

Definition at line 767 of file cqasm-v1-semantic-gen.cpp.

Member Function Documentation

◆ as_statement() [1/2]

Statement * cqasm::v1::semantic::Statement::as_statement ( )
overridevirtual

Interprets this node to a node of type Statement.

Returns null if it has the wrong type.

Reimplemented from cqasm::v1::semantic::Node.

Definition at line 775 of file cqasm-v1-semantic-gen.cpp.

◆ as_statement() [2/2]

const Statement * cqasm::v1::semantic::Statement::as_statement ( ) const
overridevirtual

Interprets this node to a node of type Statement.

Returns null if it has the wrong type.

Reimplemented from cqasm::v1::semantic::Node.

Definition at line 783 of file cqasm-v1-semantic-gen.cpp.

◆ deserialize()

std::shared_ptr< Statement > cqasm::v1::semantic::Statement::deserialize ( const ::tree::cbor::MapReader &  map,
::tree::base::IdentifierMap &  ids 
)
static

Deserializes the given node.

Writes a debug dump of this node to the given stream.

Definition at line 790 of file cqasm-v1-semantic-gen.cpp.


The documentation for this class was generated from the following files: