diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-12-21 15:25:37 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-12-21 15:25:37 -0500 |
commit | e099cd4fd77c718f9c241ad609f5aa7a80627ba8 (patch) | |
tree | 998305e426f74429b00122dcdc4f839e2f97ade5 /cpp/src/slice2html/Gen.cpp | |
parent | IceUtil cleanup (first commit) (diff) | |
parent | Fix bug 2520: Test suite unsets ICE_CONFIG to avoid configuration conflicts (diff) | |
download | ice-e099cd4fd77c718f9c241ad609f5aa7a80627ba8.tar.bz2 ice-e099cd4fd77c718f9c241ad609f5aa7a80627ba8.tar.xz ice-e099cd4fd77c718f9c241ad609f5aa7a80627ba8.zip |
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Conflicts:
cpp/src/Slice/VbUtil.cpp
Diffstat (limited to 'cpp/src/slice2html/Gen.cpp')
-rw-r--r-- | cpp/src/slice2html/Gen.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 93e97489b4f..467257c628c 100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -2107,6 +2107,29 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) assert(_out.currIndent() == indent); + ConstList consts = p->consts(); + + if(!consts.empty()) + { + start("h2"); + _out << "Constant Index"; + end(); + start("dl"); + for(ConstList::const_iterator q = consts.begin(); q != consts.end(); ++q) + { + start("dt", "Symbol"); + _out << toString(*q, p, false, true); + end(); + start("dd"); + string metadata; + printSummary(*q, p, (*q)->findMetaData("deprecate", metadata)); + end(); + } + end(); + } + + assert(_out.currIndent() == indent); + EnumList enums = p->enums(); if(!enums.empty()) @@ -2205,6 +2228,46 @@ Slice::ModuleGenerator::visitContainer(const ContainerPtr& p) end(); } } + + if(!consts.empty()) + { + start("h2"); + _out << "Constants"; + end(); + for(ConstList::const_iterator q = consts.begin(); q != consts.end(); ++q) + { + start("dl"); + start("dt"); + start("span", "Synopsis"); + _out << "const " << toString((*q)->type(), p, false, true) << " " << toString(*q, p) << " = "; + if(EnumPtr::dynamicCast((*q)->type())) + { + _out << toString((*q)->value(), p, false, true); + } + else + { + _out << (*q)->literal(); + } + _out << ";"; + end(); + end(); + + start("dd"); + string metadata, deprecateReason; + if((*q)->findMetaData("deprecate", metadata)) + { + deprecateReason = "This type is deprecated."; + if(metadata.find("deprecate:") == 0 && metadata.size() > 10) + { + deprecateReason = metadata.substr(10); + } + } + + printComment(*q, p, deprecateReason, true); + end(); + end(); + } + } } Slice::ExceptionGenerator::ExceptionGenerator(XMLOutput& o, const Files& files) |