Why is the BioDatabase.model_ids_with_protocol function required?
I am trying to implement a new database interface for one of our local databases, which uses the BioFileSet
interface. I have created a class derived from BioDatabase
, and I am implementing the functions.
While implementing the database, I was stumbling upon a pure virtual function that I don't understand: model_ids_with_protocol
. Why do I have to implement this function, and why can't I just simply implement the model_ids
function?
When I see it correctly, the model_ids_with_protocol
function is called from within model_ids
: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/database/database.py#L378
passing a the member variable self.protocol
as the protocol.
This is IMHO completely useless. The self.protocol
is available in the derived class as well, and it can be used inside there, without needing to pass it as a parameter. The exact same is true for the functions objects
: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/database/database.py#L381, object_sets
: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/database/database.py#L565 and the tmodel_ids_with_protocol
: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/database/database.py#L732
So, is there any reasoning behind having the protocol
parameters in these functions, other than 'It has been that way in the bob.db.verification.database interface' (where it was required)?