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

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

const T null_value_
 
const T null_value_mapped_
 

Detailed Description

template<typename T>
struct SortAsc< T >

Definition at line 67 of file OtherTestTableFunctions.cpp.

Constructor & Destructor Documentation

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

Definition at line 68 of file OtherTestTableFunctions.cpp.

69  : null_value_(std::numeric_limits<T>::lowest())
70  , 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 71 of file OtherTestTableFunctions.cpp.

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

Definition at line 74 of file OtherTestTableFunctions.cpp.

74  {
75  return val == null_value_ ? null_value_mapped_ : val;
76  }
const T null_value_mapped_
template<typename T >
bool SortAsc< T >::operator() ( const T &  a,
const T &  b 
)
inline

Definition at line 77 of file OtherTestTableFunctions.cpp.

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

Member Data Documentation

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

Definition at line 78 of file OtherTestTableFunctions.cpp.

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

Definition at line 79 of file OtherTestTableFunctions.cpp.


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