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

Logical AND operator. More...

Public Member Functions

 LogicalAnd (const One< Expression > &lhs=One< Expression >(), const One< Expression > &rhs=One< Expression >())
 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 LogicalAnd is complete/fully defined. More...
 
NodeType type () const override
 Returns the NodeType of this node. More...
 
LogicalAndas_logical_and () override
 Interprets this node to a node of type LogicalAnd. More...
 
const LogicalAndas_logical_and () const override
 Interprets this node to a node of type LogicalAnd. More...
 
One< Nodecopy () const override
 Returns a shallow copy of this node. More...
 
One< Nodeclone () 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...
 
- Public Member Functions inherited from cqasm::v1::ast::LogicalOp
 LogicalOp (const One< Expression > &lhs=One< Expression >(), const One< Expression > &rhs=One< Expression >())
 Constructor. More...
 
LogicalOpas_logical_op () override
 Interprets this node to a node of type LogicalOp. More...
 
const LogicalOpas_logical_op () const override
 Interprets this node to a node of type LogicalOp. More...
 
- Public Member Functions inherited from cqasm::v1::ast::BinaryOp
 BinaryOp (const One< Expression > &lhs=One< Expression >(), const One< Expression > &rhs=One< Expression >())
 Constructor. More...
 
BinaryOpas_binary_op () override
 Interprets this node to a node of type BinaryOp. More...
 
const BinaryOpas_binary_op () const override
 Interprets this node to a node of type BinaryOp. More...
 
- Public Member Functions inherited from cqasm::v1::ast::Expression
Expressionas_expression () override
 Interprets this node to a node of type Expression. More...
 
const Expressionas_expression () const override
 Interprets this node to a node of type Expression. More...
 
- Public Member Functions inherited from cqasm::v1::ast::Node
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 Annotatedas_annotated ()
 Interprets this node to a node of type Annotated. More...
 
virtual const Annotatedas_annotated () const
 Interprets this node to a node of type Annotated. 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 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 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 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 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 Statementas_statement ()
 Interprets this node to a node of type Statement. More...
 
virtual const Statementas_statement () const
 Interprets this node to a node of type Statement. 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...
 
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< LogicalAnddeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 
- Static Public Member Functions inherited from cqasm::v1::ast::LogicalOp
static std::shared_ptr< LogicalOpdeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 
- Static Public Member Functions inherited from cqasm::v1::ast::BinaryOp
static std::shared_ptr< BinaryOpdeserialize (const ::tree::cbor::MapReader &map, ::tree::base::IdentifierMap &ids)
 Deserializes the given node. More...
 
- Static Public Member Functions inherited from cqasm::v1::ast::Expression
static std::shared_ptr< Expressiondeserialize (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...
 

Protected Member Functions

void visit_internal (VisitorBase &visitor, void *retval) override
 Helper method for visiting nodes. More...
 

Additional Inherited Members

- Public Attributes inherited from cqasm::v1::ast::BinaryOp
One< Expressionlhs
 The left-hand side of the expression. More...
 
One< Expressionrhs
 The right-hand side of the expression. More...
 

Detailed Description

Logical AND operator.

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

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

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

Constructor & Destructor Documentation

◆ LogicalAnd()

cqasm::v1::ast::LogicalAnd::LogicalAnd ( const One< Expression > &  lhs = One<Expression>(),
const One< Expression > &  rhs = One<Expression>() 
)

Constructor.

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

Member Function Documentation

◆ find_reachable()

void cqasm::v1::ast::LogicalAnd::find_reachable ( ::tree::base::PointerMap &  map) const
override

Registers all reachable nodes with the given PointerMap.

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

◆ check_complete()

void cqasm::v1::ast::LogicalAnd::check_complete ( const ::tree::base::PointerMap &  map) const
override

Returns whether this LogicalAnd is complete/fully defined.

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

◆ type()

NodeType cqasm::v1::ast::LogicalAnd::type ( ) const
overridevirtual

Returns the NodeType of this node.

Implements cqasm::v1::ast::Node.

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

◆ visit_internal()

void cqasm::v1::ast::LogicalAnd::visit_internal ( VisitorBase visitor,
void *  retval 
)
overrideprotectedvirtual

Helper method for visiting nodes.

Implements cqasm::v1::ast::Node.

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

◆ as_logical_and() [1/2]

LogicalAnd * cqasm::v1::ast::LogicalAnd::as_logical_and ( )
overridevirtual

Interprets this node to a node of type LogicalAnd.

Returns null if it has the wrong type.

Reimplemented from cqasm::v1::ast::Node.

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

◆ as_logical_and() [2/2]

const LogicalAnd * cqasm::v1::ast::LogicalAnd::as_logical_and ( ) const
overridevirtual

Interprets this node to a node of type LogicalAnd.

Returns null if it has the wrong type.

Reimplemented from cqasm::v1::ast::Node.

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

◆ copy()

One< Node > cqasm::v1::ast::LogicalAnd::copy ( ) const
overridevirtual

Returns a shallow copy of this node.

Implements cqasm::v1::ast::Node.

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

◆ clone()

One< Node > cqasm::v1::ast::LogicalAnd::clone ( ) const
overridevirtual

Returns a deep copy of this node.

Implements cqasm::v1::ast::Node.

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

◆ equals()

bool cqasm::v1::ast::LogicalAnd::equals ( const Node rhs) const
overridevirtual

Value-based equality operator.

Ignores annotations!

Implements cqasm::v1::ast::Node.

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

◆ operator==()

bool cqasm::v1::ast::LogicalAnd::operator== ( const Node rhs) const
overridevirtual

Pointer-based equality operator.

Implements cqasm::v1::ast::Node.

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

◆ serialize()

void cqasm::v1::ast::LogicalAnd::serialize ( ::tree::cbor::MapWriter &  map,
const ::tree::base::PointerMap &  ids 
) const
overridevirtual

Serializes this node to the given map.

Implements cqasm::v1::ast::Node.

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

◆ deserialize()

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


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