Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addCamera method should be declared as protected #767

Open
rabauke opened this issue Dec 1, 2024 · 0 comments
Open

addCamera method should be declared as protected #767

rabauke opened this issue Dec 1, 2024 · 0 comments

Comments

@rabauke
Copy link

rabauke commented Dec 1, 2024

There is a comment in the source of the class CameraMetaData which reads

// NOTE: *NOT* `final`, could be derived from by downstream.
class CameraMetaData {
public:
  CameraMetaData() = default;

// omitted code

private:
  const Camera* addCamera(std::unique_ptr<Camera> cam);
};

A class that derives from CameraMetaData most likely wants to add camera metadata in its own constructor. For this purpose, grating access to the addCamera method by declaring it as protected would be very convenient. As of the current implementation of CameraMetaData, each derived class needs to implement its own variant of the addCamera method (or implement the functionality of addCamera directly in its constructor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant