homog2d library
Public Member Functions | List of all members
h2d::detail::Common< FPT > Class Template Reference

Common templated class for all the geometric primitives. More...

#include <homog2d.hpp>

Inheritance diagram for h2d::detail::Common< FPT >:
Inheritance graph
[legend]

Public Member Functions

std::pair< int, int > dsize () const
 Get data size expressed as number of bits for, respectively, mantissa and exponent. More...
 
Dtype dtype () const
 Get numerical data type as a Dtype value, can be stringified with h2d::getString(Dtype) More...
 
template<typename T >
constexpr bool isInside (const Common< T > &) const
 This function is a fallback for all sub-classes that do not provide such a method. More...
 
size_t size () const
 

Detailed Description

template<typename FPT>
class h2d::detail::Common< FPT >

Common templated class for all the geometric primitives.

Member Function Documentation

◆ dsize()

template<typename FPT>
std::pair<int,int> h2d::detail::Common< FPT >::dsize ( ) const
inline

Get data size expressed as number of bits for, respectively, mantissa and exponent.

See also
h2d::dsize(const T&)
1346  {
1347  return priv::impl_dsize( detail::DataFpType<FPT>() );
1348  }
std::pair< int, int > impl_dsize(const detail::DataFpType< T > &)
Implementation of dsize(), returns nb of bits of mantissa and exponent (default implementation) ...
Definition: homog2d.hpp:1142
Here is the caller graph for this function:

◆ dtype()

template<typename FPT>
Dtype h2d::detail::Common< FPT >::dtype ( ) const
inline

Get numerical data type as a Dtype value, can be stringified with h2d::getString(Dtype)

See also
h2d::dtype( const T& )
1339  {
1340  return priv::impl_dtype( detail::DataFpType<FPT>() );
1341  }
Dtype impl_dtype(const detail::DataFpType< float > &)
Definition: homog2d.hpp:1151
Here is the caller graph for this function:

◆ isInside()

template<typename FPT>
template<typename T >
constexpr bool h2d::detail::Common< FPT >::isInside ( const Common< T > &  ) const
inline

This function is a fallback for all sub-classes that do not provide such a method.

It is necessary in a runtime polymorphism context, as we would have build failures if a given type disallows providing such a method (for example, when trying to check if some object is inside an open polyline, which makes no sense).

1358  {
1359  HOMOG2D_START;
1360  return false;
1361  }
#define HOMOG2D_START
Definition: homog2d.hpp:106
Here is the caller graph for this function:

◆ size()

template<typename FPT>
size_t h2d::detail::Common< FPT >::size ( ) const
inline
1376  {
1377  return 0;
1378  }
Here is the caller graph for this function:

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