Feature: Enum support

Aperta
#392 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, python
Ambito
backend

Direzione di ricerca

Start by reading the parameter schema and code-generation entry points for Python and C++, then check how string parameters with one_of<> are currently represented and tested. The issue suggests generating actual enums, with magic_enum::enum_cast as a C++ consideration; done means enum parameters are supported in both generators with tests covering the generated output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Can we get enum support for parameters?

We can use the combination of a string parameter with one_of<>. This is what we are doing at the moment.

Then in python and c++ one can generate an actual enum out of this.

Implementation considerations:
Python is of course easy and for c++ there is magic_enum::enum_cast to the rescue.

Lingua principale
Python
Stelle
385
Fork
81
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PickNikRobotics/generate_parameter_library

Tutte le issue di PickNikRobotics/generate_parameter_library

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.