diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-06-27 12:41:43 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-06-27 12:41:43 +0000 |
commit | 45df96fd79266467f69dac645175c81230728e68 (patch) | |
tree | 39aa670d8ca03bd351f31879c1522b7adf3c23ad /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | Fixed build (diff) | |
download | ice-45df96fd79266467f69dac645175c81230728e68.tar.bz2 ice-45df96fd79266467f69dac645175c81230728e68.tar.xz ice-45df96fd79266467f69dac645175c81230728e68.zip |
Fixed Ice-E headers
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index adf24fd7267..12e79879706 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -13,6 +13,12 @@ using namespace std; using namespace Slice; using namespace IceUtil; +// +// The Ice-E version. +// +#define ICEE_STRING_VERSION "1.0.0" // "A.B.C", with A=major, B=minor, C=patch +#define ICEE_INT_VERSION 10000 // AABBCC, with AA=major, BB=minor, CC=patch + char Slice::ToIfdef::operator()(char c) { @@ -68,7 +74,7 @@ Slice::changeInclude(const string& orig, const vector<string>& includePaths) } void -Slice::printHeader(Output& out) +Slice::printHeader(Output& out, bool icee) { static const char* header = "// **********************************************************************\n" @@ -82,18 +88,41 @@ Slice::printHeader(Output& out) ; out << header; - out << "\n// Ice version " << ICE_STRING_VERSION; + if(icee) + { + out << "\n// Ice-E version " << ICEE_STRING_VERSION; + } + else + { + out << "\n// Ice version " << ICE_STRING_VERSION; + } } void -Slice::printVersionCheck(Output& out) +Slice::printVersionCheck(Output& out, bool icee) { out << "\n"; out << "\n#ifndef ICE_IGNORE_VERSION"; - out << "\n# if ICE_INT_VERSION / 100 != " << ICE_INT_VERSION / 100; + out << "\n# if ICE_INT_VERSION / 100 != "; + if(icee) + { + out << ICEE_INT_VERSION / 100; + } + else + { + out << ICE_INT_VERSION / 100; + } out << "\n# error Ice version mismatch!"; out << "\n# endif"; - out << "\n# if ICE_INT_VERSION % 100 < " << ICE_INT_VERSION % 100; + out << "\n# if ICE_INT_VERSION % 100 < "; + if(icee) + { + out << ICEE_INT_VERSION % 100; + } + else + { + out << ICE_INT_VERSION % 100; + } out << "\n# error Ice patch level mismatch!"; out << "\n# endif"; out << "\n#endif"; |