Function me::ChildTypeAllowed(runtimeId, newType)

me::ChildTypeAllowed

The function me::ChildTypeAllowed returns 1 if a child of type newType can be added as a child to runtime identifier runtimeId..

me::ChildTypeAllowed(
        runtimeId,  ! (input) an element
        newType     ! (input) an element
)

Arguments

runtimeId

An element in the set AllIdentifiers referencing a runtime identifier.

newType

An element in the set AllIdentifierTypes.

Return Value

Returns 1 if the identifier of type newType can be added as a child to identifier runtimeId. When runtimeId doesn’t reference a runtime identifier an error will be raised.

Example

Viewing a small runtime library with prefix frerl in the model explorer:

../../_images/runtimelib-setup.png

Let ep_functionReferenceExampleRuntimeParameter have value frerl::p_a, then the code:

_bp_childTypeAllowed := me::ChildTypeAllowed(
    runtimeId :  ep_functionReferenceExampleRuntimeParameter,
    newType   :  'parameter');
display _bp_childTypeAllowed ;

Produces the following in the listing file:

_bp_childTypeAllowed := 0 ;

Illustrating that a parameter cannot have, as child, another parameter.

References

Generic references for model edit functions can be found on the index page