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

Any kind of 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::ast::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::ast::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 Addas_add ()
 Interprets this node to a node of type Add. More...
 
virtual const Addas_add () const
 Interprets this node to a node of type Add. 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 ArithOpas_arith_op ()
 Interprets this node to a node of type ArithOp. More...
 
virtual const ArithOpas_arith_op () const
 Interprets this node to a node of type ArithOp. More...
 
virtual Assignmentas_assignment ()
 Interprets this node to a node of type Assignment. More...
 
virtual const Assignmentas_assignment () const
 Interprets this node to a node of type Assignment. More...
 
virtual BinaryOpas_binary_op ()
 Interprets this node to a node of type BinaryOp. More...
 
virtual const BinaryOpas_binary_op () const
 Interprets this node to a node of type BinaryOp. More...
 
virtual BitwiseAndas_bitwise_and ()
 Interprets this node to a node of type BitwiseAnd. More...
 
virtual const BitwiseAndas_bitwise_and () const
 Interprets this node to a node of type BitwiseAnd. More...
 
virtual BitwiseNotas_bitwise_not ()
 Interprets this node to a node of type BitwiseNot. More...
 
virtual const BitwiseNotas_bitwise_not () const
 Interprets this node to a node of type BitwiseNot. More...
 
virtual BitwiseOpas_bitwise_op ()
 Interprets this node to a node of type BitwiseOp. More...
 
virtual const BitwiseOpas_bitwise_op () const
 Interprets this node to a node of type BitwiseOp. More...
 
virtual BitwiseOras_bitwise_or ()
 Interprets this node to a node of type BitwiseOr. More...
 
virtual const BitwiseOras_bitwise_or () const
 Interprets this node to a node of type BitwiseOr. More...
 
virtual BitwiseXoras_bitwise_xor ()
 Interprets this node to a node of type BitwiseXor. More...
 
virtual const BitwiseXoras_bitwise_xor () const
 Interprets this node to a node of type BitwiseXor. 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 CmpEqas_cmp_eq ()
 Interprets this node to a node of type CmpEq. More...
 
virtual const CmpEqas_cmp_eq () const
 Interprets this node to a node of type CmpEq. More...
 
virtual CmpGeas_cmp_ge ()
 Interprets this node to a node of type CmpGe. More...
 
virtual const CmpGeas_cmp_ge () const
 Interprets this node to a node of type CmpGe. More...
 
virtual CmpGtas_cmp_gt ()
 Interprets this node to a node of type CmpGt. More...
 
virtual const CmpGtas_cmp_gt () const
 Interprets this node to a node of type CmpGt. More...
 
virtual CmpLeas_cmp_le ()
 Interprets this node to a node of type CmpLe. More...
 
virtual const CmpLeas_cmp_le () const
 Interprets this node to a node of type CmpLe. More...
 
virtual CmpLtas_cmp_lt ()
 Interprets this node to a node of type CmpLt. More...
 
virtual const CmpLtas_cmp_lt () const
 Interprets this node to a node of type CmpLt. More...
 
virtual CmpNeas_cmp_ne ()
 Interprets this node to a node of type CmpNe. More...
 
virtual const CmpNeas_cmp_ne () const
 Interprets this node to a node of type CmpNe. More...
 
virtual CmpOpas_cmp_op ()
 Interprets this node to a node of type CmpOp. More...
 
virtual const CmpOpas_cmp_op () const
 Interprets this node to a node of type CmpOp. 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 Divideas_divide ()
 Interprets this node to a node of type Divide. More...
 
virtual const Divideas_divide () const
 Interprets this node to a node of type Divide. More...
 
virtual ErroneousExpressionas_erroneous_expression ()
 Interprets this node to a node of type ErroneousExpression. More...
 
virtual const ErroneousExpressionas_erroneous_expression () const
 Interprets this node to a node of type ErroneousExpression. More...
 
virtual ErroneousProgramas_erroneous_program ()
 Interprets this node to a node of type ErroneousProgram. More...
 
virtual const ErroneousProgramas_erroneous_program () const
 Interprets this node to a node of type ErroneousProgram. More...
 
virtual ErroneousStatementas_erroneous_statement ()
 Interprets this node to a node of type ErroneousStatement. More...
 
virtual const ErroneousStatementas_erroneous_statement () const
 Interprets this node to a node of type ErroneousStatement. More...
 
virtual Expressionas_expression ()
 Interprets this node to a node of type Expression. More...
 
virtual const Expressionas_expression () const
 Interprets this node to a node of type Expression. More...
 
virtual ExpressionListas_expression_list ()
 Interprets this node to a node of type ExpressionList. More...
 
virtual const ExpressionListas_expression_list () const
 Interprets this node to a node of type ExpressionList. More...
 
virtual FloatLiteralas_float_literal ()
 Interprets this node to a node of type FloatLiteral. More...
 
virtual const FloatLiteralas_float_literal () const
 Interprets this node to a node of type FloatLiteral. 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 FunctionCallas_function_call ()
 Interprets this node to a node of type FunctionCall. More...
 
virtual const FunctionCallas_function_call () const
 Interprets this node to a node of type FunctionCall. More...
 
virtual Identifieras_identifier ()
 Interprets this node to a node of type Identifier. More...
 
virtual const Identifieras_identifier () const
 Interprets this node to a node of type Identifier. 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 Indexas_index ()
 Interprets this node to a node of type Index. More...
 
virtual const Indexas_index () const
 Interprets this node to a node of type Index. More...
 
virtual IndexEntryas_index_entry ()
 Interprets this node to a node of type IndexEntry. More...
 
virtual const IndexEntryas_index_entry () const
 Interprets this node to a node of type IndexEntry. More...
 
virtual IndexItemas_index_item ()
 Interprets this node to a node of type IndexItem. More...
 
virtual const IndexItemas_index_item () const
 Interprets this node to a node of type IndexItem. More...
 
virtual IndexListas_index_list ()
 Interprets this node to a node of type IndexList. More...
 
virtual const IndexListas_index_list () const
 Interprets this node to a node of type IndexList. More...
 
virtual IndexRangeas_index_range ()
 Interprets this node to a node of type IndexRange. More...
 
virtual const IndexRangeas_index_range () const
 Interprets this node to a node of type IndexRange. 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 IntDivideas_int_divide ()
 Interprets this node to a node of type IntDivide. More...
 
virtual const IntDivideas_int_divide () const
 Interprets this node to a node of type IntDivide. More...
 
virtual IntegerLiteralas_integer_literal ()
 Interprets this node to a node of type IntegerLiteral. More...
 
virtual const IntegerLiteralas_integer_literal () const
 Interprets this node to a node of type IntegerLiteral. More...
 
virtual JsonLiteralas_json_literal ()
 Interprets this node to a node of type JsonLiteral. More...
 
virtual const JsonLiteralas_json_literal () const
 Interprets this node to a node of type JsonLiteral. More...
 
virtual LogicalAndas_logical_and ()
 Interprets this node to a node of type LogicalAnd. More...
 
virtual const LogicalAndas_logical_and () const
 Interprets this node to a node of type LogicalAnd. More...
 
virtual LogicalNotas_logical_not ()
 Interprets this node to a node of type LogicalNot. More...
 
virtual const LogicalNotas_logical_not () const
 Interprets this node to a node of type LogicalNot. More...
 
virtual LogicalOpas_logical_op ()
 Interprets this node to a node of type LogicalOp. More...
 
virtual const LogicalOpas_logical_op () const
 Interprets this node to a node of type LogicalOp. More...
 
virtual LogicalOras_logical_or ()
 Interprets this node to a node of type LogicalOr. More...
 
virtual const LogicalOras_logical_or () const
 Interprets this node to a node of type LogicalOr. More...
 
virtual LogicalXoras_logical_xor ()
 Interprets this node to a node of type LogicalXor. More...
 
virtual const LogicalXoras_logical_xor () const
 Interprets this node to a node of type LogicalXor. 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 MatrixLiteralas_matrix_literal ()
 Interprets this node to a node of type MatrixLiteral. More...
 
virtual const MatrixLiteralas_matrix_literal () const
 Interprets this node to a node of type MatrixLiteral. More...
 
virtual Moduloas_modulo ()
 Interprets this node to a node of type Modulo. More...
 
virtual const Moduloas_modulo () const
 Interprets this node to a node of type Modulo. More...
 
virtual Multiplyas_multiply ()
 Interprets this node to a node of type Multiply. More...
 
virtual const Multiplyas_multiply () const
 Interprets this node to a node of type Multiply. More...
 
virtual Negateas_negate ()
 Interprets this node to a node of type Negate. More...
 
virtual const Negateas_negate () const
 Interprets this node to a node of type Negate. More...
 
virtual Poweras_power ()
 Interprets this node to a node of type Power. More...
 
virtual const Poweras_power () const
 Interprets this node to a node of type Power. 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 Rootas_root ()
 Interprets this node to a node of type Root. More...
 
virtual const Rootas_root () const
 Interprets this node to a node of type Root. More...
 
virtual ShiftLeftas_shift_left ()
 Interprets this node to a node of type ShiftLeft. More...
 
virtual const ShiftLeftas_shift_left () const
 Interprets this node to a node of type ShiftLeft. More...
 
virtual ShiftOpas_shift_op ()
 Interprets this node to a node of type ShiftOp. More...
 
virtual const ShiftOpas_shift_op () const
 Interprets this node to a node of type ShiftOp. More...
 
virtual ShiftRightArithas_shift_right_arith ()
 Interprets this node to a node of type ShiftRightArith. More...
 
virtual const ShiftRightArithas_shift_right_arith () const
 Interprets this node to a node of type ShiftRightArith. More...
 
virtual ShiftRightLogicas_shift_right_logic ()
 Interprets this node to a node of type ShiftRightLogic. More...
 
virtual const ShiftRightLogicas_shift_right_logic () const
 Interprets this node to a node of type ShiftRightLogic. More...
 
virtual StatementListas_statement_list ()
 Interprets this node to a node of type StatementList. More...
 
virtual const StatementListas_statement_list () const
 Interprets this node to a node of type StatementList. More...
 
virtual StringLiteralas_string_literal ()
 Interprets this node to a node of type StringLiteral. More...
 
virtual const StringLiteralas_string_literal () const
 Interprets this node to a node of type StringLiteral. 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 Subtractas_subtract ()
 Interprets this node to a node of type Subtract. More...
 
virtual const Subtractas_subtract () const
 Interprets this node to a node of type Subtract. More...
 
virtual TernaryCondas_ternary_cond ()
 Interprets this node to a node of type TernaryCond. More...
 
virtual const TernaryCondas_ternary_cond () const
 Interprets this node to a node of type TernaryCond. More...
 
virtual UnaryOpas_unary_op ()
 Interprets this node to a node of type UnaryOp. More...
 
virtual const UnaryOpas_unary_op () const
 Interprets this node to a node of type UnaryOp. More...
 
virtual Variablesas_variables ()
 Interprets this node to a node of type Variables. More...
 
virtual const Variablesas_variables () const
 Interprets this node to a node of type Variables. 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...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. More...
 
template<>
void visit (Visitor< void > &visitor)
 Visit this object. 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::ast::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::ast::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::ast::Annotated
Any< AnnotationDataannotations
 Zero or more annotations attached to this object. More...
 
- Protected Member Functions inherited from cqasm::v1::ast::Node
virtual void visit_internal (VisitorBase &visitor, void *retval=nullptr)=0
 Internal helper method for visiter pattern. More...
 

Detailed Description

Any kind of statement.

Definition at line 2123 of file cqasm-v1-ast-gen.hpp.

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

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

Constructor & Destructor Documentation

◆ Statement()

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

Constructor.

Definition at line 2423 of file cqasm-v1-ast-gen.cpp.

Member Function Documentation

◆ as_statement() [1/2]

Statement * cqasm::v1::ast::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::ast::Node.

Definition at line 2431 of file cqasm-v1-ast-gen.cpp.

◆ as_statement() [2/2]

const Statement * cqasm::v1::ast::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::ast::Node.

Definition at line 2439 of file cqasm-v1-ast-gen.cpp.

◆ deserialize()

std::shared_ptr< Statement > cqasm::v1::ast::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 2446 of file cqasm-v1-ast-gen.cpp.


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