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 > >
 
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<int N>
constexpr auto prepareMDArray (const m_and_d(&mdBase)[N])
 
constexpr sal_Int64 md (Length i, Length j)
 

Variables

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

Function Documentation

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

Definition at line 62 of file unit_conversion.hxx.

References assert().

Referenced by MulDiv(), and MulDivSaturate().

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)

Definition at line 38 of file strong_int.hxx.

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)

Definition at line 46 of file strong_int.hxx.

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)

Definition at line 55 of file strong_int.hxx.

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)

Definition at line 64 of file strong_int.hxx.

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

Definition at line 42 of file typed_flags_set.hxx.

constexpr sal_Int64 o3tl::detail::md ( Length  i,
Length  j 
)
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 
)

Definition at line 73 of file unit_conversion.hxx.

References assert(), isBetween(), SAL_MAX_INT64, and SAL_MIN_INT64.

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

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 
)

Definition at line 80 of file unit_conversion.hxx.

References assert().

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 
)

Definition at line 87 of file unit_conversion.hxx.

References isBetween(), MulDiv(), SAL_MAX_INT64, and SAL_MIN_INT64.

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 
)

Definition at line 99 of file unit_conversion.hxx.

References isBetween(), MulDiv(), SAL_MAX_INT64, and SAL_MIN_INT64.

Referenced by o3tl::convertSaturate().

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

Definition at line 126 of file unit_conversion.hxx.

References a, assert(), d, i, m, and SAL_MAX_INT64.

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 v.

Variable Documentation

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

Definition at line 176 of file unit_conversion.hxx.

constexpr m_and_d o3tl::detail::mdBaseLen[]
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 150 of file unit_conversion.hxx.