Stateflow    
findShallow

Return specified objects in this object at the first level of containment below this object

Syntax

Description

The findShallow method of this object returns all objects of the specified type at the first level of containment within this object. You specify the type of object as a string argument. Only one type is allowed.

Arguments

thisObject
The object for which to find objects at the first level of containment. It can be an object of type Root, Machine, Chart, State, Box, or Function.
Type
The string name of the type of object to find. Value can be 'Machine', 'Chart', 'State', 'Box', 'Function', 'Note', 'Transition', 'Junction', 'Event', 'Data', or 'Target'.
If no type is specified (i.e., no argument), all possible object types are found.

Returns

          

objArray
Array of objects of the specified type found in this object at the top level of containment (i.e., first depth)

Example

Chart object ch contains states A and state B, connected by a transition. State A contains states A11 and A12, also connected by a transition. State A11 contains state A111 and a junction. The command ch.findShallow ('State') returns an array of state objects for states A and B.

See Also

The methods findDeep and find


  findDeep generate