All classes should at least offer convenient constructors where all values can be set in one call. There should be multiple constructors so that users can set many combinations of values.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
* initDefaults(int level, int version) to allow users to set the defaults of some class as specified for the given L/V combination. This method could be called by the initDefaults() method
* the check if all required attributes have been set, i.e. hasRequiredAttributes/Elements().
This makes sense. What about having mutliple constructors?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think, supporting just L2V4 like libSBML would be enough. We should not call it from the constructor by default, I think.
The advantages of a method like setUnsetAttributesToL2v4Default() is that, on an SBML editor, you can ask the user to fill in the attributes as he like, when he is saving the application developer could decide to call setUnsetAttributesToL2v4Default to complete only the attributes that have not been set. He could also call hasRequiredAttributes and if not ask the user if he want to get back to edit the element or if he just want to have the default values.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
function like hasRequiredAttributes, hasRequiredElements, setUnsetAttributesToL2v4Default would probably be good to add to help.
All classes should at least offer convenient constructors where all values can be set in one call. There should be multiple constructors so that users can set many combinations of values.
hasRequiredAttributes? This would mean we have to implement such a static function?
Ok, I see, we should probably implement
* initDefaults(int level, int version) to allow users to set the defaults of some class as specified for the given L/V combination. This method could be called by the initDefaults() method
* the check if all required attributes have been set, i.e. hasRequiredAttributes/Elements().
This makes sense. What about having mutliple constructors?
I think, supporting just L2V4 like libSBML would be enough. We should not call it from the constructor by default, I think.
The advantages of a method like setUnsetAttributesToL2v4Default() is that, on an SBML editor, you can ask the user to fill in the attributes as he like, when he is saving the application developer could decide to call setUnsetAttributesToL2v4Default to complete only the attributes that have not been set. He could also call hasRequiredAttributes and if not ask the user if he want to get back to edit the element or if he just want to have the default values.