-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement dev-utils Build Enumeration Signed-off-by: jparisu <[email protected]> * Add vector to custom enumeration builder Signed-off-by: jparisu <[email protected]> * Add fixes to enumeration builder Signed-off-by: jparisu <[email protected]> * apply suggestions Signed-off-by: jparisu <[email protected]> * remove ... in file path Signed-off-by: jparisu <[email protected]> Signed-off-by: jparisu <[email protected]>
- Loading branch information
Showing
4 changed files
with
372 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# eProsima Developers Utils Module | ||
|
||
This is a package that contains certain scripts to help in the implementation of new projects. | ||
These scripts are meant to generate code or certain utils in a fast and optimal way. | ||
|
||
> :warning: This is not a linkable package, it is only for utils focus on developing faster or better code. | ||
## Automatic Code Generator | ||
|
||
These tools are meant to autogenerate general code in different languages. | ||
|
||
### Enumeration builder | ||
|
||
Extend in a new file the whole `ENUMERATION_BUILDER` macro. |
19 changes: 19 additions & 0 deletions
19
dev_utils/src/automatic_code_generator/cpp/enumeration_builder/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# ENUMERATION BUILDER | ||
|
||
This auto generates the code that would be generated by macro `ENUMERATION_BUILDER` in | ||
`dev-utils/cpp_utils/include/cpp_utils/macros/custom_enumeration.hpp`. | ||
|
||
## Motivation | ||
|
||
This script is useful because the use of this macro could have problems depending on its use and/or architecture: | ||
|
||
- Windows does extend macros in a different order. | ||
- SWIG does not create classes or enums that are extended from a macro. | ||
|
||
## Usage | ||
|
||
This is a standalone script. In order to execute it: | ||
|
||
```sh | ||
python3 enumeration_builder.py --output include/output.hpp --enum CustomEnum --values "value1;value2" --namespaces "eprosima;utils" | ||
``` |
Oops, something went wrong.