AuboCaps  0.6.0
arcs::aubo_scope::LoopNode Class Reference

#include <loop_node.h>

Inheritance diagram for arcs::aubo_scope::LoopNode:
Collaboration diagram for arcs::aubo_scope::LoopNode:

Public Types

enum  ConfigType { ALWAYS, COUNTER, EXPRESSION }
 The configuration type used to determine which type of configuration this instance is. More...
 

Public Member Functions

 LoopNode (LoopNode &f)
 
 LoopNode (LoopNode &&f)
 
virtual ~LoopNode ()
 
ConfigType getConfigType ()
 This method returns the type of configuration. More...
 
void setConfigType (ConfigType type)
 
void setLoopCount (int loop_count)
 Creates a loop counter configuration. More...
 
int getLoopCount ()
 
void setExpression (ExpressionPtr expression)
 Create a loop expression configuration. More...
 
ExpressionPtr getExpression ()
 
bool isEvaluateContinously ()
 
void setEvaluateContinously (bool cont)
 
void setLoopCountVariable (VariablePtr var)
 
VariablePtr getLoopCountVariable ()
 
- Public Member Functions inherited from arcs::aubo_scope::ProgramNode
 ProgramNode (ProgramNode &f)
 
 ProgramNode (ProgramNode &&f)
 
virtual ~ProgramNode ()
 
ProgramNodeContributionPtr getProgramNodeContribution ()
 不推荐用户调用 ProgramNodeContribution::generateScript 使用 ScriptWritter::writeChildren More...
 

Private Member Functions

 LoopNode ()
 

Private Attributes

void * d_ { nullptr }
 

Friends

class DataSwitch
 

Additional Inherited Members

- Protected Member Functions inherited from arcs::aubo_scope::ProgramNode
 ProgramNode ()
 

Detailed Description

Definition at line 12 of file loop_node.h.

Member Enumeration Documentation

The configuration type used to determine which type of configuration this instance is.

Enumerator
ALWAYS 

Looping infinitely has been selected.

The config instance can be cast to AlwaysLoopNodeConfig

COUNTER 

Looping a certain number of times has been selected.

The config instance can be cast to CounterLoopNodeConfig

EXPRESSION 

Looping as long as the evaluation of an expression is true has been selected.

The config instance can be cast to ExpressionLoopNodeConfig

Definition at line 19 of file loop_node.h.

Constructor & Destructor Documentation

arcs::aubo_scope::LoopNode::LoopNode ( LoopNode f)
arcs::aubo_scope::LoopNode::LoopNode ( LoopNode &&  f)
virtual arcs::aubo_scope::LoopNode::~LoopNode ( )
virtual
arcs::aubo_scope::LoopNode::LoopNode ( )
private

Member Function Documentation

ConfigType arcs::aubo_scope::LoopNode::getConfigType ( )

This method returns the type of configuration.

Cast this instance appropriately to have access to specific getters.

Returns
the type of this config.
ExpressionPtr arcs::aubo_scope::LoopNode::getExpression ( )
int arcs::aubo_scope::LoopNode::getLoopCount ( )
VariablePtr arcs::aubo_scope::LoopNode::getLoopCountVariable ( )
bool arcs::aubo_scope::LoopNode::isEvaluateContinously ( )
Returns
true if the expression will be evaluated continuously during the looping (i.e. the loop can be interrupted anytime during its execution), otherwise false and the expression will be evaluated once per loop iteration.
void arcs::aubo_scope::LoopNode::setConfigType ( ConfigType  type)
void arcs::aubo_scope::LoopNode::setEvaluateContinously ( bool  cont)
void arcs::aubo_scope::LoopNode::setExpression ( ExpressionPtr  expression)

Create a loop expression configuration.

Parameters
expressionthe expression whose evaluation must be true to continue looping, not null.
evaluateContinuouslyif true the expression will be evaluated continuously during the looping (i.e. the loop can be interrupted anytime during its execution), otherwise false and the expression will be evaluated once per loop iteration.
Returns
the configuration.
void arcs::aubo_scope::LoopNode::setLoopCount ( int  loop_count)

Creates a loop counter configuration.

Parameters
loopCountthe number of iterations through the loop node.
errorHandlererror handler for handling validation. If using ErrorHandler#AUTO_CORRECT this will clamp the value to the nearest valid loop count value.
Returns
the configuration.
void arcs::aubo_scope::LoopNode::setLoopCountVariable ( VariablePtr  var)
Returns
the variable for storing the loop count

Friends And Related Function Documentation

friend class DataSwitch
friend

Definition at line 108 of file loop_node.h.

Member Data Documentation

void* arcs::aubo_scope::LoopNode::d_ { nullptr }
private

Definition at line 110 of file loop_node.h.


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