Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.bio.base bob.bio.base
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bob.bio.basebob.bio.base
  • Issues
  • #50
Closed
Open
Issue created Oct 21, 2016 by Manuel Günther@mguentherMaintainer

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)?

@amohammadi

Assignee
Assign to
Time tracking