•The nature of inheritance in kBridge
•Why it is important in kBridge Projects
•How inheritance works
Inheritance enables one Design to acquire, or inherit Rules from another Design, allowing the encapsulation, modularization and sharing of Designs in many places. Because the Designs are shared (or inherited) rather than copied, future changes to the shared Designs automatically ripple through the Designs that inherit from them, thus eliminating what can be a very large and tedious maintenance problem.
When a Design "A" inherits another Design "B," Design A simply acquires all of the Rules that are in B. The only exception is when A already has a Rule of the same name, in which case A just keeps its Rule, which is said to override the inherited Rule. Similarly, if there is more than one inherited Design, the precedence of which Rule is ultimately used is determined by the order of the inheritance. The early inherited Designs take precedence over later Designs.
In the Table Project, inheritance allows your new Table Design to have all the Rules that are contained in Block, automatically. Without inheritance, you would have to painstakingly create Rules to capture height, width, length, points of origin, and many other attributes of a 3D block.
Because the Designs are shared (or inherited) rather than copied, future changes to the shared Designs automatically ripple through the Designs that inherit from them, thus eliminating what can be a very large and tedious maintenance problem.