Use of createIO
in NWBRecording::openFile
#52
Labels
category: proposal
proposed enhancements or new features
priority: low
alternative solution already working and/or relevant to only specific user(s)
aqnwb/src/nwb/NWBRecording.cpp
Line 23 in 00aa1ca
is specified as string, but the permissible values are not clear. If we want to use this pattern, we should define an enum in
Types.hpp
to explicitly define the valid values. The same comment then also applies to:aqnwb/src/Utils.hpp
Line 61 in 00aa1ca
Also,
IOType
should be renamed toioType
for consistency.On a related note, I'm wondering whether it would be simpler and more explicit to have the user create the IO object and pass it in as a
BaseIO
pointer instead of usingcreateIO
to internally create the IO object for the user:aqnwb/src/nwb/NWBRecording.cpp
Line 30 in 00aa1ca
The main advantage of creating the IO object on behalf of the user seems to be that it ensures that we have managed unique pointer that will be cleaned up:
https://github.com/NeurodataWithoutBorders/aqnwb/blob/00aa1caff04ce9938b4d07c937859cdc34004539/src/Utils.hpp#L65
However, this pattern makes it hard to have custom flags on IO backends. The user could still use the
createIO
convenience function if they choose to for the common use-case.I.e., I think
NWBRecording::openFile
should just take aBaseIO
pointer as input instead of having theIOType
string.The text was updated successfully, but these errors were encountered: