The Battle for Wesnoth  1.15.12+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 126 of file menu.hpp.

Constructor & Destructor Documentation

◆ basic_sorter()

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

Definition at line 35 of file menu.cpp.

References set_id_sort().

◆ ~basic_sorter()

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

Definition at line 130 of file menu.hpp.

Member Function Documentation

◆ column_sortable()

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

Implements gui::menu::sorter.

Definition at line 78 of file menu.cpp.

References alpha_sort_, id_sort_, numeric_sort_, pos_sort_, redirect, and redirect_sort_.

◆ less()

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

◆ set_alpha_sort()

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

Definition at line 45 of file menu.cpp.

References alpha_sort_.

◆ set_id_sort()

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

Definition at line 57 of file menu.cpp.

References id_sort_.

Referenced by basic_sorter().

◆ set_numeric_sort()

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

Definition at line 51 of file menu.cpp.

References numeric_sort_.

◆ set_position_sort()

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

Definition at line 72 of file menu.cpp.

References pos_sort_.

◆ set_redirect_sort()

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

Definition at line 63 of file menu.cpp.

References redirect_sort_.

Member Data Documentation

◆ alpha_sort_

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

Definition at line 142 of file menu.hpp.

Referenced by column_sortable(), less(), and set_alpha_sort().

◆ id_sort_

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

Definition at line 142 of file menu.hpp.

Referenced by column_sortable(), less(), and set_id_sort().

◆ numeric_sort_

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

Definition at line 142 of file menu.hpp.

Referenced by column_sortable(), less(), and set_numeric_sort().

◆ pos_sort_

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

Definition at line 144 of file menu.hpp.

Referenced by column_sortable(), less(), and set_position_sort().

◆ redirect_sort_

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

Definition at line 143 of file menu.hpp.

Referenced by column_sortable(), less(), and set_redirect_sort().


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