diff options
author | Michi Henning <michi@zeroc.com> | 2002-07-03 07:10:52 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2002-07-03 07:10:52 +0000 |
commit | 37c4f8540cace7cbe8b2f8beed1c4b212a6aee7a (patch) | |
tree | 9541623911af6c81c787fabfe1e6a624d085b290 /cpp/src/slice2cpp/Gen.cpp | |
parent | fixes (diff) | |
download | ice-37c4f8540cace7cbe8b2f8beed1c4b212a6aee7a.tar.bz2 ice-37c4f8540cace7cbe8b2f8beed1c4b212a6aee7a.tar.xz ice-37c4f8540cace7cbe8b2f8beed1c4b212a6aee7a.zip |
More work on constant definitions. For C++, code is generated now (not
quite correct yet for enums and long long). The other code generators
(java, xsl, etc.) ignore constants for now. Semantic checks are in
place, apart from enums.
Still more work to do -- this is just an intermediate check-in. (About to
test this on Windows too...)
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 5309d054b4c..8c133248975 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -929,6 +929,13 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) } void +Slice::Gen::TypesVisitor::visitConstDef(const ConstDefPtr& p) +{ + H << sp; + H << nl << "const " << inputTypeToString(p->type()) << " " << p->name() << " = " << p->value() << ";"; +} + +void Slice::Gen::TypesVisitor::emitExceptionBase(const ExceptionPtr& base, const std::string& call) { if(base) |