diff options
author | Michi Henning <michi@zeroc.com> | 2003-02-24 05:42:45 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-02-24 05:42:45 +0000 |
commit | 3698dcb3b4e4cf21e25fe186847f27a4ef79f04b (patch) | |
tree | 95dee16344eb6e193eed69e2da71deb25cd345c2 /cpp/src/slice2cpp/Gen.cpp | |
parent | qualify all Xerces types to avoid conflict with VC7 (diff) | |
download | ice-3698dcb3b4e4cf21e25fe186847f27a4ef79f04b.tar.bz2 ice-3698dcb3b4e4cf21e25fe186847f27a4ef79f04b.tar.xz ice-3698dcb3b4e4cf21e25fe186847f27a4ef79f04b.zip |
Added --header-ext and --source-ext command-line options to slice2cpp and
slice2freeze.
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 4da25e138b0..6d7fc1b9cec 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -24,9 +24,12 @@ using namespace std; using namespace Slice; using namespace IceUtil; -Slice::Gen::Gen(const string& name, const string& base, const string& include, const vector<string>& includePaths, +Slice::Gen::Gen(const string& name, const string& base, const string& headerExtension, + const string& sourceExtension, const string& include, const vector<string>& includePaths, const string& dllExport, const string& dir, bool imp) : _base(base), + _headerExtension(headerExtension), + _sourceExtension(sourceExtension), _include(include), _includePaths(includePaths), _dllExport(dllExport), @@ -48,8 +51,8 @@ Slice::Gen::Gen(const string& name, const string& base, const string& include, c if(_impl) { - string fileImplH = _base + "I.h"; - string fileImplC = _base + "I.cpp"; + string fileImplH = _base + "I." + _headerExtension; + string fileImplC = _base + "I." + _sourceExtension; if(!dir.empty()) { fileImplH = dir + '/' + fileImplH; @@ -93,8 +96,8 @@ Slice::Gen::Gen(const string& name, const string& base, const string& include, c implH << '\n'; } - string fileH = _base + ".h"; - string fileC = _base + ".cpp"; + string fileH = _base + "." + _headerExtension; + string fileC = _base + "." + _sourceExtension; if(!dir.empty()) { fileH = dir + '/' + fileH; @@ -165,7 +168,7 @@ Slice::Gen::generate(const UnitPtr& unit) { C << _include << '/'; } - C << _base << ".h>"; + C << _base << "." << _headerExtension << ">"; H << "\n#include <Ice/LocalObjectF.h>"; H << "\n#include <Ice/ProxyF.h>"; |