Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
SortUtils Class Reference

#include <SortUtils.h>

Public Types

typedef std::string(* SortPreparator) (SortAttribute, const SortItem &)
 
typedef bool(* Sorter) (const DatabaseResult &, const DatabaseResult &)
 
typedef bool(* SorterIndirect) (const SortItemPtr &, const SortItemPtr &)
 

Static Public Member Functions

static SORT_METHOD TranslateOldSortMethod (SortBy sortBy, bool ignoreArticle)
 
static SortDescription TranslateOldSortMethod (SORT_METHOD sortBy)
 
static SortBy SortMethodFromString (const std::string &sortMethod)
 
static const std::string & SortMethodToString (SortBy sortMethod)
 
static SortOrder SortOrderFromString (const std::string &sortOrder)
 
static const std::string & SortOrderToString (SortOrder sortOrder)
 
static int GetSortLabel (SortBy sortBy)
 retrieve the label id associated with a sort method for displaying in the UI.
 
static void Sort (SortBy sortBy, SortOrder sortOrder, SortAttribute attributes, DatabaseResults &items, int limitEnd=-1, int limitStart=0)
 
static void Sort (SortBy sortBy, SortOrder sortOrder, SortAttribute attributes, SortItems &items, int limitEnd=-1, int limitStart=0)
 
static void Sort (const SortDescription &sortDescription, DatabaseResults &items)
 
static void Sort (const SortDescription &sortDescription, SortItems &items)
 
static bool SortFromDataset (const SortDescription &sortDescription, const MediaType &mediaType, const std::unique_ptr< dbiplus::Dataset > &dataset, DatabaseResults &results)
 
static void GetFieldsForSQLSort (const MediaType &mediaType, SortBy sortMethod, FieldList &fields)
 
static const FieldsGetFieldsForSorting (SortBy sortBy)
 
static std::string RemoveArticles (const std::string &label)
 

Member Typedef Documentation

◆ Sorter

typedef bool(* SortUtils::Sorter) (const DatabaseResult &, const DatabaseResult &)

◆ SorterIndirect

typedef bool(* SortUtils::SorterIndirect) (const SortItemPtr &, const SortItemPtr &)

◆ SortPreparator

typedef std::string(* SortUtils::SortPreparator) (SortAttribute, const SortItem &)

Member Function Documentation

◆ GetFieldsForSorting()

const Fields & SortUtils::GetFieldsForSorting ( SortBy sortBy)
static

◆ GetFieldsForSQLSort()

void SortUtils::GetFieldsForSQLSort ( const MediaType & mediaType,
SortBy sortMethod,
FieldList & fields )
static

◆ GetSortLabel()

int SortUtils::GetSortLabel ( SortBy sortBy)
static

retrieve the label id associated with a sort method for displaying in the UI.

Parameters
sortBythe sort method in question.
Returns
the label id of the sort method.

◆ RemoveArticles()

std::string SortUtils::RemoveArticles ( const std::string & label)
static

◆ Sort() [1/4]

void SortUtils::Sort ( const SortDescription & sortDescription,
DatabaseResults & items )
static

◆ Sort() [2/4]

void SortUtils::Sort ( const SortDescription & sortDescription,
SortItems & items )
static

◆ Sort() [3/4]

void SortUtils::Sort ( SortBy sortBy,
SortOrder sortOrder,
SortAttribute attributes,
DatabaseResults & items,
int limitEnd = -1,
int limitStart = 0 )
static

◆ Sort() [4/4]

void SortUtils::Sort ( SortBy sortBy,
SortOrder sortOrder,
SortAttribute attributes,
SortItems & items,
int limitEnd = -1,
int limitStart = 0 )
static

◆ SortFromDataset()

bool SortUtils::SortFromDataset ( const SortDescription & sortDescription,
const MediaType & mediaType,
const std::unique_ptr< dbiplus::Dataset > & dataset,
DatabaseResults & results )
static

◆ SortMethodFromString()

SortBy SortUtils::SortMethodFromString ( const std::string & sortMethod)
static

◆ SortMethodToString()

const std::string & SortUtils::SortMethodToString ( SortBy sortMethod)
static

◆ SortOrderFromString()

SortOrder SortUtils::SortOrderFromString ( const std::string & sortOrder)
static

◆ SortOrderToString()

const std::string & SortUtils::SortOrderToString ( SortOrder sortOrder)
static

◆ TranslateOldSortMethod() [1/2]

SortDescription SortUtils::TranslateOldSortMethod ( SORT_METHOD sortBy)
static

◆ TranslateOldSortMethod() [2/2]

SORT_METHOD SortUtils::TranslateOldSortMethod ( SortBy sortBy,
bool ignoreArticle )
static

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