![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
#include "SortUtils.h"
#include "LangInfo.h"
#include "URL.h"
#include "Util.h"
#include "utils/CharsetConverter.h"
#include "utils/StringUtils.h"
#include "utils/Variant.h"
#include <algorithm>
Classes | |
struct | sort_map |
Functions | |
std::string | ArrayToString (SortAttribute attributes, const CVariant &variant, const std::string &separator=" / ") |
std::string | ByLabel (SortAttribute attributes, const SortItem &values) |
std::string | ByFile (SortAttribute attributes, const SortItem &values) |
std::string | ByPath (SortAttribute attributes, const SortItem &values) |
std::string | ByLastPlayed (SortAttribute attributes, const SortItem &values) |
std::string | ByPlaycount (SortAttribute attributes, const SortItem &values) |
std::string | ByDate (SortAttribute attributes, const SortItem &values) |
std::string | ByDateAdded (SortAttribute attributes, const SortItem &values) |
std::string | BySize (SortAttribute attributes, const SortItem &values) |
std::string | ByDriveType (SortAttribute attributes, const SortItem &values) |
std::string | ByTitle (SortAttribute attributes, const SortItem &values) |
std::string | ByAlbum (SortAttribute attributes, const SortItem &values) |
std::string | ByAlbumType (SortAttribute attributes, const SortItem &values) |
std::string | ByArtist (SortAttribute attributes, const SortItem &values) |
std::string | ByArtistThenYear (SortAttribute attributes, const SortItem &values) |
std::string | ByTrackNumber (SortAttribute attributes, const SortItem &values) |
std::string | ByTime (SortAttribute attributes, const SortItem &values) |
std::string | ByProgramCount (SortAttribute attributes, const SortItem &values) |
std::string | ByPlaylistOrder (SortAttribute attributes, const SortItem &values) |
std::string | ByGenre (SortAttribute attributes, const SortItem &values) |
std::string | ByCountry (SortAttribute attributes, const SortItem &values) |
std::string | ByYear (SortAttribute attributes, const SortItem &values) |
std::string | BySortTitle (SortAttribute attributes, const SortItem &values) |
std::string | ByRating (SortAttribute attributes, const SortItem &values) |
std::string | ByUserRating (SortAttribute attributes, const SortItem &values) |
std::string | ByVotes (SortAttribute attributes, const SortItem &values) |
std::string | ByTop250 (SortAttribute attributes, const SortItem &values) |
std::string | ByMPAA (SortAttribute attributes, const SortItem &values) |
std::string | ByStudio (SortAttribute attributes, const SortItem &values) |
std::string | ByEpisodeNumber (SortAttribute attributes, const SortItem &values) |
std::string | BySeason (SortAttribute attributes, const SortItem &values) |
std::string | ByNumberOfEpisodes (SortAttribute attributes, const SortItem &values) |
std::string | ByNumberOfWatchedEpisodes (SortAttribute attributes, const SortItem &values) |
std::string | ByTvShowStatus (SortAttribute attributes, const SortItem &values) |
std::string | ByTvShowTitle (SortAttribute attributes, const SortItem &values) |
std::string | ByProductionCode (SortAttribute attributes, const SortItem &values) |
std::string | ByVideoResolution (SortAttribute attributes, const SortItem &values) |
std::string | ByVideoCodec (SortAttribute attributes, const SortItem &values) |
std::string | ByVideoAspectRatio (SortAttribute attributes, const SortItem &values) |
std::string | ByAudioChannels (SortAttribute attributes, const SortItem &values) |
std::string | ByAudioCodec (SortAttribute attributes, const SortItem &values) |
std::string | ByAudioLanguage (SortAttribute attributes, const SortItem &values) |
std::string | BySubtitleLanguage (SortAttribute attributes, const SortItem &values) |
std::string | ByBitrate (SortAttribute attributes, const SortItem &values) |
std::string | ByListeners (SortAttribute attributes, const SortItem &values) |
std::string | ByRandom (SortAttribute attributes, const SortItem &values) |
std::string | ByChannel (SortAttribute attributes, const SortItem &values) |
std::string | ByChannelNumber (SortAttribute attributes, const SortItem &values) |
std::string | ByDateTaken (SortAttribute attributes, const SortItem &values) |
std::string | ByRelevance (SortAttribute attributes, const SortItem &values) |
std::string | ByInstallDate (SortAttribute attributes, const SortItem &values) |
std::string | ByLastUpdated (SortAttribute attributes, const SortItem &values) |
std::string | ByLastUsed (SortAttribute attributes, const SortItem &values) |
bool | preliminarySort (const SortItem &left, const SortItem &right, bool handleFolder, bool &result, std::wstring &labelLeft, std::wstring &labelRight) |
bool | SorterAscending (const SortItem &left, const SortItem &right) |
bool | SorterDescending (const SortItem &left, const SortItem &right) |
bool | SorterIgnoreFoldersAscending (const SortItem &left, const SortItem &right) |
bool | SorterIgnoreFoldersDescending (const SortItem &left, const SortItem &right) |
bool | SorterIndirectAscending (const SortItemPtr &left, const SortItemPtr &right) |
bool | SorterIndirectDescending (const SortItemPtr &left, const SortItemPtr &right) |
bool | SorterIndirectIgnoreFoldersAscending (const SortItemPtr &left, const SortItemPtr &right) |
bool | SorterIndirectIgnoreFoldersDescending (const SortItemPtr &left, const SortItemPtr &right) |
std::map< SortBy, SortUtils::SortPreparator > | fillPreparators () |
std::map< SortBy, Fields > | fillSortingFields () |
template<typename T > | |
T | TypeFromString (const std::map< std::string, T > &typeMap, const std::string &name, const T &defaultType) |
template<typename T > | |
const std::string & | TypeToString (const std::map< std::string, T > &typeMap, const T &value) |
Variables | |
const sort_map | table [] |
const std::map< std::string, SortBy > | sortMethods |
Sort methods to translate string values to enum values. More... | |
const std::map< std::string, SortOrder > | sortOrders |
std::string ArrayToString | ( | SortAttribute | attributes, |
const CVariant & | variant, | ||
const std::string & | separator = " / " |
||
) |
std::string ByAlbum | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByAlbumType | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByArtist | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByArtistThenYear | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByAudioChannels | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByAudioCodec | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByAudioLanguage | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByBitrate | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByChannel | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByChannelNumber | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByCountry | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByDate | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByDateAdded | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByDateTaken | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByDriveType | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByEpisodeNumber | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByFile | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByGenre | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByInstallDate | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByLabel | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByLastPlayed | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByLastUpdated | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByLastUsed | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByListeners | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByMPAA | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByNumberOfEpisodes | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByNumberOfWatchedEpisodes | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByPath | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByPlaycount | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByPlaylistOrder | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByProductionCode | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByProgramCount | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByRandom | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByRating | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByRelevance | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string BySeason | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string BySize | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string BySortTitle | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByStudio | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string BySubtitleLanguage | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByTime | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByTitle | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByTop250 | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByTrackNumber | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByTvShowStatus | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByTvShowTitle | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByUserRating | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByVideoAspectRatio | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByVideoCodec | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByVideoResolution | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByVotes | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::string ByYear | ( | SortAttribute | attributes, |
const SortItem & | values | ||
) |
std::map< SortBy, SortUtils::SortPreparator > fillPreparators | ( | ) |
bool preliminarySort | ( | const SortItem & | left, |
const SortItem & | right, | ||
bool | handleFolder, | ||
bool & | result, | ||
std::wstring & | labelLeft, | ||
std::wstring & | labelRight | ||
) |
bool SorterIndirectAscending | ( | const SortItemPtr & | left, |
const SortItemPtr & | right | ||
) |
bool SorterIndirectDescending | ( | const SortItemPtr & | left, |
const SortItemPtr & | right | ||
) |
bool SorterIndirectIgnoreFoldersAscending | ( | const SortItemPtr & | left, |
const SortItemPtr & | right | ||
) |
bool SorterIndirectIgnoreFoldersDescending | ( | const SortItemPtr & | left, |
const SortItemPtr & | right | ||
) |
T TypeFromString | ( | const std::map< std::string, T > & | typeMap, |
const std::string & | name, | ||
const T & | defaultType | ||
) |
const std::string & TypeToString | ( | const std::map< std::string, T > & | typeMap, |
const T & | value | ||
) |
const std::map<std::string, SortBy> sortMethods |
Sort methods to translate string values to enum values.
const std::map<std::string, SortOrder> sortOrders |
const sort_map table[] |