mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Programmatically create the readables and writables mappings.
This commit is contained in:
19
scripts/mktable.sh
Normal file
19
scripts/mktable.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
echo "#include <string>"
|
||||
echo "#include <map>"
|
||||
|
||||
word=$1
|
||||
shift
|
||||
|
||||
for a in "$@"; do
|
||||
echo "extern std::string ${word}_${a}_pb();"
|
||||
done
|
||||
|
||||
echo "extern const std::map<std::string, std::string> ${word};"
|
||||
echo "const std::map<std::string, std::string> ${word} = {"
|
||||
for a in "$@"; do
|
||||
echo " { \"${a}\", ${word}_${a}_pb() },"
|
||||
done
|
||||
echo "};"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user