-
Notifications
You must be signed in to change notification settings - Fork 56
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
NXcomponent
as a parent base class
#1525
base: main
Are you sure you want to change the base?
Conversation
Quick comment that I missed to mention in today's telco: are there any tools that would expect these classes to extend We had a similar problem before when we tried to subclass Since base class inheritance is now supported, such checks will anyway break on a smaller scale, e.g. for |
The question of whether there are tools to implement inheritance is impossible to answer. I can modify the That is one reason I have argued in the past for a package like |
Disclaimer: This is a draft and not meant to be voted on yet. The idea here is to perform an exploration/survey of the consequences of what having an
NXcomponent
base class would mean.This implements the discussion items in #1519 (comment).
NXcomponent
is meant as a parent base class that many base classes describing devices/instrument components should derive from. As requested in the comment above, this is meant as a survey of base classes to identify those which should and those which should not derive fromNXcomponent
.These are the base classes that are now inheriting from NXcomponent:
in
base_classes
:in
contributed_definitions
:In addition, the
default
attribute is added toNXobject
so that it doesn't have to be repeated in every class. As a consequence, it can be removed This affects almost all of the classes above, but additionally the default attribute is removed from these classes (which are still inheriting from NXobject, not from NXcomponent):further changes:
Open questions: