JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Namespaces | Macros
juce_PlatformDefs.h File Reference

Go to the source code of this file.

Namespaces

namespace  juce
 JUCE Namespace.
 

Macros

#define JUCE_CALLTYPE
 This macro defines the C calling convention used as the standard for JUCE calls.
 
#define JUCE_CDECL
 
#define JUCE_LOG_CURRENT_ASSERTION
 
#define JUCE_BREAK_IN_DEBUGGER
 
#define JUCE_ANALYZER_NORETURN
 
#define JUCE_FALLTHROUGH
 Used to silence Wimplicit-fallthrough on Clang and GCC where available as there are a few places in the codebase where we need to do this deliberately and want to ignore the warning.
 
#define JUCE_BLOCK_WITH_FORCED_SEMICOLON(x)
 This is the good old C++ trick for creating a macro that forces the user to put a semicolon after it when they use it.
 
#define DBG(textToWrite)
 Writes a string to the standard error stream.
 
#define jassertfalse
 This will always cause an assertion failure.
 
#define jassert(expression)
 Platform-independent assertion macro.
 
#define jassertquiet(expression)
 Platform-independent assertion macro which suppresses ignored-variable warnings in all build modes.
 
#define JUCE_JOIN_MACRO(item1, item2)
 A good old-fashioned C macro concatenation helper.
 
#define JUCE_STRINGIFY(item)
 A handy C macro for stringifying any symbol, rather than just a macro parameter.
 
#define JUCE_DECLARE_NON_COPYABLE(className)
 This is a shorthand macro for deleting a class's copy constructor and copy assignment operator.
 
#define JUCE_DECLARE_NON_MOVEABLE(className)
 This is a shorthand macro for deleting a class's move constructor and move assignment operator.
 
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
 This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for a class.
 
#define JUCE_PREVENT_HEAP_ALLOCATION
 This macro can be added to class definitions to disable the use of new/delete to allocate the object on the heap, forcing it to only be used as a stack or member variable.
 
#define JUCE_COMPILER_WARNING(message)
 This macro allows you to emit a custom compiler warning message.
 
#define forcedinline
 A platform-independent way of forcing an inline function.
 
#define JUCE_ALIGN(bytes)
 This can be placed before a stack or member variable declaration to tell the compiler to align it to the specified number of bytes.
 
#define JUCE_MODAL_LOOPS_PERMITTED
 Some operating environments don't provide a modal loop mechanism, so this flag can be used to disable any functions that try to run a modal loop.
 
#define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS
 This can be appended to a function declaration to tell gcc to disable associative math optimisations which break some floating point algorithms.
 

Macro Definition Documentation

◆ DBG

#define DBG (   textToWrite)

Writes a string to the standard error stream.

Note that as well as a single string, you can use this to write multiple items as a stream, e.g.

DBG ("foo = " << foo << "bar = " << bar);
#define DBG(textToWrite)
Writes a string to the standard error stream.

The macro is only enabled in a debug build, so be careful not to use it with expressions that have important side-effects!

See also
Logger::outputDebugString

Definition at line 145 of file juce_PlatformDefs.h.

◆ forcedinline

#define forcedinline

A platform-independent way of forcing an inline function.

Use the syntax:

forcedinline void myfunction (int x)
#define forcedinline
A platform-independent way of forcing an inline function.

Definition at line 281 of file juce_PlatformDefs.h.

◆ jassert

#define jassert (   expression)

Platform-independent assertion macro.

This macro gets turned into a no-op when you're building with debugging turned off, so be careful that the expression you pass to it doesn't perform any actions that are vital for the correct behaviour of your program!

See also
jassertfalse

Definition at line 162 of file juce_PlatformDefs.h.

◆ jassertfalse

#define jassertfalse

This will always cause an assertion failure.

It is only compiled in a debug build, (unless JUCE_LOG_ASSERTIONS is enabled for your build).

See also
jassert

Definition at line 152 of file juce_PlatformDefs.h.

◆ jassertquiet

#define jassertquiet (   expression)

Platform-independent assertion macro which suppresses ignored-variable warnings in all build modes.

You should probably use a plain jassert() and [[maybe_unused]] by default.

Definition at line 168 of file juce_PlatformDefs.h.

◆ JUCE_ALIGN

#define JUCE_ALIGN (   bytes)

This can be placed before a stack or member variable declaration to tell the compiler to align it to the specified number of bytes.

Definition at line 293 of file juce_PlatformDefs.h.

◆ JUCE_ANALYZER_NORETURN

#define JUCE_ANALYZER_NORETURN

Definition at line 96 of file juce_PlatformDefs.h.

◆ JUCE_BLOCK_WITH_FORCED_SEMICOLON

#define JUCE_BLOCK_WITH_FORCED_SEMICOLON (   x)

This is the good old C++ trick for creating a macro that forces the user to put a semicolon after it when they use it.

Definition at line 130 of file juce_PlatformDefs.h.

◆ JUCE_BREAK_IN_DEBUGGER

#define JUCE_BREAK_IN_DEBUGGER

Definition at line 85 of file juce_PlatformDefs.h.

◆ JUCE_CALLTYPE

#define JUCE_CALLTYPE

This macro defines the C calling convention used as the standard for JUCE calls.

Definition at line 46 of file juce_PlatformDefs.h.

◆ JUCE_CDECL

#define JUCE_CDECL

Definition at line 47 of file juce_PlatformDefs.h.

◆ JUCE_COMPILER_WARNING

#define JUCE_COMPILER_WARNING (   message)

This macro allows you to emit a custom compiler warning message.

Very handy for marking bits of code as "to-do" items, or for shaming code written by your co-workers in a way that's hard to ignore.

GCC and Clang provide the #warning directive, but MSVC doesn't, so this macro is a cross-compiler way to get the same functionality as #warning.

Definition at line 270 of file juce_PlatformDefs.h.

◆ JUCE_DECLARE_NON_COPYABLE

#define JUCE_DECLARE_NON_COPYABLE (   className)

This is a shorthand macro for deleting a class's copy constructor and copy assignment operator.

For example, instead of

class MyClass
{
etc..
private:
MyClass (const MyClass&);
MyClass& operator= (const MyClass&);
};

..you can just write:

class MyClass
{
etc..
private:
};
#define JUCE_DECLARE_NON_COPYABLE(className)
This is a shorthand macro for deleting a class's copy constructor and copy assignment operator.

Definition at line 228 of file juce_PlatformDefs.h.

◆ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR

#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (   className)

This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for a class.

Definition at line 242 of file juce_PlatformDefs.h.

◆ JUCE_DECLARE_NON_MOVEABLE

#define JUCE_DECLARE_NON_MOVEABLE (   className)

This is a shorthand macro for deleting a class's move constructor and move assignment operator.

Definition at line 235 of file juce_PlatformDefs.h.

◆ JUCE_FALLTHROUGH

#define JUCE_FALLTHROUGH

Used to silence Wimplicit-fallthrough on Clang and GCC where available as there are a few places in the codebase where we need to do this deliberately and want to ignore the warning.

Definition at line 116 of file juce_PlatformDefs.h.

◆ JUCE_JOIN_MACRO

#define JUCE_JOIN_MACRO (   item1,
  item2 
)

A good old-fashioned C macro concatenation helper.

This combines two items (which may themselves be macros) into a single string, avoiding the pitfalls of the ## macro operator.

Definition at line 197 of file juce_PlatformDefs.h.

◆ JUCE_LOG_CURRENT_ASSERTION

#define JUCE_LOG_CURRENT_ASSERTION

Definition at line 57 of file juce_PlatformDefs.h.

◆ JUCE_MODAL_LOOPS_PERMITTED

#define JUCE_MODAL_LOOPS_PERMITTED

Some operating environments don't provide a modal loop mechanism, so this flag can be used to disable any functions that try to run a modal loop.

Definition at line 304 of file juce_PlatformDefs.h.

◆ JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS

#define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS

This can be appended to a function declaration to tell gcc to disable associative math optimisations which break some floating point algorithms.

Definition at line 318 of file juce_PlatformDefs.h.

◆ JUCE_PREVENT_HEAP_ALLOCATION

#define JUCE_PREVENT_HEAP_ALLOCATION

This macro can be added to class definitions to disable the use of new/delete to allocate the object on the heap, forcing it to only be used as a stack or member variable.

Definition at line 249 of file juce_PlatformDefs.h.

◆ JUCE_STRINGIFY

#define JUCE_STRINGIFY (   item)

A handy C macro for stringifying any symbol, rather than just a macro parameter.

Definition at line 200 of file juce_PlatformDefs.h.