RepeatBody
INCLUDE FILE
#include "Body/RepeatBody.h"
class RepeatBody
Abstract base class for a body that repeats a block of code a specified number of times.
DEFINITION
class RepeatBody;
class RepeatRange
DEFINITION
class RepeatRange;
constructor RepeatRange
DEFINITION
| RepeatRange | ( | Expression start, | |
| Expression end | ); |
| PARAMETER | DESCRIPTION |
|---|---|
start |
|
end |
method cloneconst
DEFINITION
| RepeatRange clone | ( | const CloneContext & context | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
context |
| RETURNS | DESCRIPTION |
|---|---|
RepeatRange |
method countconst
DEFINITION
| std::optional< uint64_t > count | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint64_t > |
method count_rangeconst
DEFINITION
| SizeRange count_range | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
member end
DEFINITION
Expression end;
member location
DEFINITION
Location location;
member start
DEFINITION
Expression start;
constructor RepeatBody
DEFINITION
| RepeatBody | ( | RepeatRange range, | |
| Body body | ); |
| PARAMETER | DESCRIPTION |
|---|---|
range |
|
body |
method traversevirtual protected
Traverse the BodyElement.
This function is used by the default implementations of resolve() and expand_calls(). Unless a subclass overrides both of these methods, it should override traverse().
DEFINITION
| virtual void traverse | ( | std::function< void(Body &)> body_callable, | |
| std::function< void(Expression &)> expression_callable | ); |
| PARAMETER | DESCRIPTION |
|---|---|
body_callable |
A callable to apply to each sub-body-element. |
expression_callable |
A callable to apply to each sub-expression. |
member bodyprotected
DEFINITION
Body body;
member rangeprotected
DEFINITION
RepeatRange range;
class RepeatRange
DEFINITION
class RepeatRange;
constructor RepeatRange
DEFINITION
| RepeatRange | ( | Expression start, | |
| Expression end | ); |
| PARAMETER | DESCRIPTION |
|---|---|
start |
|
end |
method cloneconst
DEFINITION
| RepeatRange clone | ( | const CloneContext & context | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
context |
| RETURNS | DESCRIPTION |
|---|---|
RepeatRange |
method countconst
DEFINITION
| std::optional< uint64_t > count | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint64_t > |
method count_rangeconst
DEFINITION
| SizeRange count_range | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
member end
DEFINITION
Expression end;
member location
DEFINITION
Location location;
member start
DEFINITION
Expression start;