summaryrefslogtreecommitdiff
path: root/cpp/src/FreezeScript
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/FreezeScript')
-rwxr-xr-xcpp/src/FreezeScript/DumpDB.cpp9
-rwxr-xr-xcpp/src/FreezeScript/transformdb.cpp9
2 files changed, 14 insertions, 4 deletions
diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp
index f5ab1653de3..fca6163b4a3 100755
--- a/cpp/src/FreezeScript/DumpDB.cpp
+++ b/cpp/src/FreezeScript/DumpDB.cpp
@@ -93,7 +93,8 @@ usage(const string& n)
"-UNAME Remove any definition for NAME.\n"
"-IDIR Put DIR in the include file search path.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only)\n"
+ "--ice Permit `Ice' prefix (for building Ice source code only).\n"
+ "--underscore Permit underscores in Slice identifiers.\n"
"-o FILE Output sample descriptors into the file FILE.\n"
"-f FILE Execute the descriptors in the file FILE.\n"
"--load SLICE Load Slice definitions from the file SLICE.\n"
@@ -128,6 +129,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
vector<string> cppArgs;
bool debug;
bool ice = true; // Needs to be true in order to create default definitions.
+ bool underscore;
string outputFile;
string inputFile;
vector<string> slice;
@@ -145,6 +147,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
+ opts.addOpt("", "underscore");
opts.addOpt("o", "", IceUtilInternal::Options::NeedArg);
opts.addOpt("f", "", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "load", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
@@ -258,6 +261,8 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
// No need to set --ice option here -- it is always true.
+ underscore = opts.isSet("underscore");
+
if(opts.isSet("o"))
{
outputFile = opts.optArg("o");
@@ -314,7 +319,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
return EXIT_FAILURE;
}
- Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice);
+ Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice, underscore);
FreezeScript::Destroyer<Slice::UnitPtr> unitD(unit);
if(!FreezeScript::parseSlice(appName, unit, slice, cppArgs, debug))
{
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))
{