Inheritance
Inheritance is the method by which a parent object propagates its property values to a child component.
The following rules should be kept in mind when dealing with these properties.
- A Child Property can be read only, but is not always.
- If the Child Property is not read only, then it can be changed to a value different from the Parent Property.
- If the Parent Property changes, and the Child and Parent properties were the same before the change, then the child property will be changed to reflect the new Parent Property value
- If the Child Property changes, the Parent Property value will not be updated
- The Default Value of the Child Property is always the current Parent Property value
Example
As an example of how a new component inherits property values:
The Disk Usage Server (DUS) is a child component of the Host object. The DUS Remote User property inherits its value from the Host PV User Property on creation of the DUS. The DUS property value will be taken from the Host property value.
Child properties that have been inherited are marked as inherited.
As an example of what happens when you change inherited property values:
If we change the Host PV User Property value, it gets pushed down to the DUS Remote User property value, updating it. The associated Default Value is also updated.
If we change the DUS Remote User property value, that is the child value, it does not propagate up to the host; the parent Host PV User Property value remains unchanged.
Now the child and parent properties are out of sync, and if we change the parent property value it is not reflected in the child property, though the default value continues to be updated.