summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Slice.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-15 18:01:26 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-15 18:01:26 +0000
commitf51b8b6121efd85cbb424ef42d5944f7a2d11694 (patch)
treef5b74a15919dd88f5b24298fbb2b8415b7c78b35 /py/modules/IcePy/Slice.cpp
parentadding support for prefixes on generated filenames; convert included (diff)
downloadice-f51b8b6121efd85cbb424ef42d5944f7a2d11694.tar.bz2
ice-f51b8b6121efd85cbb424ef42d5944f7a2d11694.tar.xz
ice-f51b8b6121efd85cbb424ef42d5944f7a2d11694.zip
convert included filenames into prefixed module names
Diffstat (limited to 'py/modules/IcePy/Slice.cpp')
-rw-r--r--py/modules/IcePy/Slice.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/py/modules/IcePy/Slice.cpp b/py/modules/IcePy/Slice.cpp
index b5f6457a391..774dfe45a27 100644
--- a/py/modules/IcePy/Slice.cpp
+++ b/py/modules/IcePy/Slice.cpp
@@ -40,11 +40,13 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
}
string cppArgs;
+ Ice::StringSeq includePaths;
Ice::StringSeq files;
bool debug = false;
bool ice = true; // This must be true so that we can create Ice::Identity when necessary.
bool caseSensitive = false;
bool all = false;
+ bool checksum = false;
vector<string>::const_iterator p;
for(p = argSeq.begin(); p != argSeq.end(); ++p)
@@ -63,6 +65,11 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
{
cppArgs += arg;
}
+
+ if(arg.substr(0, 2) == "-I" && arg.size() > 2)
+ {
+ includePaths.push_back(arg.substr(2));
+ }
}
else if(arg == "--case-sensitive")
{
@@ -72,6 +79,10 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
{
all = true;
}
+ else if(arg == "--checksum")
+ {
+ checksum = true;
+ }
else if(arg[0] == '-')
{
PyErr_Format(PyExc_RuntimeError, "unknown option `%s'", arg.c_str());
@@ -119,7 +130,7 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
ostringstream codeStream;
IceUtil::Output out(codeStream);
out.setUseTab(false);
- generate(unit, all, out);
+ generate(unit, all, checksum, includePaths, out);
unit->destroy();
string code = codeStream.str();