morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::table::RowOrder Class Reference

A sort chain resolved to key columns: the comparator of a sort. More...

#include <sort.hpp>

Classes

struct  Key
 One resolved key. More...

Public Member Functions

 RowOrder ()=default
 Source order.
 RowOrder (std::vector< Key > keys)
 An order over resolved keys, most significant first.
bool operator() (std::uint32_t left, std::uint32_t right) const
 Whether row a orders before row b. Ties break by source row, so this is a strict total order and every sort is stable.
bool empty () const noexcept
 Whether this is source order.

Detailed Description

A sort chain resolved to key columns: the comparator of a sort.

Holds pointers to key columns it does not own; whoever builds it keeps the columns alive for as long as it is used.

Definition at line 483 of file sort.hpp.

Constructor & Destructor Documentation

◆ RowOrder()

morph::table::RowOrder::RowOrder ( std::vector< Key > keys)
inlineexplicit

An order over resolved keys, most significant first.

Parameters
keysThe keys.

Definition at line 498 of file sort.hpp.

Member Function Documentation

◆ operator()()

bool morph::table::RowOrder::operator() ( std::uint32_t left,
std::uint32_t right ) const
inlinenodiscard

Whether row a orders before row b. Ties break by source row, so this is a strict total order and every sort is stable.

Parameters
leftOne row.
rightAnother row.
Returns
true when left comes first.

Definition at line 505 of file sort.hpp.

◆ empty()

bool morph::table::RowOrder::empty ( ) const
inlinenodiscardnoexcept

Whether this is source order.

Returns
true when no key is set.

Definition at line 516 of file sort.hpp.


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