OmniSciDB  c1a53651b2
 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

const T null_value_
 
const T null_value_mapped_
 

Detailed Description

template<typename T>
struct SortAsc< T >

Definition at line 752 of file TableFunctionsTesting.hpp.

Constructor & Destructor Documentation

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

Definition at line 753 of file TableFunctionsTesting.hpp.

754  : null_value_(std::numeric_limits<T>::lowest())
755  , 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 756 of file TableFunctionsTesting.hpp.

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

Definition at line 759 of file TableFunctionsTesting.hpp.

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

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

759  {
760  return val == null_value_ ? null_value_mapped_ : val;
761  }
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 762 of file TableFunctionsTesting.hpp.

References SortAsc< T >::mapValue().

762 { return mapValue(a) < mapValue(b); }
constexpr double a
Definition: Utm.h:32
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 763 of file TableFunctionsTesting.hpp.

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

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

Definition at line 764 of file TableFunctionsTesting.hpp.

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


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