summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2006-02-14 07:02:17 +0000
committerMichi Henning <michi@zeroc.com>2006-02-14 07:02:17 +0000
commit9f9fd99dcf435f9a9fe11941234b7ac2d1d2744a (patch)
treeca70b78314e68852192334df5ec9d490b14b548a /cpp/src/Slice/Parser.cpp
parentChanged order of base-class constructor calls for one-shot constructor. (diff)
downloadice-9f9fd99dcf435f9a9fe11941234b7ac2d1d2744a.tar.bz2
ice-9f9fd99dcf435f9a9fe11941234b7ac2d1d2744a.tar.xz
ice-9f9fd99dcf435f9a9fe11941234b7ac2d1d2744a.zip
Added --sort-fields to slice2docbook.
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 3f49a5d84a3..c36bbd38cee 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1756,13 +1756,22 @@ Slice::Container::sort()
}
void
-Slice::Container::sortContents()
+Slice::Container::sortContents(bool sortFields)
{
for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)
{
ContainerPtr container = ContainerPtr::dynamicCast(*p);
if(container)
{
+ if(!sortFields)
+ {
+ if(StructPtr::dynamicCast(container) ||
+ ClassDefPtr::dynamicCast(container) ||
+ ExceptionPtr::dynamicCast(container))
+ {
+ continue;
+ }
+ }
//
// Don't sort operation definitions, otherwise parameters are shown in the
// wrong order in the synopsis.
@@ -1771,7 +1780,7 @@ Slice::Container::sortContents()
{
container->sort();
}
- container->sortContents();
+ container->sortContents(sortFields);
}
}
}