Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Variables
internal.hh File Reference

Go to the source code of this file.

Classes

struct  Ase::Test::IntegrityCheck
 

Namespaces

namespace  Ase
 The Anklang C++ API namespace.
 
namespace  Ase::Test
 Helper namespace for unit testing.
 

Macros

#define _(...)
 Retrieve the translation of a C or C++ string.
 
#define N_(str)
 Mark a string for translation, passed through verbatim by the preprocessor.
 
#define APPLY_IDL_PROPERTY(lvalue, rvalue)
 Constrain, apply, notify and implement a property change, the property name must equal __func__.
 
#define ARRAY_SIZE(array)
 Yield the number of C array elements.
 
#define assert_return(expr, ...)
 Return from the current function if expr is unmet and issue an assertion warning.
 
#define assert_return_unreached(...)
 Return from the current function and issue an assertion warning.
 
#define assert_warn(expr)
 Issue an assertion warning if expr evaluates to false.
 
#define assert_paranoid(expr)
 Issue an assertion warning if expr evaluates to false, check might be disabled in production.
 
#define assert_unreached()
 Explicitely mark unreachable code locations.
 
#define if_constexpr
 Indentation helper for editors that cannot (yet) decipher if constexpr
 
#define CQUOTE(str)
 Produce a const char* string, wrapping str into C-style double quotes.
 
#define MAX(a, b)
 Yield maximum of a and b.
 
#define MIN(a, b)
 Yield minimum of a and b.
 
#define CLAMP(v, mi, ma)
 Yield v clamped to [mi … ma].
 
#define ISLIKELY(cond)
 Hint to the compiler to optimize for cond == TRUE.
 
#define UNLIKELY(cond)
 Hint to the compiler to optimize for cond == FALSE.
 
#define ALIGNMENT16(pointer)
 Yield 16-Byte alignment of a pointer address.
 
#define ALIGNED16(pointer)
 Check if a pointer address is 16-Byte aligned.
 
#define return_unless(cond, ...)
 Return silently if cond does not evaluate to true with return value ...
 
#define STRING_VECTOR_FROM_ARRAY(ConstCharArray)
 Create a Ase::StringVector, from a const char* C-style array.
 
#define TEST_INTEGRITY(FUNC)
 Register func as an integrity test.
 
#define TEST_BENCHMARK(FUNC)
 Register func as a benchmark test.
 

Variables

constexpr const bool Ase::__DEV__
 

Macro Definition Documentation

◆ _

#define _ (   ...)

Retrieve the translation of a C or C++ string.

Definition at line 18 of file internal.hh.

◆ ALIGNED16

#define ALIGNED16 (   pointer)

Check if a pointer address is 16-Byte aligned.

Definition at line 68 of file internal.hh.

◆ ALIGNMENT16

#define ALIGNMENT16 (   pointer)

Yield 16-Byte alignment of a pointer address.

Definition at line 66 of file internal.hh.

◆ APPLY_IDL_PROPERTY

#define APPLY_IDL_PROPERTY (   lvalue,
  rvalue 
)

Constrain, apply, notify and implement a property change, the property name must equal __func__.

Definition at line 23 of file internal.hh.

◆ ARRAY_SIZE

#define ARRAY_SIZE (   array)

Yield the number of C array elements.

Definition at line 26 of file internal.hh.

◆ assert_paranoid

#define assert_paranoid (   expr)

Issue an assertion warning if expr evaluates to false, check might be disabled in production.

Definition at line 35 of file internal.hh.

◆ assert_return

#define assert_return (   expr,
  ... 
)

Return from the current function if expr is unmet and issue an assertion warning.

Definition at line 29 of file internal.hh.

◆ assert_return_unreached

#define assert_return_unreached (   ...)

Return from the current function and issue an assertion warning.

Definition at line 31 of file internal.hh.

◆ assert_unreached

#define assert_unreached ( )

Explicitely mark unreachable code locations.

Definition at line 37 of file internal.hh.

◆ assert_warn

#define assert_warn (   expr)

Issue an assertion warning if expr evaluates to false.

Definition at line 33 of file internal.hh.

◆ CLAMP

#define CLAMP (   v,
  mi,
  ma 
)

Yield v clamped to [mi … ma].

Definition at line 58 of file internal.hh.

◆ CQUOTE

#define CQUOTE (   str)

Produce a const char* string, wrapping str into C-style double quotes.

Definition at line 43 of file internal.hh.

◆ if_constexpr

#define if_constexpr

Indentation helper for editors that cannot (yet) decipher if constexpr

Definition at line 40 of file internal.hh.

◆ ISLIKELY

#define ISLIKELY (   cond)

Hint to the compiler to optimize for cond == TRUE.

Definition at line 61 of file internal.hh.

◆ MAX

#define MAX (   a,
 
)

Yield maximum of a and b.

Definition at line 52 of file internal.hh.

◆ MIN

#define MIN (   a,
 
)

Yield minimum of a and b.

Definition at line 55 of file internal.hh.

◆ N_

#define N_ (   str)

Mark a string for translation, passed through verbatim by the preprocessor.

Definition at line 20 of file internal.hh.

◆ return_unless

#define return_unless (   cond,
  ... 
)

Return silently if cond does not evaluate to true with return value ...

Definition at line 71 of file internal.hh.

◆ STRING_VECTOR_FROM_ARRAY

#define STRING_VECTOR_FROM_ARRAY (   ConstCharArray)

Create a Ase::StringVector, from a const char* C-style array.

Definition at line 74 of file internal.hh.

◆ TEST_BENCHMARK

#define TEST_BENCHMARK (   FUNC)

Register func as a benchmark test.

Definition at line 81 of file internal.hh.

◆ TEST_INTEGRITY

#define TEST_INTEGRITY (   FUNC)

Register func as an integrity test.

Definition at line 77 of file internal.hh.

◆ UNLIKELY

#define UNLIKELY (   cond)

Hint to the compiler to optimize for cond == FALSE.

Definition at line 63 of file internal.hh.