OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SortAsc< T > Struct Template Reference

#include <TableFunctionsTesting.hpp>

Public Member Functions

 SortAsc (const bool nulls_last)
 
mapValue (const T &val)
 
bool operator() (const T &a, const T &b)
 

Static Public Member Functions

static T map_null_value (const bool nulls_last)
 

Public Attributes

constnull_value_
 
constnull_value_mapped_
 

Detailed Description

template<typename T>
struct SortAsc< T >

Definition at line 568 of file TableFunctionsTesting.hpp.

Constructor & Destructor Documentation

template<typename T >
SortAsc< T >::SortAsc ( const bool  nulls_last)
inline

Definition at line 569 of file TableFunctionsTesting.hpp.

570  : null_value_(std::numeric_limits<T>::lowest())
571  , null_value_mapped_(map_null_value(nulls_last)) {}
static T map_null_value(const bool nulls_last)
const T null_value_mapped_

Member Function Documentation

template<typename T >
static T SortAsc< T >::map_null_value ( const bool  nulls_last)
inlinestatic

Definition at line 572 of file TableFunctionsTesting.hpp.

572  {
573  return nulls_last ? std::numeric_limits<T>::max() : std::numeric_limits<T>::lowest();
574  }
template<typename T >
T SortAsc< T >::mapValue ( const T &  val)
inline

Definition at line 575 of file TableFunctionsTesting.hpp.

References SortAsc< T >::null_value_, and SortAsc< T >::null_value_mapped_.

Referenced by SortAsc< T >::operator()().

575  {
576  return val == null_value_ ? null_value_mapped_ : val;
577  }
const T null_value_mapped_

+ Here is the caller graph for this function:

template<typename T >
bool SortAsc< T >::operator() ( const T &  a,
const T &  b 
)
inline

Definition at line 578 of file TableFunctionsTesting.hpp.

References SortAsc< T >::mapValue().

578 { return mapValue(a) < mapValue(b); }
constexpr double a
Definition: Utm.h:33
T mapValue(const T &val)

+ Here is the call graph for this function:

Member Data Documentation

template<typename T >
const T SortAsc< T >::null_value_

Definition at line 579 of file TableFunctionsTesting.hpp.

Referenced by SortAsc< T >::mapValue().

template<typename T >
const T SortAsc< T >::null_value_mapped_

Definition at line 580 of file TableFunctionsTesting.hpp.

Referenced by SortAsc< T >::mapValue().


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