Hierarchical Data Access via Object Linking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Object-oriented programming languages that do not support multiple inheritance or partial interface implementation face challenges in handling hierarchical application data, leading to code duplication and increased implementation load, especially when dealing with complex transportation models.
Innovation Solution
A method involving a hierarchy base class and subclasses that allow application objects to access hierarchical relationships without inheriting from the hierarchy base class, enabling flexible combination of functionalities and reducing code duplication by linking application objects with hierarchy objects through references.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If multiple inheritance is used to combine application base class functionalities and hierarchy base class functionalities, then programming flexibility is improved, but device complexity increases and code duplication occurs
Solution Approach 1:
The patent introduces an intermediary mechanism where application classes link to hierarchy base classes through interface references rather than direct inheritance. This mediator approach allows classes to access hierarchical functionalities without the complexity of multiple inheritance, resolving the contradiction by decoupling the relationship while maintaining flexibility.
Solution Approach 2:
The patent segments the functionality into separate interface definitions and implementation classes. Instead of combining multiple inheritance relationships, the solution divides the system into distinct components: application base class, hierarchy base class, and interface layers, allowing flexible combination without structural complexity.
2Adaptability or versatility
If partial interface implementation is used to implement hierarchical functionality, then adaptability is improved, but code duplication increases and maintenance difficulty increases
Solution Approach 1:
The patent creates universal interface definitions that can be implemented by multiple classes. The hierarchy base class provides a universal interface that any application class can implement partially or fully, allowing flexible adaptation while avoiding code duplication through shared interface contracts.
Solution Approach 2:
Instead of duplicating interface implementation code across multiple classes, the patent uses interface copying where application classes reference and implement only the specific hierarchical functionalities they need, reducing maintenance burden while maintaining adaptability.
3Ease of operation
If application classes directly inherit from hierarchy base class to access hierarchical relationships, then ease of operation is improved, but device complexity increases due to mandatory inheritance requirements
Solution Approach 1:
The patent introduces an intermediary reference mechanism where application classes maintain references to hierarchy base class instances rather than inheriting from them. This intermediary approach provides easy access to hierarchical relationships while avoiding the complexity constraints of inheritance structures.
Data Source
AI summary
The invention relates to an object-oriented technique for representing and accessing application data that is arranged in hierarchical relationships. In a first step classes are provided including a hierarchy base class with methods for accessing hierarchical relationships, at least one hierarchy subclass that is derived from the hierarchy base class, and at least one application class. In a next step objects are instantiated including at least one hierarchy object of the at least one hierarchy subclass and at least one application object of the at least one application class. In a final step, each application object is linked to at least one hierarchy object, and vice versa, to provide access to the application data.


