Blender V5.0
blender::fixed_width_int::IntF< T, S > Struct Template Reference

#include <BLI_fixed_width_int.hh>

Public Member Functions

 IntF ()=default
 IntF (int64_t value)
 IntF (const UIntF< T, S > &value)
 IntF (StringRefNull str, int base=10)
 operator int64_t () const
 operator double () const
 operator float () const
 operator UIntF< T, S > () const

Public Attributes

std::array< T, S > v

Detailed Description

template<typename T, int S>
struct blender::fixed_width_int::IntF< T, S >

A signed fixed width integer. It's mostly the same as UIntF, but signed.

Definition at line 66 of file BLI_fixed_width_int.hh.

Constructor & Destructor Documentation

◆ IntF() [1/4]

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::IntF ( )
default

Allow default construction. Note that the value is not initialized in this case.

Referenced by operator double(), operator float(), operator int64_t(), and operator UIntF< T, S >().

◆ IntF() [2/4]

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::IntF ( int64_t value)
inlineexplicit

Construct from a specific integer.

Definition at line 182 of file BLI_fixed_width_int.hh.

References i, T, and v.

◆ IntF() [3/4]

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::IntF ( const UIntF< T, S > & value)
inlineexplicit

Support casting unsigned to signed fixed-width-int.

Definition at line 196 of file BLI_fixed_width_int.hh.

References v.

◆ IntF() [4/4]

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::IntF ( StringRefNull str,
int base = 10 )
explicit

Construct from a string.

Member Function Documentation

◆ operator double()

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::operator double ( ) const
inlineexplicit

Convert to floating point. This may lose precision.

Definition at line 245 of file BLI_fixed_width_int.hh.

References i, IntF(), blender::fixed_width_int::is_negative(), ldexp, result, T, and v.

◆ operator float()

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::operator float ( ) const
inlineexplicit

Definition at line 261 of file BLI_fixed_width_int.hh.

References float, and IntF().

◆ operator int64_t()

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::operator int64_t ( ) const
inlineexplicit

Convert to a normal integer. Note that this may lose digits.

Definition at line 240 of file BLI_fixed_width_int.hh.

References IntF().

◆ operator UIntF< T, S >()

template<typename T, int S>
blender::fixed_width_int::IntF< T, S >::operator UIntF< T, S > ( ) const
inlineexplicit

Support casting from signed to unsigned fixed-width-int.

Definition at line 266 of file BLI_fixed_width_int.hh.

References IntF(), result, and v.

Member Data Documentation

◆ v


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