diff options
Diffstat (limited to 'cpp/src/slice2cpp/Main.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Main.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index 631cb029763..d8a9ea8d2a1 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -29,6 +29,7 @@ usage(const char* n) "--include-dir DIR Use DIR as the header include directory.\n" "--output-dir DIR Create files in the directory DIR.\n" "--dll-export SYMBOL Use SYMBOL for DLL exports.\n" + "--impl Generate sample implementations.\n" "-d, --debug Print debug messages.\n" ; } @@ -41,6 +42,7 @@ main(int argc, char* argv[]) string include; string output; string dllExport; + bool impl = false; bool debug = false; int idx = 1; @@ -141,6 +143,15 @@ main(int argc, char* argv[]) } argc -= 2; } + else if (strcmp(argv[idx], "--impl") == 0) + { + impl = true; + for (int i = idx ; i + 1 < argc ; ++i) + { + argv[i] = argv[i + 1]; + } + --argc; + } else if (argv[idx][0] == '-') { cerr << argv[0] << ": unknown option `" << argv[idx] << "'" << endl; @@ -214,7 +225,8 @@ main(int argc, char* argv[]) } else { - Gen gen(argv[0], base, include, includePaths, dllExport, output); + Gen gen(argv[0], base, include, includePaths, dllExport, output, + impl); if (!gen) { unit->destroy(); |