-
Notifications
You must be signed in to change notification settings - Fork 14
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
Store vocab macro definitions as enumerator values #122
Comments
|
|
I didn't notice that switching to enumerations will probably require some changes in the function signatures proposed in #121. Note to self: investigate implicit conversions (unscoped |
While working on #121, I committed aeae9df (see also #121 (comment)). Now, we have a mixture of macro definitions and enumerators in |
Or even |
Following robotology/yarp#1755, namespace-aware |
Re-implemented via |
I think it's OK as the way it is now: global vocabs in ICartesianControl.h, enumerations in ICartesianSolver.h. Moving that in either direction (convert to enumeration or global variable) would break the interfaces. Grouping vocabs as enums for the sake of classification is not a must, we already have that in doxy. |
Currently, we use
#define
s:kinematics-dynamics/libraries/TeoYarp/ICartesianControl.h
Lines 26 to 35 in 1236178
Enumerations seem like a cleaner way to achieve the same result (per https://github.com/robotology/yarp/blob/aac0dc7/src/libYARP_sig/include/yarp/sig/Image.h#L363-L392):
Some potential benefits: https://stackoverflow.com/a/11648734.
Note that, in #115 and #121, we want to pass similar vocabs to several new methods of the
ICartesianControl
interface and represent them asint
s. This change would entail using the correct type (e.g.ICartesianControlVocabRpcCommandsEnum
in the example above) instead of integer primitives.The text was updated successfully, but these errors were encountered: