Closed end2endzone closed 2 years ago
Related to #50
This proposition also allow to separate the code that implements the attribute's validation from the <visibility>
and <validity>
xml elements and their attributes.
Also define a sa_boolean
type to clarify the expected values in api functions that are expecting a boolean value.
Migrate to functions with no arguments validation scheme. This is better for an api since it each function is independent from each other. It we need to add/remove arguments, then we only need to create another function. This will offer the longest lifetime to plugins in case the api needs to change.
This implies:
sa_plugin_demo_validate()
.sa_plugin_validation_get_selection_context()
.sa_plugin_validation_get_property_store()
.
Is your feature request related to a problem? Please describe. The plugin interface function is currently defined as the following:
This function definition is prone to a signature change as new features are added.
It might be interesting to allow the function to have a
PropertyStore
pointer as an argument. The API should provide getter/setter for a property store object such as the following:The inversed flags should also be retreived with a function such as
Describe the solution you'd like The
Validator
class should use aPropertyStore
to store all the attributes. This includes native and plugin based attributes. This would greatly simply the interface for plugins that implement menu validation. The need for a "flag" array which currently contains the "inversed" state of all attributes could also be removed for simplicity.Describe alternatives you've considered N/A
Additional context N/A