Skip to content

Abstract Trajectory #1289

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

Merged
merged 5 commits into from
Mar 27, 2017
Merged

Abstract Trajectory #1289

merged 5 commits into from
Mar 27, 2017

Conversation

eggrobin
Copy link
Member

Two interfaces.

Hint* hint) const;
// Implementation of the interface |Trajectory|.

using TrajectoryHint = Trajectory<Frame>::Hint;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this name, I'd rather have Trajectory<Frame>::Hint in the few places where it's used.

CHECK(it != series_.end());
if (hint != nullptr) {
hint->index_ = it - series_.cbegin();
Trajectory<Frame>::Hint* const hint) const {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See? Trajectory<Frame>::Hint is much better than TrajectoryHint.

virtual Instant t_max() const = 0;

// Gets a |Hint| of the appropriate derived type.
virtual not_null<std::unique_ptr<Hint>> GetHint() const = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this NewHint, it makes it clearer that this is a factory. Otherwise one is left wondering where it "gets" it from.

@pleroy
Copy link
Member

pleroy commented Mar 26, 2017

retest this please

@pleroy pleroy added the LGTM label Mar 26, 2017
@eggrobin eggrobin merged commit e1e839a into mockingbirdnest:master Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants