|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Represents a while-loop with condition-controlled iteration. More...
#include <sdfg/structured_control_flow/while.h>
Public Member Functions | |
| While (const While &node)=delete | |
| While & | operator= (const While &)=delete |
| ElementType | type_id () const override |
| Returns the type of the element. | |
| bool | accept (visitor::ActualStructuredSDFGVisitor &visitor) override |
| void | validate (const Function &function) const override |
| Validates the element. | |
| const Sequence & | root () const |
| Access the loop body sequence (const version). | |
| Sequence & | root () |
| Access the loop body sequence (non-const version). | |
| void | replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override |
| Replace occurrences of an expression in the loop body. | |
| void | replace (const symbolic::ExpressionMapping &replacements) override |
| Public Member Functions inherited from sdfg::structured_control_flow::ControlFlowNode | |
| virtual | ~ControlFlowNode ()=default |
| ControlFlowNode * | get_parent () |
| const ControlFlowNode * | get_parent () const |
| ControlFlowNode (const ControlFlowNode &node)=delete | |
| ControlFlowNode & | operator= (const ControlFlowNode &)=delete |
| Public Member Functions inherited from sdfg::Element | |
| Element (size_t element_id, const DebugInfo &debug_info) | |
| virtual | ~Element ()=default |
| size_t | element_id () const |
| const DebugInfo & | debug_info () const |
| void | set_debug_info (const DebugInfo &debug_info) |
| void | add_metadata (const std::string &key, const std::string &value) |
| void | remove_metadata (const std::string &key) |
| const std::string & | metadata (const std::string &key) const |
| const std::string * | metadata_if_exists (const std::string &key) const |
| const std::unordered_map< std::string, std::string > & | metadata () const |
| std::string_view | element_type () const |
| Returns the type of the element as a human-readable string. | |
Static Public Member Functions | |
| static bool | classof (const Element &element) |
| Static Public Member Functions inherited from sdfg::structured_control_flow::ControlFlowNode | |
| static bool | classof (const Element &element) |
LLVM-style RTTI predicate: true if element is a ControlFlowNode. | |
| static std::vector< ControlFlowNode * > | parent_chain (ControlFlowNode &child) |
Friends | |
| class | sdfg::builder::StructuredSDFGBuilder |
Additional Inherited Members | |
| Static Public Attributes inherited from sdfg::structured_control_flow::ControlFlowNode | |
| static constexpr ElementType | TypeGroup |
| Bitmask of all concrete ElementTypes that are ControlFlowNodes. | |
| Protected Member Functions inherited from sdfg::structured_control_flow::ControlFlowNode | |
| ControlFlowNode (size_t element_id, const DebugInfo &debug_info, ControlFlowNode *parent) | |
| Protected constructor for control flow nodes with parent. | |
| Protected Attributes inherited from sdfg::structured_control_flow::ControlFlowNode | |
| ControlFlowNode * | parent_ |
| Protected Attributes inherited from sdfg::Element | |
| size_t | element_id_ |
| DebugInfo | debug_info_ |
| std::unordered_map< std::string, std::string > | metadata_ |
Represents a while-loop with condition-controlled iteration.
A While loop repeatedly executes its body sequence while a condition remains true. Unlike For loops, While loops don't have explicit initialization or update expressions.
The loop body can contain any control flow nodes, including Break and Continue statements to control loop execution.
Example:
|
delete |
|
overridevirtual |
Implements sdfg::structured_control_flow::ControlFlowNode.
|
inlinestatic |
|
delete |
|
overridevirtual |
Replace occurrences of an expression in the loop body.
| old_expression | Expression to replace |
| new_expression | Expression to replace with |
Implements sdfg::Element.
|
overridevirtual |
Reimplemented from sdfg::Element.
| Sequence & sdfg::structured_control_flow::While::root | ( | ) |
Access the loop body sequence (non-const version).
| const Sequence & sdfg::structured_control_flow::While::root | ( | ) | const |
Access the loop body sequence (const version).
|
inlineoverridevirtual |
Returns the type of the element.
Implements sdfg::Element.
|
overridevirtual |
Validates the element.
| InvalidSDFGException | if the element is invalid |
Implements sdfg::Element.
|
friend |