|
224.
|
|
|
It is done with::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:496
../../source/developer/03_modules_2.rst:153
|
|
225.
|
|
|
Extension of an object
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:501
../../source/developer/03_modules_2.rst:158
|
|
226.
|
|
|
There are two possible ways to do this kind of inheritance. Both ways result in a new class of data, which holds parent fields and behaviour as well as additional fields and behaviour, but they differ in heavy programatical consequences.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:503
../../source/developer/03_modules_2.rst:160
|
|
227.
|
|
|
While Example 1 creates a new subclass "custom_material" that may be "seen" or "used" by any view or tree which handles "network.material", this will not be the case for Example 2.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:505
../../source/developer/03_modules_2.rst:165
|
|
228.
|
|
|
This is due to the table (other.material) the new subclass is operating on, which will never be recognized by previous "network.material" views or trees.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:507
../../source/developer/03_modules_2.rst:169
|
|
229.
|
|
|
Example 1::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:509
../../source/developer/03_modules_2.rst:172
|
|
230.
|
|
|
Notice
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:522
../../source/developer/02_architecture.rst:544
../../source/developer/03_modules_2.rst:185
../../source/developer/03_modules_2.rst:211
|
|
231.
|
|
|
_name == _inherit
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:524
../../source/developer/03_modules_2.rst:187
|
|
232.
|
|
|
In this example, the 'custom_material' will add a new field 'manuf_warranty' to the object 'network.material'. New instances of this class will be visible by views or trees operating on the superclasses table 'network.material'.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:526
../../source/developer/03_modules_2.rst:189
|
|
233.
|
|
|
This inheritancy is usually called "class inheritance" in Object oriented design. The child inherits data (fields) and behavior (functions) of his parent.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:528
../../source/developer/03_modules_2.rst:193
|