Object references

 

 

Object references are used to find an object at run time in the hierarchy levels of the application.

You can search for objects that are at higher hierachia levels (father, parent), or at the same hierarchy level before (previous sibling, predecessor) or after (next sibling, successor) the current object.

 

Object structure of a fictitious application

 

Object of the class

Order

 

 * Start

0

 

            Offer

0

 

                    Positions

0

 

                              Position

0

 

                                        Motor

0

 

                                       Wheel

1

 

                                       Painting

2

 

                                       Radio

3

 

                                       Gear box

4

 

                             * Position

1

 

 

The following can be seen from this structure (examples):

-   Start is a predecessor of Offer, Positions, Position, Motor, Wheel, Painting, Radio, Gear box

-   Offer is a predecessor of Positions, Position, Motor, Wheel, Painting, Radio, Gear box

-   Positions is a predecessor of Position, Motor, Wheel, Painting, Radio, Gear box

-   Position is a predecessor of Motor, Wheel, Painting, Radio, Gear box

-   Painting has the previous siblings Motor und Wheel

-   Painting has the next siblings Radio und Gear box

 

The object reference returns a reference to the first object derived from the object reference definition class at run time. It is possible to determine in which direction the search is carried out (parent (father), previous sibling (predecessor), next sibling (successor)).

If a matching object cannot be found, the object reference returns NoValue.

 

 

More:

Object reference