Skip to content

WIP: Small refactoring #2188

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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Conversation

selim1903
Copy link

@selim1903 selim1903 commented Apr 1, 2025

Describe Your Changes

Cleaned up command structure with proper interfaces
Hey team! This PR cleans up our command architecture to make it more maintainable.
Main idea: keep main.cc super minimal and introduce clean public interfaces with implementations hidden in their own folder structure.

  • Moved all the messy stuff out of main.cc (it's down to like 14 lines now!)
  • Created public headers that define clean interfaces
  • Tucked all the implementation details away using PIMPL
  • Split everything into proper header/source files
  • Added a command registry to organize all our commands
  • Made adapters so we can migrate one command at a time

This gives us a much cleaner structure while keeping everything working with the existing code. Also makes it way easier to test!

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

return CommandStatus::Success;
} catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << std::endl;
return CommandStatus::GeneralError;
Copy link
Author

Choose a reason for hiding this comment

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

TODO: Need to implement these command status

@selim1903 selim1903 changed the title Small refactoring WIP: Small refactoring Apr 1, 2025
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