|
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
|
|
234.
|
|
|
Example 2::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:531
../../source/developer/03_modules_2.rst:198
|
|
235.
|
|
|
_name != _inherit
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:546
../../source/developer/03_modules_2.rst:213
|
|
236.
|
|
|
In this example, the 'other_material' will hold all fields specified by 'network.material' and it will additionally hold a new field 'manuf_warranty'. All those fields will be part of the table 'other.material'. New instances of this class will therefore never been seen by views or trees operating on the superclasses table 'network.material'.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:548
../../source/developer/03_modules_2.rst:215
|
|
237.
|
|
|
This type of inheritancy is known as "inheritance by prototyping" (e.g. Javascript), because the newly created subclass "copies" all fields from the specified superclass (prototype). The child inherits data (fields) and behavior (functions) of his parent.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:550
../../source/developer/03_modules_2.rst:221
|
|
238.
|
|
|
Inheritance by Delegation
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:553
|
|
239.
|
|
|
**Syntax :**::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/developer/02_architecture.rst:555
../../source/developer/03_modules_2.rst:232
|