[Doxygen-develop] PATCH: class-list order
Brought to you by:
dimitri
From: Boaz K. <boa...@ya...> - 2003-11-04 03:38:18
|
Consider this scenario: /// Proj namespace PROJ { /// Foo namespace FOO { /// Class %A class A {}; /// Class %C class C {}; } /// Bar namespace BAR { /// Class %B class B {}; /// Class %D class D {}; } } Currently, classes in the Class List are sorted by class name, ignoring namespaces: PROJ::FOO::A PROJ::BAR::B PROJ::FOO::C PROJ::BAR::D I'd like classes (compounds) to be sorted by fully qualified scoped names: PROJ::BAR::B PROJ::BAR::D PROJ::FOO::A PROJ::FOO::C This little example may seem silly, but it's a simplification of real projects, where namespaces encapsulate independent components -- packages or modules if you like; in these projects the current sort order can be confusing. The attached patch introduces a new configuration option SORT_BY_SCOPED_NAMES which, if enabled, sorts the class-list based on fully-qualified scoped names. Another configuration option CASE_SENSITIVE_SORT controls whether the sorting of the class-list is case-sensitive or not. The default values of both options preserve the current behavior. Notes: 1) This patch changes the way the global class list (Doxygen::classSDict) is sorted; it could be that this might affect other things I wasn't aware of (i.e that it introduces bugs ;-(); if it does, please let me know. 2) The patch changes only the class-list sort order; it doesn't affect the alphabetical list or other lists -- this addresses my own project's needs; It could be that more general settings regarding sorting criteria might be helpful; let me know what you think. -- Boaz __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |