ChimeraTK / ApplicationCore

Core library for creating applications based on the ControlSystemAdapter and DeviceAccess.
GNU Lesser General Public License v3.0
1 stars 2 forks source link

feat: Implement deep input validation #330

Closed phako closed 11 months ago

phako commented 11 months ago

@mhier I have changed the API - it is backward compatible now

mhier commented 11 months ago

I think we should call automatically enableDeepValidation() when validate(TransferElementID()) is called (that will validate the initial value). We should also force people to actually do that call by throwing an exception if the first call to validate() has a valid (i.e. not default-constructed) TransferElementID. The pointer to the owning module can be extracted e.g. from the first accessor passed to the add() call (via the slightly ugly dynamic_cast<Module*>(node.getOwningModule())->findApplicationModule() call).

mhier commented 11 months ago

Sorry, I screwed up the code formatting correct yesterday. Should I fix this and then merge? Or do you still have open issues to change?

phako commented 11 months ago

Need to write a ticket for the new test, but should be done code-wise