The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
gui::menu::basic_sorter Class Reference

#include <menu.hpp>

Inheritance diagram for gui::menu::basic_sorter:
Inheritance graph

Public Member Functions

 basic_sorter ()
 
virtual ~basic_sorter ()
 
basic_sorterset_alpha_sort (int column)
 
basic_sorterset_numeric_sort (int column)
 
basic_sorterset_xp_sort (int column)
 
basic_sorterset_level_sort (int level_column, int xp_column)
 
basic_sorterset_id_sort (int column)
 
basic_sorterset_redirect_sort (int column, int to)
 
basic_sorterset_position_sort (int column, const std::vector< int > &pos)
 
- Public Member Functions inherited from gui::menu::sorter
virtual ~sorter ()
 

Protected Member Functions

virtual bool column_sortable (int column) const
 
virtual bool less (int column, const item &row1, const item &row2) const
 

Private Attributes

std::set< intalpha_sort_
 
std::set< intnumeric_sort_
 
std::set< intid_sort_
 
std::set< intxp_sort_
 
std::set< intlevel_sort_
 
std::map< int, intredirect_sort_
 
std::map< int, std::vector< int > > pos_sort_
 
int xp_col_
 

Detailed Description

Definition at line 142 of file menu.hpp.

Constructor & Destructor Documentation

gui::menu::basic_sorter::basic_sorter ( )

Definition at line 35 of file menu.cpp.

References set_id_sort().

virtual gui::menu::basic_sorter::~basic_sorter ( )
inlinevirtual

Definition at line 146 of file menu.hpp.

Member Function Documentation

bool gui::menu::basic_sorter::column_sortable ( int  column) const
protectedvirtual

Implements gui::menu::sorter.

Reimplemented in mp::lobby::lobby_sorter.

Definition at line 94 of file menu.cpp.

bool gui::menu::basic_sorter::less ( int  column,
const item row1,
const item row2 
) const
protectedvirtual
menu::basic_sorter & gui::menu::basic_sorter::set_alpha_sort ( int  column)
menu::basic_sorter & gui::menu::basic_sorter::set_id_sort ( int  column)

Definition at line 73 of file menu.cpp.

Referenced by basic_sorter().

menu::basic_sorter & gui::menu::basic_sorter::set_level_sort ( int  level_column,
int  xp_column 
)

Definition at line 66 of file menu.cpp.

Referenced by dialogs::recall_dialog(), and dialogs::show_unit_list().

menu::basic_sorter & gui::menu::basic_sorter::set_numeric_sort ( int  column)
menu::basic_sorter & gui::menu::basic_sorter::set_position_sort ( int  column,
const std::vector< int > &  pos 
)

Definition at line 88 of file menu.cpp.

References pos.

menu::basic_sorter & gui::menu::basic_sorter::set_redirect_sort ( int  column,
int  to 
)
menu::basic_sorter & gui::menu::basic_sorter::set_xp_sort ( int  column)

Definition at line 60 of file menu.cpp.

Referenced by dialogs::recall_dialog(), and dialogs::show_unit_list().

Member Data Documentation

std::set<int> gui::menu::basic_sorter::alpha_sort_
private

Definition at line 160 of file menu.hpp.

std::set<int> gui::menu::basic_sorter::id_sort_
private

Definition at line 160 of file menu.hpp.

std::set<int> gui::menu::basic_sorter::level_sort_
private

Definition at line 160 of file menu.hpp.

std::set<int> gui::menu::basic_sorter::numeric_sort_
private

Definition at line 160 of file menu.hpp.

std::map<int,std::vector<int> > gui::menu::basic_sorter::pos_sort_
private

Definition at line 162 of file menu.hpp.

std::map<int,int> gui::menu::basic_sorter::redirect_sort_
private

Definition at line 161 of file menu.hpp.

int gui::menu::basic_sorter::xp_col_
private

Definition at line 163 of file menu.hpp.

std::set<int> gui::menu::basic_sorter::xp_sort_
private

Definition at line 160 of file menu.hpp.


The documentation for this class was generated from the following files: