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

doc: Initial commit to rework docs #2116

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

exbluesbreaker
Copy link
Contributor

@exbluesbreaker exbluesbreaker commented Apr 2, 2025

Initial change for potential rework.

commands_doc.h file is added. It contains:

  • struct InteractiveCommand which is new alternative to previously only std::function, now it is std::function to do the command and documentation (strings describing function and arguments).

  • struct InteractiveCommandDoc templated by N (number of arguments), it basically stores all constant fields of documentation for every function (basically all std::string data associated). Probably some way to handle variable number should be added somehow later on (not by template but by naming argument in doc in some specific way).

  • List of constexpr objects of struct InteractiveCommandDoc for every function (except for one defined in tests, which are defined on the spot).

  • templated makeCommand function to create struct InteractiveCommand given struct InteractiveCommandDoc andstd::function` callback for the command

And I basically replaced storing callbacks only in map of commands into storing struct InteractiveCommand objects (doc+callback).

I used chatgpt for some code genaration (to make boilerplate alternatives to old addCommand, needs to be checked)

Copy link

github-actions bot commented Apr 2, 2025

You are modifying libf3d public API! ⚠️Please update bindings accordingly⚠️!
You can find them in their respective directories: python, java, webassembly.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • application/F3DStarter.cxx
    • lines 1917-1918
  • library/src/interactor_impl.cxx
    • lines 802-810
    • lines 863-864
    • lines 873-875
    • lines 910-911
  • library/testing/TestSDKInteractorCommand.cxx
    • lines 97-99

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • application/F3DStarter.cxx
    • lines 1917-1918
  • library/src/interactor_impl.cxx
    • lines 802-810
    • lines 863-864
    • lines 873-875
    • lines 910-911
  • library/testing/TestSDKInteractorCommand.cxx
    • lines 97-99

@exbluesbreaker
Copy link
Contributor Author

Let's discuss in general is it good/bad approach before actually going for tests/other checks which will fail

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • library/src/interactor_impl.cxx
    • lines 909-910

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