The Battle for Wesnoth  1.17.23+dev
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:

Public Member Functions

 basic_sorter ()
virtual ~basic_sorter ()
basic_sorterset_alpha_sort (int column)
basic_sorterset_numeric_sort (int 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< int > alpha_sort_
std::set< int > numeric_sort_
std::set< int > id_sort_
std::map< int, int > redirect_sort_
std::map< int, std::vector< int > > pos_sort_

Detailed Description

Definition at line 119 of file menu.hpp.

Constructor & Destructor Documentation

◆ basic_sorter()

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

Definition at line 38 of file menu.cpp.

References set_id_sort().

◆ ~basic_sorter()

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

Definition at line 123 of file menu.hpp.

Member Function Documentation

◆ column_sortable()

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

Implements gui::menu::sorter.

Definition at line 81 of file menu.cpp.

References redirect.

◆ less()

bool gui::menu::basic_sorter::less ( int  column,
const item row1,
const item row2 
) const

◆ set_alpha_sort()

menu::basic_sorter & gui::menu::basic_sorter::set_alpha_sort ( int  column)

Definition at line 48 of file menu.cpp.

◆ set_id_sort()

menu::basic_sorter & gui::menu::basic_sorter::set_id_sort ( int  column)

Definition at line 60 of file menu.cpp.

Referenced by basic_sorter().

◆ set_numeric_sort()

menu::basic_sorter & gui::menu::basic_sorter::set_numeric_sort ( int  column)

Definition at line 54 of file menu.cpp.

◆ set_position_sort()

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

Definition at line 75 of file menu.cpp.

◆ set_redirect_sort()

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

Definition at line 66 of file menu.cpp.

Member Data Documentation

◆ alpha_sort_

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

Definition at line 135 of file menu.hpp.

◆ id_sort_

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

Definition at line 135 of file menu.hpp.

◆ numeric_sort_

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

Definition at line 135 of file menu.hpp.

◆ pos_sort_

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

Definition at line 137 of file menu.hpp.

◆ redirect_sort_

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

Definition at line 136 of file menu.hpp.

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