Skip to content

Clean up class access specifiers and other aspects #1136

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 1 commit into from
Jun 6, 2023

Conversation

hollasch
Copy link
Collaborator

@hollasch hollasch commented Jun 6, 2023

This includes a number of whole-codebase changes to tidy up some inconsistent aspects of our classes, and to firm up class interfaces.

  • If class clients are expected to write or read member variables, those variables must be public, and are listed at the top of the class, immediately after the leading public: specifier. Constructors follow, followed by other public methods. After this is the private: section, beginning with private member variables, and concluding with other private functions.

  • Some classes are effectively immutable. Such classes should generally not have a default constructor unless such an object has useful meaning or other utility. These are basically classes with useful constructors and a body of private resulting member variables.

  • Fix some indentation errors in the books in code listings.

  • Tweaked some blank line spacing.

  • Fixed some code listing highlighting.

All code recompiled, all renders executed and validated.

Resolves #869

This includes a number of whole-codebase changes to tidy up some
inconsistent aspects of our classes, and to firm up class interfaces.

- If class clients are expected to write or read member variables, those
  variables must be public, and are listed at the top of the class,
  immediately after the leading `public:` specifier. Constructors
  follow, followed by other public methods. After this is the `private:`
  section, beginning with private member variables, and concluding with
  other private functions.

- Some classes are effectively immutable. Such classes should generally
  not have a default constructor unless such an object has useful
  meaning or other utility. These are basically classes with useful
  constructors and a body of private resulting member variables.

- Fix some indentation errors in the books in code listings.

- Tweaked some blank line spacing.

- Fixed some code listing highlighting.

All code recompiled, all renders executed and validated.

Resolves #869
@hollasch hollasch added this to the v4.0.0 milestone Jun 6, 2023
@hollasch hollasch requested a review from trevordblack June 6, 2023 05:31
@hollasch hollasch self-assigned this Jun 6, 2023
@hollasch hollasch merged commit ae2c2b4 into dev-major Jun 6, 2023
@hollasch hollasch deleted the classes-cleanup branch June 6, 2023 19:04
@hollasch hollasch added the Review Post-merge PRs to be reviewed label Aug 14, 2023
@hollasch hollasch removed the Review Post-merge PRs to be reviewed label Jul 26, 2024
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

Successfully merging this pull request may close these issues.

1 participant