Software design pattern for achieving clean multiple inheritance in Object Oriented Programming
AssigneeYuQian Zhou
InventorYuQian Zhou
Life of this patent
Estimating the term…
Loading patent…
AssigneeYuQian Zhou
InventorYuQian Zhou
Estimating the term…
A design pattern called DDIFI (stands for Decoupling Data Interface From data Implementation) is described, which cleanly solved the diamond problem in multiple inheritance of object oriented programming. It can handle the class fields exactly according to the programmer's intended application semantics, providing flexibility: each instance variable can be configured individually either as one joined copy or as multiple independent copies in the implementation class. The key points are: (1) decouple data interface from data implementation, by stopping inheriting data fields; (2) in the regular methods implementation use virtual property methods instead of direct raw fields; and (3) after each semantic branching add (and override) the new semantic assigning property. This method is general enough, and can achieve clean multiple inheritance in any OOP languages that: native-ly support multiple inheritance (e.g. C++, Python, OCaml, Lisp, Eiffel, etc.) single inheritance languages that support default interface methods (e.g. Java, C # etc.) single inheritance languages that support mixins (e.g. D), or traits (e.g. Scala etc).
A method for achieving clean multiple inheritance in object oriented programming, wherein the programmers can specify on an individual bases whether each of the inherited data fields should be joined or separated in the sub-classes, when applied to the OOP languages that support native multiple inheritance (such as C++, Python, Ocaml, Lisp, and Eiffel, etc.), the method compromising the following implementation steps:
Dependencies are inferred from the claim text.