summaryrefslogtreecommitdiff
path: root/cpp/src/slice2java/Main.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-03-25 19:02:28 +0000
committerMark Spruiell <mes@zeroc.com>2002-03-25 19:02:28 +0000
commit8a7a40e0ced854d0eb3294c53d53b72c3bb96221 (patch)
tree3029b1d7ef5165b4b745c057ce7fefd961643bc1 /cpp/src/slice2java/Main.cpp
parentUpdated to put proper paths in the projects. (diff)
downloadice-8a7a40e0ced854d0eb3294c53d53b72c3bb96221.tar.bz2
ice-8a7a40e0ced854d0eb3294c53d53b72c3bb96221.tar.xz
ice-8a7a40e0ced854d0eb3294c53d53b72c3bb96221.zip
adding support for TIE classes
Diffstat (limited to 'cpp/src/slice2java/Main.cpp')
-rw-r--r--cpp/src/slice2java/Main.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index c146eb9c76a..22d0cd8c592 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -28,7 +28,9 @@ usage(const char* n)
"-IDIR Put DIR in the include file search path.\n"
"--output-dir DIR Create files in the directory DIR.\n"
"--package PKG Generate everything in package PKG.\n"
+ "--tie Generate TIE classes.\n"
"--impl Generate sample implementations.\n"
+ "--impl-tie Generate sample TIE implementations.\n"
"-d, --debug Print debug messages.\n"
;
}
@@ -40,7 +42,9 @@ main(int argc, char* argv[])
vector<string> includePaths;
string output;
string package;
+ bool tie = false;
bool impl = false;
+ bool implTie = false;
bool debug = false;
int idx = 1;
@@ -131,6 +135,15 @@ main(int argc, char* argv[])
}
argc -= 2;
}
+ else if (strcmp(argv[idx], "--tie") == 0)
+ {
+ tie = true;
+ for (int i = idx ; i + 1 < argc ; ++i)
+ {
+ argv[i] = argv[i + 1];
+ }
+ --argc;
+ }
else if (strcmp(argv[idx], "--impl") == 0)
{
impl = true;
@@ -140,6 +153,15 @@ main(int argc, char* argv[])
}
--argc;
}
+ else if (strcmp(argv[idx], "--impl-tie") == 0)
+ {
+ implTie = 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] << "'"
@@ -160,6 +182,13 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
+ if (impl && implTie)
+ {
+ cerr << argv[0] << ": cannot specify both --impl and --impl-tie" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
int status = EXIT_SUCCESS;
for (idx = 1 ; idx < argc ; ++idx)
@@ -223,10 +252,18 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
gen.generate(unit);
+ if (tie)
+ {
+ gen.generateTie(unit);
+ }
if (impl)
{
gen.generateImpl(unit);
}
+ if (implTie)
+ {
+ gen.generateImplTie(unit);
+ }
}
unit->destroy();