LibreOffice Module o3tl (master) 1
Classes | Functions | Variables
o3tl::detail Namespace Reference

Classes

struct  IsDerivedReference
 
struct  IsDerivedReference< css::uno::Reference< css::uno::XInterface > >
 
struct  IsDerivedReference< css::uno::Reference< T > >
 
struct  IsUnoSequenceType
 
struct  IsUnoSequenceType< cppu::UnoSequenceType< T > >
 
class  lru_map_base
 
class  lru_map_base< void >
 
struct  m_and_d
 
struct  Optional
 
struct  Optional< bool >
 
struct  Optional< css::uno::Reference< css::uno::XInterface > >
 
struct  Optional< css::uno::Reference< T > >
 
struct  Optional< double >
 
struct  Optional< float >
 
struct  Optional< sal_Int16 >
 
struct  Optional< sal_Int32 >
 
struct  Optional< sal_Int64 >
 
struct  Optional< sal_Int8 >
 
struct  Optional< sal_uInt16 >
 
struct  Optional< sal_uInt32 >
 
struct  Optional< sal_uInt64 >
 
struct  Optional< void >
 
class  simple_pool_impl
 
struct  struct_from_value
 
struct  Void
 

Functions

template<typename T >
std::optional< T const > tryGetConverted (css::uno::Any const &any)
 
template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_signed< T1 >::value &&std::is_signed< T2 >::value, bool >::type isInRange (T2 value)
 
template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_signed< T1 >::value &&std::is_unsigned< T2 >::value, bool >::type isInRange (T2 value)
 
template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_unsigned< T1 >::value &&std::is_signed< T2 >::value, bool >::type isInRange (T2 value)
 
template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_unsigned< T1 >::value &&std::is_unsigned< T2 >::value, bool >::type isInRange (T2 value)
 
template<typename T >
constexpr std::enable_if< std::is_signed< T >::value, bool >::type isNonNegative (T value)
 
template<typename T >
constexpr std::enable_if< std::is_unsigned< T >::value, bool >::type isNonNegative (T)
 
template<typename I >
constexpr bool isBetween (I n, sal_Int64 min, sal_Int64 max)
 
template<typename I , std::enable_if_t< std::is_integral_v< I >, int > = 0>
constexpr sal_Int64 MulDiv (I n, sal_Int64 m, sal_Int64 d)
 
template<typename F , std::enable_if_t< std::is_floating_point_v< F >, int > = 0>
constexpr double MulDiv (F f, sal_Int64 m, sal_Int64 d)
 
template<typename I , std::enable_if_t< std::is_integral_v< I >, int > = 0>
constexpr sal_Int64 MulDiv (I n, sal_Int64 m, sal_Int64 d, bool &bOverflow, sal_Int64 nDefault)
 
template<typename I , std::enable_if_t< std::is_integral_v< I >, int > = 0>
constexpr sal_Int64 MulDivSaturate (I n, sal_Int64 m, sal_Int64 d)
 
template<class M , class N >
constexpr std::common_type_t< M, Nasserting_gcd (M m, N n)
 
template<int N>
constexpr auto prepareMDArray (const m_and_d(&mdBase)[N])
 
template<typename U >
constexpr sal_Int64 md (U i, U)
 
constexpr sal_Int64 md (Length i, Length j)
 

Variables

constexpr m_and_d mdBaseLen []
 
constexpr auto aLengthMDArray = prepareMDArray(mdBaseLen)
 

Function Documentation

◆ asserting_gcd()

template<class M , class N >
constexpr std::common_type_t< M, N > o3tl::detail::asserting_gcd ( m,
N  n 
)
constexpr

Definition at line 119 of file unit_conversion.hxx.

References m, and n.

Referenced by prepareMDArray().

◆ isBetween()

template<typename I >
constexpr bool o3tl::detail::isBetween ( n,
sal_Int64  min,
sal_Int64  max 
)
constexpr

Definition at line 62 of file unit_conversion.hxx.

References max, min(), and n.

Referenced by MulDiv(), and MulDivSaturate().

◆ isInRange() [1/4]

template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_signed< T1 >::value &&std::is_signed< T2 >::value, bool >::type o3tl::detail::isInRange ( T2  value)
constexpr

Definition at line 38 of file strong_int.hxx.

References value.

◆ isInRange() [2/4]

template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_signed< T1 >::value &&std::is_unsigned< T2 >::value, bool >::type o3tl::detail::isInRange ( T2  value)
constexpr

Definition at line 46 of file strong_int.hxx.

References value.

◆ isInRange() [3/4]

template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_unsigned< T1 >::value &&std::is_signed< T2 >::value, bool >::type o3tl::detail::isInRange ( T2  value)
constexpr

Definition at line 55 of file strong_int.hxx.

References value.

◆ isInRange() [4/4]

template<typename T1 , typename T2 >
constexpr std::enable_if< std::is_unsigned< T1 >::value &&std::is_unsigned< T2 >::value, bool >::type o3tl::detail::isInRange ( T2  value)
constexpr

Definition at line 64 of file strong_int.hxx.

◆ isNonNegative() [1/2]

template<typename T >
constexpr std::enable_if< std::is_signed< T >::value, bool >::type o3tl::detail::isNonNegative ( value)
constexpr

◆ isNonNegative() [2/2]

template<typename T >
constexpr std::enable_if< std::is_unsigned< T >::value, bool >::type o3tl::detail::isNonNegative ( )
constexpr

Definition at line 42 of file typed_flags_set.hxx.

◆ md() [1/2]

constexpr sal_Int64 o3tl::detail::md ( Length  i,
Length  j 
)
constexpr

Definition at line 198 of file unit_conversion.hxx.

References aLengthMDArray, i, and o3tl::make_unsigned().

◆ md() [2/2]

template<typename U >
constexpr sal_Int64 o3tl::detail::md ( i,
 
)
constexpr

Definition at line 162 of file unit_conversion.hxx.

References i.

Referenced by o3tl::convert(), and o3tl::convertSaturate().

◆ MulDiv() [1/3]

template<typename F , std::enable_if_t< std::is_floating_point_v< F >, int > = 0>
constexpr double o3tl::detail::MulDiv ( f,
sal_Int64  m,
sal_Int64  d 
)
constexpr

Definition at line 80 of file unit_conversion.hxx.

References d, and m.

◆ MulDiv() [2/3]

template<typename I , std::enable_if_t< std::is_integral_v< I >, int > = 0>
constexpr sal_Int64 o3tl::detail::MulDiv ( n,
sal_Int64  m,
sal_Int64  d 
)
constexpr

Definition at line 73 of file unit_conversion.hxx.

References d, isBetween(), m, n, SAL_MAX_INT64, and SAL_MIN_INT64.

Referenced by o3tl::convert(), MulDiv(), and MulDivSaturate().

◆ MulDiv() [3/3]

template<typename I , std::enable_if_t< std::is_integral_v< I >, int > = 0>
constexpr sal_Int64 o3tl::detail::MulDiv ( n,
sal_Int64  m,
sal_Int64  d,
bool &  bOverflow,
sal_Int64  nDefault 
)
constexpr

Definition at line 87 of file unit_conversion.hxx.

References d, isBetween(), m, MulDiv(), n, SAL_MAX_INT64, and SAL_MIN_INT64.

◆ MulDivSaturate()

template<typename I , std::enable_if_t< std::is_integral_v< I >, int > = 0>
constexpr sal_Int64 o3tl::detail::MulDivSaturate ( n,
sal_Int64  m,
sal_Int64  d 
)
constexpr

Definition at line 99 of file unit_conversion.hxx.

References d, isBetween(), m, MulDiv(), n, SAL_MAX_INT64, and SAL_MIN_INT64.

Referenced by o3tl::convertSaturate().

◆ prepareMDArray()

template<int N>
constexpr auto o3tl::detail::prepareMDArray ( const m_and_d(&)  mdBase[N])
constexpr

Definition at line 142 of file unit_conversion.hxx.

References a, asserting_gcd(), d, i, m, N, and SAL_MAX_INT64.

◆ tryGetConverted()

template<typename T >
std::optional< T const > o3tl::detail::tryGetConverted ( css::uno::Any const &  any)
inline

Definition at line 88 of file any.hxx.

References any, and v.

Variable Documentation

◆ aLengthMDArray

constexpr auto o3tl::detail::aLengthMDArray = prepareMDArray(mdBaseLen)
constexpr

Definition at line 195 of file unit_conversion.hxx.

Referenced by md().

◆ mdBaseLen

constexpr m_and_d o3tl::detail::mdBaseLen[]
constexpr
Initial value:
= {
{ 1, 100 },
{ 1, 10 },
{ 1, 1 },
{ 10, 1 },
{ 1000, 1 },
{ 1000000, 1 },
{ 1, 36000 },
{ 254, 10 * 1440 },
{ 254, 10 * 72 },
{ 254, 10 * 6 },
{ 254, 10000 },
{ 254, 1000 },
{ 254, 100 },
{ 254, 10 },
{ 254 * 12, 10 },
{ 254 * 12 * 5280, 10 },
{ 254, 10 * 576 },
{ 254 * 15, 10 * 1440 },
{ 254 * 210, 10 * 1440 },
{ 254 * 312, 10 * 1440 },
}

Definition at line 169 of file unit_conversion.hxx.