summaryrefslogtreecommitdiff
path: root/cpp/src/FreezeScript/transformdb.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-05-24 09:51:55 -0700
committerMark Spruiell <mes@zeroc.com>2010-05-24 09:51:55 -0700
commit487dd39e3483217cccb80f46e7a65674c7f6c05a (patch)
tree75fd3df459df63c2646a4e20c7a32f1ff05a09dd /cpp/src/FreezeScript/transformdb.cpp
parentbug 4623 - missing doc comments (diff)
downloadice-487dd39e3483217cccb80f46e7a65674c7f6c05a.tar.bz2
ice-487dd39e3483217cccb80f46e7a65674c7f6c05a.tar.xz
ice-487dd39e3483217cccb80f46e7a65674c7f6c05a.zip
bug 4752 - allow underscores in Slice identifiers
Diffstat (limited to 'cpp/src/FreezeScript/transformdb.cpp')
-rwxr-xr-xcpp/src/FreezeScript/transformdb.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp
index 9d5afb3f8b9..add21992e10 100755
--- a/cpp/src/FreezeScript/transformdb.cpp
+++ b/cpp/src/FreezeScript/transformdb.cpp
@@ -53,6 +53,7 @@ usage(const std::string& n)
"-DNAME=DEF Define NAME as DEF.\n"
"-UNAME Remove any definition for NAME.\n"
"-d, --debug Print debug messages.\n"
+ "--underscore Permit underscores in Slice identifiers.\n"
"--include-old DIR Put DIR in the include file search path for old Slice\n"
" definitions.\n"
"--include-new DIR Put DIR in the include file search path for new Slice\n"
@@ -217,6 +218,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
vector<string> newCppArgs;
bool debug;
bool ice = true; // Needs to be true in order to create default definitions.
+ bool underscore;
string outputFile;
bool ignoreTypeChanges;
bool purgeObjects;
@@ -237,6 +239,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
opts.addOpt("D", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
opts.addOpt("U", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
opts.addOpt("d", "debug");
+ opts.addOpt("", "underscore");
opts.addOpt("o", "", IceUtilInternal::Options::NeedArg);
opts.addOpt("i");
opts.addOpt("p");
@@ -295,6 +298,8 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
}
debug = opts.isSet("debug");
+ underscore = opts.isSet("underscore");
+
if(opts.isSet("o"))
{
outputFile = opts.optArg("o");
@@ -412,14 +417,14 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
return EXIT_FAILURE;
}
- Slice::UnitPtr oldUnit = Slice::Unit::createUnit(true, true, ice);
+ Slice::UnitPtr oldUnit = Slice::Unit::createUnit(true, true, ice, underscore);
FreezeScript::Destroyer<Slice::UnitPtr> oldD(oldUnit);
if(!FreezeScript::parseSlice(appName, oldUnit, oldSlice, oldCppArgs, debug))
{
return EXIT_FAILURE;
}
- Slice::UnitPtr newUnit = Slice::Unit::createUnit(true, true, ice);
+ Slice::UnitPtr newUnit = Slice::Unit::createUnit(true, true, ice, underscore);
FreezeScript::Destroyer<Slice::UnitPtr> newD(newUnit);
if(!FreezeScript::parseSlice(appName, newUnit, newSlice, newCppArgs, debug))
{