BALL  1.5.0
Namespaces | Macros | Functions
macros.h File Reference
#include <BALL/CONFIG/config.h>
#include <BALL/COMMON/constants.h>
#include <BALL/COMMON/rtti.h>
#include <chrono>
#include <cmath>
#include <thread>
#include <typeinfo>

Go to the source code of this file.

Namespaces

 BALL
 

Macros

#define BALL_SLEEPFOR(x)   BALL::ball_macro_sleepfor(x)
 
#define BALL_MAX(a, b)   BALL::ball_macro_max(a, b)
 
#define BALL_MAX3(x, y, z)   BALL::ball_macro_max3(x, y, z)
 
#define BALL_MIN(a, b)   BALL::ball_macro_min(a, b)
 
#define BALL_MIN3(x, y, z)   BALL::ball_macro_min3(x, y ,z)
 
#define BALL_ABS(x)   BALL::ball_macro_abs(x)
 
#define BALL_SGN(x)   BALL::ball_macro_sgn(x)
 
#define BALL_ODD(x)   BALL::ball_macro_odd(x)
 
#define BALL_INT_ODD(x)   BALL::ball_macro_int_odd(x)
 
#define BALL_INT_EVEN(x)   BALL::ball_macro_int_even(x)
 
#define BALL_REAL_ROUND(x)   BALL::ball_macro_real_round(x)
 
#define BALL_REAL_EQUAL(x, y, e)   BALL::ball_macro_real_equal(x, y, e)
 
#define BALL_REAL_NOT_EQUAL(x, y, e)   BALL::ball_macro_real_not_equal(x, y, e)
 
#define BALL_REAL_LESS(x, y, e)   BALL::ball_macro_real_less(x, y, e)
 
#define BALL_REAL_LESS_OR_EQUAL(x, y, e)   BALL::ball_macro_real_less_or_equal(x, y, e)
 
#define BALL_REAL_GREATER(x, y, e)   BALL::ball_macro_real_greater(x, y, e)
 
#define BALL_REAL_GREATER_OR_EQUAL(x, y, e)   BALL::ball_macro_real_greater_or_equal(x, y, e)
 
#define BALL_REAL_ABS(x)   BALL::ball_macro_real_abs(x)
 
#define BALL_REAL_SGN(x)   BALL::ball_macro_sgn(x)
 
#define BALL_REAL_ODD(x)   BALL::ball_macro_real_odd(x)
 
#define BALL_REAL_EVEN(x)   BALL::ball_macro_real_even(x)
 
#define BALL_REAL_FLOOR(x)   BALL::ball_macro_real_floor(x)
 
#define BALL_REAL_CEILING(x)   BALL::ball_macro_real_ceiling(x)
 
#define BALL_REAL_ROUND_INT(x)   BALL::ball_macro_real_round_int(x)
 
#define BALL_CHAR_BITS   BALL::ball_macro_char_bits<unsigned>()
 
#define BALL_CHAR_MASK   BALL::ball_macro_char_mask<unsigned>()
 
#define BALL_CHAR_SHIFT   BALL::ball_macro_char_shift<unsigned>()
 
#define BALL_CHAR_ALL_BITS_SET   BALL::ball_macro_all_bits_set<char>()
 
#define BALL_CHAR_ALL_BITS_CLEARED   BALL::ball_macro_all_bits_cleared<char>()
 
#define BALL_NUMBER_OF_BYTES(bits)   BALL::ball_macro_number_of_bytes(bits)
 
#define BALL_SIZEOF_ARRAY(a)   BALL::ball_macro_sizeof_array(a)
 
#define BALL_BITARRAY_SIZE(number_of_bits)   BALL::ball_macro_bitarray_size(number_of_bits)
 
#define BALL_BITARRAY_CLEAR_BIT(array, x)   BALL::ball_macro_bitarray_clear_bit(array, x)
 
#define BALL_BITARRAY_SET_BIT(array, x)   BALL::ball_macro_bitarray_set_bit(array, x)
 
#define BALL_BITARRAY_TOGGLE_BIT(array, x)   BALL::ball_macro_bitarray_toggle_bit(array, x)
 
#define BALL_BITARRAY_IS_BIT_SET(array, x)   BALL::ball_macro_bitarray_is_bit_set(array, x)
 
#define BALL_BIT(bit)   BALL::ball_macro_bit(bit)
 
#define BALL_BIT_SET(bitset, bit)   BALL::ball_macro_bit_set(bitset, bit)
 
#define BALL_BIT_SET_ALL(bitset)   BALL::ball_macro_bit_set_all(bitset)
 
#define BALL_BIT_SET_ALL_TO(bitset, bit)   BALL::ball_macro_bit_set_all_to(bitset, bit)
 
#define BALL_BIT_SET_ALL_FROM(bitset, bit)   BALL::ball_macro_bit_set_all_from(bitset, bit)
 
#define BALL_BIT_CLEAR(bitset, bit)   BALL::ball_macro_bit_clear(bitset, bit)
 
#define BALL_BIT_CLEAR_ALL(bitset)   BALL::ball_macro_bit_clear_all(bitset)
 
#define BALL_BIT_CLEAR_ALL_TO(bitset, bit)   BALL::ball_macro_bit_clear_all_to(bitset, bit)
 
#define BALL_BIT_CLEAR_ALL_FROM(bitset, bit)   BALL::ball_macro_bit_clear_all_from(bitset, bit)
 
#define BALL_BIT_IS_SET(bitset, bit)   BALL::ball_macro_bit_is_set(bitset, bit)
 
#define BALL_BIT_IS_CLEARED(bitset, bit)   BALL::ball_macro_bit_is_cleared(bitset, bit)
 
#define BALL_ANGLE_RADIAN_TO_DEGREE(rad_angle)   BALL::ball_macro_angle_radian_to_degree(rad_angle)
 
#define BALL_ANGLE_DEGREE_TO_RADIAN(deg_angle)   BALL::ball_macro_angle_degree_to_radian(deg_angle)
 
#define BALL_OFFSET_OF(struct_name, struct_var_name)   BALL::ball_macro_generic_echo((long)&(((struct_name*)0)->struct_var_name))
 
#define BALL_DUMP_DEPTH(os, depth)   for (dump_indent_depth_ = 0; dump_indent_depth_ < depth; ++dump_indent_depth_) { os << " "; }
 
#define BALL_DUMP_STREAM_PREFIX(os)   Size dump_indent_depth_ = 0;
 
#define BALL_DUMP_HEADER(os, cl, ob)   os << "Object: " << (void *)ob << " is instance of class: " << streamClassName(typeid(*ob)) << std::endl;
 
#define BALL_DUMP_CLASS_HEADER(os, cl, ob)   os << "Object: " << (void *)ob << " is instance of class: " << #cl << ::std::endl;
 
#define BALL_DUMP_STREAM_SUFFIX(os)
 

Functions

template<class T >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_sleepfor (T ms)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_max (T a, T b)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_max3 (T a, T b, T c)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_min (T a, T b)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_min3 (T a, T b, T c)
 
template<class X >
int BALL_DEPRECATED BALL_INLINE BALL::ball_macro_abs (X x)
 
template<class X >
int BALL_DEPRECATED BALL_INLINE BALL::ball_macro_sgn (X x)
 
template<class X >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_odd (X x)
 
template<class X >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_int_odd (X x)
 
template<class X >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_int_even (X x)
 
template<class X >
X BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_round (X x)
 
template<class X , class Y , class E >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_equal (X x, Y y, E e)
 
template<class X , class Y , class E >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_not_equal (X x, Y y, E e)
 
template<class X , class Y , class E >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_less (X x, Y y, E e)
 
template<class X , class Y , class E >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_less_or_equal (X x, Y y, E e)
 
template<class X , class Y , class E >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_greater (X x, Y y, E e)
 
template<class X , class Y , class E >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_greater_or_equal (X x, Y y, E e)
 
template<class X >
X BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_abs (X x)
 
template<class X >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_odd (X x)
 
template<class X >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_even (X x)
 
template<class X >
long BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_floor (X x)
 
template<class X >
long BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_ceiling (X x)
 
template<class X >
int BALL_DEPRECATED BALL_INLINE BALL::ball_macro_real_round_int (X x)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_char_bits ()
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_char_mask ()
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_char_shift ()
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_all_bits_set ()
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_all_bits_cleared ()
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_number_of_bytes (T x)
 
template<class T , std::size_t N>
std::size_t BALL_DEPRECATED BALL_INLINE BALL::ball_macro_sizeof_array (T(&)[N])
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bitarray_size (T x)
 
template<class BitArray , class X >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bitarray_clear_bit (BitArray *a, X x)
 
template<class BitArray , class X >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bitarray_set_bit (BitArray *a, X x)
 
template<class BitArray , class X >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bitarray_toggle_bit (BitArray *a, X x)
 
template<class BitArray , class X >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bitarray_is_bit_set (BitArray *a, X x)
 
template<class Bit >
unsigned BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit (Bit bit)
 
template<class Bitset , class Bit >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_set (Bitset &bitset, Bit bit)
 
template<class Bitset >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_set_all (Bitset &bitset)
 
template<class Bitset , class Bit >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_set_all_to (Bitset &bitset, Bit bit)
 
template<class Bitset , class Bit >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_set_all_from (Bitset &bitset, Bit bit)
 
template<class Bitset , class Bit >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_clear (Bitset &bitset, Bit bit)
 
template<class Bitset >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_clear_all (Bitset &bitset)
 
template<class Bitset , class Bit >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_clear_all_to (Bitset &bitset, Bit bit)
 
template<class Bitset , class Bit >
void BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_clear_all_from (Bitset &bitset, Bit bit)
 
template<class Bitset , class Bit >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_is_set (Bitset &bitset, Bit bit)
 
template<class Bitset , class Bit >
bool BALL_DEPRECATED BALL_INLINE BALL::ball_macro_bit_is_cleared (Bitset &bitset, Bit bit)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_angle_radians_to_degree (T rad_angle)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_angle_degree_to_radian (T deg_angle)
 
template<class T >
T BALL_DEPRECATED BALL_INLINE BALL::ball_macro_generic_echo (T value)
 

Macro Definition Documentation

◆ BALL_ABS

#define BALL_ABS (   x)    BALL::ball_macro_abs(x)

Definition at line 334 of file macros.h.

◆ BALL_ANGLE_DEGREE_TO_RADIAN

#define BALL_ANGLE_DEGREE_TO_RADIAN (   deg_angle)    BALL::ball_macro_angle_degree_to_radian(deg_angle)

Definition at line 386 of file macros.h.

◆ BALL_ANGLE_RADIAN_TO_DEGREE

#define BALL_ANGLE_RADIAN_TO_DEGREE (   rad_angle)    BALL::ball_macro_angle_radian_to_degree(rad_angle)

Definition at line 385 of file macros.h.

◆ BALL_BIT

#define BALL_BIT (   bit)    BALL::ball_macro_bit(bit)

Definition at line 373 of file macros.h.

◆ BALL_BIT_CLEAR

#define BALL_BIT_CLEAR (   bitset,
  bit 
)    BALL::ball_macro_bit_clear(bitset, bit)

Definition at line 378 of file macros.h.

◆ BALL_BIT_CLEAR_ALL

#define BALL_BIT_CLEAR_ALL (   bitset)    BALL::ball_macro_bit_clear_all(bitset)

Definition at line 379 of file macros.h.

◆ BALL_BIT_CLEAR_ALL_FROM

#define BALL_BIT_CLEAR_ALL_FROM (   bitset,
  bit 
)    BALL::ball_macro_bit_clear_all_from(bitset, bit)

Definition at line 381 of file macros.h.

◆ BALL_BIT_CLEAR_ALL_TO

#define BALL_BIT_CLEAR_ALL_TO (   bitset,
  bit 
)    BALL::ball_macro_bit_clear_all_to(bitset, bit)

Definition at line 380 of file macros.h.

◆ BALL_BIT_IS_CLEARED

#define BALL_BIT_IS_CLEARED (   bitset,
  bit 
)    BALL::ball_macro_bit_is_cleared(bitset, bit)

Definition at line 383 of file macros.h.

◆ BALL_BIT_IS_SET

#define BALL_BIT_IS_SET (   bitset,
  bit 
)    BALL::ball_macro_bit_is_set(bitset, bit)

Definition at line 382 of file macros.h.

◆ BALL_BIT_SET

#define BALL_BIT_SET (   bitset,
  bit 
)    BALL::ball_macro_bit_set(bitset, bit)

Definition at line 374 of file macros.h.

◆ BALL_BIT_SET_ALL

#define BALL_BIT_SET_ALL (   bitset)    BALL::ball_macro_bit_set_all(bitset)

Definition at line 375 of file macros.h.

◆ BALL_BIT_SET_ALL_FROM

#define BALL_BIT_SET_ALL_FROM (   bitset,
  bit 
)    BALL::ball_macro_bit_set_all_from(bitset, bit)

Definition at line 377 of file macros.h.

◆ BALL_BIT_SET_ALL_TO

#define BALL_BIT_SET_ALL_TO (   bitset,
  bit 
)    BALL::ball_macro_bit_set_all_to(bitset, bit)

Definition at line 376 of file macros.h.

◆ BALL_BITARRAY_CLEAR_BIT

#define BALL_BITARRAY_CLEAR_BIT (   array,
 
)    BALL::ball_macro_bitarray_clear_bit(array, x)

Definition at line 368 of file macros.h.

◆ BALL_BITARRAY_IS_BIT_SET

#define BALL_BITARRAY_IS_BIT_SET (   array,
 
)    BALL::ball_macro_bitarray_is_bit_set(array, x)

Definition at line 371 of file macros.h.

◆ BALL_BITARRAY_SET_BIT

#define BALL_BITARRAY_SET_BIT (   array,
 
)    BALL::ball_macro_bitarray_set_bit(array, x)

Definition at line 369 of file macros.h.

◆ BALL_BITARRAY_SIZE

#define BALL_BITARRAY_SIZE (   number_of_bits)    BALL::ball_macro_bitarray_size(number_of_bits)

Definition at line 367 of file macros.h.

◆ BALL_BITARRAY_TOGGLE_BIT

#define BALL_BITARRAY_TOGGLE_BIT (   array,
 
)    BALL::ball_macro_bitarray_toggle_bit(array, x)

Definition at line 370 of file macros.h.

◆ BALL_CHAR_ALL_BITS_CLEARED

#define BALL_CHAR_ALL_BITS_CLEARED   BALL::ball_macro_all_bits_cleared<char>()

Definition at line 362 of file macros.h.

◆ BALL_CHAR_ALL_BITS_SET

#define BALL_CHAR_ALL_BITS_SET   BALL::ball_macro_all_bits_set<char>()

Definition at line 361 of file macros.h.

◆ BALL_CHAR_BITS

#define BALL_CHAR_BITS   BALL::ball_macro_char_bits<unsigned>()

Definition at line 358 of file macros.h.

◆ BALL_CHAR_MASK

#define BALL_CHAR_MASK   BALL::ball_macro_char_mask<unsigned>()

Definition at line 359 of file macros.h.

◆ BALL_CHAR_SHIFT

#define BALL_CHAR_SHIFT   BALL::ball_macro_char_shift<unsigned>()

Definition at line 360 of file macros.h.

◆ BALL_DUMP_CLASS_HEADER

#define BALL_DUMP_CLASS_HEADER (   os,
  cl,
  ob 
)    os << "Object: " << (void *)ob << " is instance of class: " << #cl << ::std::endl;

Definition at line 394 of file macros.h.

◆ BALL_DUMP_DEPTH

#define BALL_DUMP_DEPTH (   os,
  depth 
)    for (dump_indent_depth_ = 0; dump_indent_depth_ < depth; ++dump_indent_depth_) { os << " "; }

Definition at line 390 of file macros.h.

◆ BALL_DUMP_HEADER

#define BALL_DUMP_HEADER (   os,
  cl,
  ob 
)    os << "Object: " << (void *)ob << " is instance of class: " << streamClassName(typeid(*ob)) << std::endl;

Definition at line 393 of file macros.h.

◆ BALL_DUMP_STREAM_PREFIX

#define BALL_DUMP_STREAM_PREFIX (   os)    Size dump_indent_depth_ = 0;

Definition at line 391 of file macros.h.

◆ BALL_DUMP_STREAM_SUFFIX

#define BALL_DUMP_STREAM_SUFFIX (   os)

Definition at line 395 of file macros.h.

◆ BALL_INT_EVEN

#define BALL_INT_EVEN (   x)    BALL::ball_macro_int_even(x)

Definition at line 339 of file macros.h.

◆ BALL_INT_ODD

#define BALL_INT_ODD (   x)    BALL::ball_macro_int_odd(x)

Definition at line 338 of file macros.h.

◆ BALL_MAX

#define BALL_MAX (   a,
 
)    BALL::ball_macro_max(a, b)

Definition at line 330 of file macros.h.

◆ BALL_MAX3

#define BALL_MAX3 (   x,
  y,
 
)    BALL::ball_macro_max3(x, y, z)

Definition at line 331 of file macros.h.

◆ BALL_MIN

#define BALL_MIN (   a,
 
)    BALL::ball_macro_min(a, b)

Definition at line 332 of file macros.h.

◆ BALL_MIN3

#define BALL_MIN3 (   x,
  y,
 
)    BALL::ball_macro_min3(x, y ,z)

Definition at line 333 of file macros.h.

◆ BALL_NUMBER_OF_BYTES

#define BALL_NUMBER_OF_BYTES (   bits)    BALL::ball_macro_number_of_bytes(bits)

Definition at line 363 of file macros.h.

◆ BALL_ODD

#define BALL_ODD (   x)    BALL::ball_macro_odd(x)

Definition at line 336 of file macros.h.

◆ BALL_OFFSET_OF

#define BALL_OFFSET_OF (   struct_name,
  struct_var_name 
)    BALL::ball_macro_generic_echo((long)&(((struct_name*)0)->struct_var_name))

Definition at line 388 of file macros.h.

◆ BALL_REAL_ABS

#define BALL_REAL_ABS (   x)    BALL::ball_macro_real_abs(x)

Definition at line 348 of file macros.h.

◆ BALL_REAL_CEILING

#define BALL_REAL_CEILING (   x)    BALL::ball_macro_real_ceiling(x)

Definition at line 353 of file macros.h.

◆ BALL_REAL_EQUAL

#define BALL_REAL_EQUAL (   x,
  y,
 
)    BALL::ball_macro_real_equal(x, y, e)

Definition at line 342 of file macros.h.

◆ BALL_REAL_EVEN

#define BALL_REAL_EVEN (   x)    BALL::ball_macro_real_even(x)

Definition at line 351 of file macros.h.

◆ BALL_REAL_FLOOR

#define BALL_REAL_FLOOR (   x)    BALL::ball_macro_real_floor(x)

Definition at line 352 of file macros.h.

◆ BALL_REAL_GREATER

#define BALL_REAL_GREATER (   x,
  y,
 
)    BALL::ball_macro_real_greater(x, y, e)

Definition at line 346 of file macros.h.

◆ BALL_REAL_GREATER_OR_EQUAL

#define BALL_REAL_GREATER_OR_EQUAL (   x,
  y,
 
)    BALL::ball_macro_real_greater_or_equal(x, y, e)

Definition at line 347 of file macros.h.

◆ BALL_REAL_LESS

#define BALL_REAL_LESS (   x,
  y,
 
)    BALL::ball_macro_real_less(x, y, e)

Definition at line 344 of file macros.h.

◆ BALL_REAL_LESS_OR_EQUAL

#define BALL_REAL_LESS_OR_EQUAL (   x,
  y,
 
)    BALL::ball_macro_real_less_or_equal(x, y, e)

Definition at line 345 of file macros.h.

◆ BALL_REAL_NOT_EQUAL

#define BALL_REAL_NOT_EQUAL (   x,
  y,
 
)    BALL::ball_macro_real_not_equal(x, y, e)

Definition at line 343 of file macros.h.

◆ BALL_REAL_ODD

#define BALL_REAL_ODD (   x)    BALL::ball_macro_real_odd(x)

Definition at line 350 of file macros.h.

◆ BALL_REAL_ROUND

#define BALL_REAL_ROUND (   x)    BALL::ball_macro_real_round(x)

Definition at line 341 of file macros.h.

◆ BALL_REAL_ROUND_INT

#define BALL_REAL_ROUND_INT (   x)    BALL::ball_macro_real_round_int(x)

Definition at line 354 of file macros.h.

◆ BALL_REAL_SGN

#define BALL_REAL_SGN (   x)    BALL::ball_macro_sgn(x)

Definition at line 349 of file macros.h.

◆ BALL_SGN

#define BALL_SGN (   x)    BALL::ball_macro_sgn(x)

Definition at line 335 of file macros.h.

◆ BALL_SIZEOF_ARRAY

#define BALL_SIZEOF_ARRAY (   a)    BALL::ball_macro_sizeof_array(a)

Definition at line 365 of file macros.h.

◆ BALL_SLEEPFOR

#define BALL_SLEEPFOR (   x)    BALL::ball_macro_sleepfor(x)

Definition at line 328 of file macros.h.