From f5d976082495fef56c7ab64548238c4e3110d03c Mon Sep 17 00:00:00 2001 From: alberth Date: Fri, 3 Jul 2009 19:34:28 +0000 Subject: [PATCH] (svn r16730) -Doc: Added some missing docs (most notably the class/struct docs) to GUIList template. --- src/sortlist_type.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/sortlist_type.h b/src/sortlist_type.h index 101d111526..9d89c9e56c 100644 --- a/src/sortlist_type.h +++ b/src/sortlist_type.h @@ -12,6 +12,7 @@ #include "core/smallvec_type.hpp" #include "date_type.h" +/** Flags of the sort list. */ enum SortListFlags { VL_NONE = 0, ///< no sort VL_DESC = 1 << 0, ///< sort descending or ascending @@ -23,20 +24,27 @@ enum SortListFlags { }; DECLARE_ENUM_AS_BIT_SET(SortListFlags); +/** Data structure describing how to show the list (what sort direction and criterium). */ struct Listing { bool order; ///< Ascending/descending byte criteria; ///< Sorting criteria }; +/** Data structure describing what to show in the list (filter criteria). */ struct Filtering { bool state; ///< Filter on/off byte criteria; ///< Filtering criteria }; +/** + * List template of 'things' \p T to sort in a GUI. + * @tparam T Type of data stored in the list to represent each item. + * @tparam F Type of data fed as additional value to the filter function. @see FilterFunction + */ template class GUIList : public SmallVector { public: - typedef int CDECL SortFunction(const T*, const T*); - typedef bool CDECL FilterFunction(const T*, F); + typedef int CDECL SortFunction(const T*, const T*); ///< Signature of sort function. + typedef bool CDECL FilterFunction(const T*, F); ///< Signature of filter function. protected: SortFunction * const *sort_func_list; ///< the sort criteria functions @@ -274,7 +282,7 @@ public: } /** - * Overload of Sort() + * Overload of #Sort(SortFunction *compare) * Overloaded to reduce external code * * @return true if the list sequence has been altered