-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base classes always extend NXobject. Can a base class extend another base class? #135
Comments
As mentioned in the above issue #1059, in NeXus Base Classes are already extended in another Base Class using the 'type=' notation: Here, the assumption is that all data items defined under the tree of the referenced base class and in the trees of the base classes referenced therein will automatically be available for reuse under a (not always) specified ‘name’ in the new definition. Hence, definitions are inherited inside base_classes as well. The use of 'extend=' for the a definition does the same as the 'type=' in case of a group. Hence, we do not introduce anything new, or complicate the standard. The contrary, we would simplify it, because the practice of not using the 'extend=' in base classes results in copied definitions which will become unmaintainable with the increase of the Vocabulary. A good example is NXentry and NXsubentry. Checking them shows that a huge majority of the items inside NXentry could have been simply inherited by NXsubentry, instead of being copy-pasted over. |
Will be happy to contribute with a pull request also for cnxvalidate with the small modification to support the use of extends not only in Application Definitions but also in Base Classes. |
@mkoennecke Is not it the line at the end of NXVloadBaseClass where we could include the call "mergeInheritance(self);" just like in case of NXVloadAppDef to support merging definitions from another Base Classe? Hence, we could avoid the need of copying definitions over manually as in case of NXsubentry. |
The text was updated successfully, but these errors were encountered: