summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Preprocessor.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2016-08-23 17:28:35 -0700
committerMark Spruiell <mes@zeroc.com>2016-08-23 17:28:35 -0700
commite6cbf802f2977d06854a65036a860740e24d3151 (patch)
tree7e1a19dff8bb864a86da6699d0360c3d703e71c5 /cpp/src/Slice/Preprocessor.cpp
parentSmall .gitignore cleanup (diff)
downloadice-e6cbf802f2977d06854a65036a860740e24d3151.tar.bz2
ice-e6cbf802f2977d06854a65036a860740e24d3151.tar.xz
ice-e6cbf802f2977d06854a65036a860740e24d3151.zip
Major changes in Java:
- Moved existing Java mapping sources to java-compat subdirectory - Added new "Java 8" mapping in java subdirectory - Significant features of Java 8 mapping: - All classes in com.zeroc package (e.g., com.zeroc.Ice.Communicator) - New AMI mapping that uses java.util.concurrent.CompletableFuture - New AMD mapping that uses java.util.concurrent.CompletionStage - New mapping for out parameters - "holder" types have been eliminated - New mapping for optional types that uses JDK classes from java.util (e.g., java.util.Optional) - "TIE" classes are no longer supported or necessary; servant classes now only need to implement a generated interface - Moved IceGrid GUI to new mapping - The "Java Compat" mapping is provided only for backward compatibility to ease migration to Ice 3.7. The Slice compiler supports a new --compat option to generate code for this mapping. However, users are encouraged to migrate to the new mapping as soon as possible.
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 26f4bee7db1..dc7c4abdf77 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -140,7 +140,7 @@ namespace
{
vector<string>
-baseArgs(vector<string> args, bool keepComments, const string& extraArgs, const string& fileName)
+baseArgs(vector<string> args, bool keepComments, const vector<string>& extraArgs, const string& fileName)
{
if(keepComments)
{
@@ -161,10 +161,7 @@ baseArgs(vector<string> args, bool keepComments, const string& extraArgs, const
args.push_back(os.str());
}
- if(!extraArgs.empty())
- {
- args.push_back(extraArgs);
- }
+ copy(extraArgs.begin(), extraArgs.end(), back_inserter(args));
args.push_back(fileName);
return args;
}
@@ -172,7 +169,15 @@ baseArgs(vector<string> args, bool keepComments, const string& extraArgs, const
}
FILE*
-Slice::Preprocessor::preprocess(bool keepComments, const string& extraArgs)
+Slice::Preprocessor::preprocess(bool keepComments, const string& extraArg)
+{
+ vector<string> args;
+ args.push_back(extraArg);
+ return preprocess(keepComments, args);
+}
+
+FILE*
+Slice::Preprocessor::preprocess(bool keepComments, const vector<string>& extraArgs)
{
if(!checkInputFile())
{
@@ -287,7 +292,17 @@ Slice::Preprocessor::preprocess(bool keepComments, const string& extraArgs)
bool
Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, const vector<string>& includePaths,
- const string& extraArgs, const string& cppSourceExt,
+ const string& extraArg, const string& cppSourceExt,
+ const string& optValue)
+{
+ vector<string> extraArgs;
+ extraArgs.push_back(extraArg);
+ return printMakefileDependencies(out, lang, includePaths, extraArgs, cppSourceExt, optValue);
+}
+
+bool
+Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, const vector<string>& includePaths,
+ const vector<string>& extraArgs, const string& cppSourceExt,
const string& optValue)
{
if(!checkInputFile())