ARB
Classes | Macros | Functions
arbtools.h File Reference
#include <new>
#include <cxxforward.h>
#include <cmath>
Include dependency graph for arbtools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Noncopyable
 
class  RefPtr< T >
 
class  isBelow< T >
 
class  isAbove< T >
 
class  LocallyModify< T >
 
struct  different_types< T, U >
 
struct  disallow_type< T, U >
 
class  StrictlyAliased_BasePtrRef< DERIVED, BASE >
 

Macros

#define INPLACE_RECONSTRUCT(type, this)
 
#define INPLACE_COPY_RECONSTRUCT(type, this, other)
 
#define DECLARE_ASSIGNMENT_OPERATOR(T)
 
#define DEFINE_NAMED_ITERATORS(type, name)
 
#define DEFINE_ITERATORS(type)   DEFINE_NAMED_ITERATORS(type,type)
 
#define CASTSIG(sig, cb)   ((sig)((void*)(cb)))
 

Functions

template<typename T >
CONSTEXPR_INLINE bool is_nan (const T &n)
 
template<typename T >
CONSTEXPR_INLINE bool is_nan_or_inf (const T &n)
 
template<typename T >
CONSTEXPR_INLINE bool is_normal (const T &n)
 
template<typename T >
CONSTEXPR_INLINE bool is_inf (const T &n)
 
CONSTEXPR_INLINE int double_diff_2_cmp (const double d)
 
CONSTEXPR_INLINE int double_cmp (const double d1, const double d2)
 
CONSTEXPR_INLINE int float_diff_2_cmp (const float f)
 
CONSTEXPR_INLINE int float_cmp (const float f1, const float f2)
 
CONSTEXPR_INLINE int long_diff_2_cmp (const long L)
 
CONSTEXPR_INLINE int long_cmp (const long L1, const long L2)
 
template<typename NUM >
CONSTEXPR_INLINE int calc_digits (NUM val)
 
template<typename NUM >
CONSTEXPR_INLINE int calc_signed_digits (NUM val)
 

Macro Definition Documentation

#define INPLACE_RECONSTRUCT (   type,
  this 
)
Value:
do { \
(this)->~type(); \
::new(this) type(); \
} while(0)
GB_TYPES type
while(1)

Definition at line 49 of file arbtools.h.

Referenced by FINAL_TYPE< SEQTYPE >::reinit(), and RefContainer< GenbankRef >::reinit_refs().

#define INPLACE_COPY_RECONSTRUCT (   type,
  this,
  other 
)
Value:
do { \
(this)->~type(); \
::new(this) type(other); \
} while(0)
GB_TYPES type
while(1)

Definition at line 55 of file arbtools.h.

#define DECLARE_ASSIGNMENT_OPERATOR (   T)
Value:
T& operator = (const T& other) { \
INPLACE_COPY_RECONSTRUCT(T, this, other); \
return *this; \
}
#define INPLACE_COPY_RECONSTRUCT(type, this, other)
Definition: arbtools.h:55
Definition: trnsprob.h:20

Definition at line 61 of file arbtools.h.

#define DEFINE_NAMED_ITERATORS (   type,
  name 
)
Value:
typedef type::iterator name##Iter; \
typedef type::const_iterator name##CIter; \
typedef type::reverse_iterator name##RIter; \
typedef type::const_reverse_iterator name##CRIter

Definition at line 109 of file arbtools.h.

#define DEFINE_ITERATORS (   type)    DEFINE_NAMED_ITERATORS(type,type)

Definition at line 115 of file arbtools.h.

#define CASTSIG (   sig,
  cb 
)    ((sig)((void*)(cb)))

Function Documentation

template<typename T >
CONSTEXPR_INLINE bool is_nan ( const T n)
template<typename T >
CONSTEXPR_INLINE bool is_nan_or_inf ( const T n)
template<typename T >
CONSTEXPR_INLINE bool is_normal ( const T n)

Definition at line 176 of file arbtools.h.

References is_nan_or_inf().

Referenced by ARB_edge::virtually_distribute_length().

template<typename T >
CONSTEXPR_INLINE bool is_inf ( const T n)
CONSTEXPR_INLINE int double_diff_2_cmp ( const double  d)

Definition at line 179 of file arbtools.h.

Referenced by double_cmp().

CONSTEXPR_INLINE int double_cmp ( const double  d1,
const double  d2 
)

returns <0 if d1<d2, >0 if d1>d2 (i.e. this function behaves like strcmp)

Definition at line 182 of file arbtools.h.

References double_diff_2_cmp().

Referenced by HitCounter::cmp_rel(), TreeRelativePosition::compare(), GBT_TREE_order(), PART::insertionOrder_cmp(), numeric_string_cmp(), compare_by_criteria::operator()(), ptnd_compare_quality(), and RB_INFO_order().

CONSTEXPR_INLINE int float_diff_2_cmp ( const float  f)

Definition at line 186 of file arbtools.h.

Referenced by float_cmp().

CONSTEXPR_INLINE int float_cmp ( const float  f1,
const float  f2 
)

returns <0 if f1<f2, >0 if f1>f2 (i.e. this function behaves like strcmp)

Definition at line 189 of file arbtools.h.

References float_diff_2_cmp().

Referenced by compare_hits().

CONSTEXPR_INLINE int long_diff_2_cmp ( const long  L)

Definition at line 193 of file arbtools.h.

Referenced by long_cmp().

CONSTEXPR_INLINE int long_cmp ( const long  L1,
const long  L2 
)

returns <0 if L1<L2, >0 if L1>L2 (i.e. this function behaves like strcmp)

Definition at line 196 of file arbtools.h.

References long_diff_2_cmp().

Referenced by compare_hits().

template<typename NUM >
CONSTEXPR_INLINE int calc_digits ( NUM  val)

calculate output length of val (w/o sign)

Definition at line 202 of file arbtools.h.

Referenced by calc_signed_digits(), AWT_configuration_selection::fill(), format(), DisplayFormat::get_header(), and LongBranchMarker::get_report().

template<typename NUM >
CONSTEXPR_INLINE int calc_signed_digits ( NUM  val)

calculate output length of val (with sign)

Definition at line 207 of file arbtools.h.

References calc_digits().