Skip to content

ModelEntities Function

mitchell-conrad edited this page Jan 19, 2021 · 1 revision

Table of Contents

Function

The Function entity represents a portion of workload that can be called from elsewhere in the behaviour aspect. The execution of this workload can be influenced by adding an Input Parameter Group that can be used to drive the internal workload's behaviour. Similarly, a value can be returned to the the area from which the function was called through the use of a Return Parameter Group.

Any variables created inside of a Function are locally scoped; that is they are not accessible to any code outside of that Function and will no longer be able to be accessed once the Function ends.

The Function example on the right is equivalent to the following C++ code:

int getSum (std::vector<int> values) {

    int sum = 0;
    int Length = values.size();

    for (int i = 0; i < Length; i++) {
        sum += values[i];
    }

    return sum;
}

Parent

Can be adopted by the below entities:

Children

Can adopt the below entites:

Dependents

This entity does not have any dependent entities.

Dependencies

This entity does not depend on any entities.

Editable Data Fields

  • icon - sets the icon used by the Function in MEDEA
  • operation - sets the function name

Edges

This entity does not have any visible edges attached to it.

Clone this wiki locally