The Battle for Wesnoth  1.15.1+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:
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< int > alpha_sort_
 
std::set< int > numeric_sort_
 
std::set< int > id_sort_
 
std::set< int > xp_sort_
 
std::set< int > level_sort_
 
std::map< int, int > redirect_sort_
 
std::map< int, std::vector< int > > pos_sort_
 
int xp_col_
 

Detailed Description

Definition at line 127 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 131 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 94 of file menu.cpp.

References alpha_sort_, id_sort_, level_sort_, numeric_sort_, pos_sort_, redirect, redirect_sort_, and xp_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 48 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 73 of file menu.cpp.

References id_sort_.

Referenced by basic_sorter().

◆ set_level_sort()

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

Definition at line 66 of file menu.cpp.

References level_sort_, and xp_col_.

◆ set_numeric_sort()

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

Definition at line 54 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 88 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 79 of file menu.cpp.

References redirect_sort_.

◆ set_xp_sort()

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

Definition at line 60 of file menu.cpp.

References xp_sort_.

Member Data Documentation

◆ alpha_sort_

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

Definition at line 145 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 145 of file menu.hpp.

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

◆ level_sort_

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

Definition at line 145 of file menu.hpp.

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

◆ numeric_sort_

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

Definition at line 145 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 147 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 146 of file menu.hpp.

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

◆ xp_col_

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

Definition at line 148 of file menu.hpp.

Referenced by less(), and set_level_sort().

◆ xp_sort_

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

Definition at line 145 of file menu.hpp.

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


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