-
Notifications
You must be signed in to change notification settings - Fork 523
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
Adding configurable attributes to methods #605
Comments
Can you provide an example for reference? |
Time to time it's very beneficial to mark methods with attributes. E.g. Would be really nice to categorize the functions to be able giving them different attributes:
|
For ease of use, it might be easiest to configure a String to be prepended to getters and setters. The fields that can be static const already have a String (macro). These strings can be macros or direct values. This might be also nice for Java as these could be annotations. |
You know, in case of C++ it can be basically a set of hardcoded macros: #ifndef SBE_CFG_METHOD_PREFIX
# define SBE_CFG_METHOD_PREFIX
#endif
#ifndef SBE_CFG_GETTER_PREFIX
# define SBE_CFG_GETTER_PREFIX SBE_CFG_METHOD_PREFIX
#endif
#ifndef SBE_CFG_CONST_FLD_GETTER_PREFIX
# define SBE_CFG_CONST_FLD_GETTER_PREFIX SBE_CFG_GETTER_PREFIX
#endif
#ifndef SBE_CFG_SETTER_PREFIX
# define SBE_CFG_SETTER_PREFIX SBE_CFG_METHOD_PREFIX
#endif
....
SBE_CFG_GETTER_PREFIX int getField(){...} But if it's beneficial for other langs too it's better to go SbeTool parameters. |
Adding configurable attributes to methods
The text was updated successfully, but these errors were encountered: