summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs/Main.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-03-09 03:29:32 +0000
committerMichi Henning <michi@zeroc.com>2004-03-09 03:29:32 +0000
commitba07fd51fff5b7eea6837be95f9e692fa8c5a8e4 (patch)
treee0fa5581460564e2f12cdb5db0a15ab58db200bc /cpp/src/slice2cs/Main.cpp
parentfixing VC6 link error (diff)
downloadice-ba07fd51fff5b7eea6837be95f9e692fa8c5a8e4.tar.bz2
ice-ba07fd51fff5b7eea6837be95f9e692fa8c5a8e4.tar.xz
ice-ba07fd51fff5b7eea6837be95f9e692fa8c5a8e4.zip
Intermediate check-in prior to removing IComparable.
Diffstat (limited to 'cpp/src/slice2cs/Main.cpp')
-rw-r--r--cpp/src/slice2cs/Main.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index f2b644ce2ff..4ed1ce800c8 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -30,6 +30,7 @@ usage(const char* n)
"-DNAME=DEF Define NAME as DEF.\n"
"-UNAME Remove any definition for NAME.\n"
"-IDIR Put DIR in the include file search path.\n"
+ "--output-dir DIR Create files in the directory DIR.\n"
"--tie Generate TIE classes.\n"
"--impl Generate sample implementations.\n"
"--impl-tie Generate sample TIE implementations.\n"
@@ -45,6 +46,7 @@ main(int argc, char* argv[])
{
string cppArgs;
vector<string> includePaths;
+ string output;
bool tie = false;
bool impl = false;
bool implTie = false;
@@ -116,6 +118,23 @@ main(int argc, char* argv[])
}
--argc;
}
+ else if(strcmp(argv[idx], "--output-dir") == 0)
+ {
+ if(idx + 1 >= argc)
+ {
+ cerr << argv[0] << ": argument expected for`" << argv[idx]
+ << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ output = argv[idx + 1];
+ for(int i = idx ; i + 2 < argc ; ++i)
+ {
+ argv[i] = argv[i + 2];
+ }
+ argc -= 2;
+ }
else if(strcmp(argv[idx], "--case-sensitive") == 0)
{
caseSensitive = true;
@@ -221,7 +240,7 @@ main(int argc, char* argv[])
}
else
{
- Gen gen(argv[0], icecpp.getBaseName(), includePaths);
+ Gen gen(argv[0], icecpp.getBaseName(), includePaths, output);
if(!gen)
{
p->destroy();