Classes | Macros
system

Detailed Description

Classes

class  SystemStats
 Contains methods for finding out about the current hardware and OS configuration. More...
 

Macros

#define JUCE_CONSTEXPR
 
#define JUCE_ATOMIC_AVAILABLE   1
 
#define JUCE_CALLTYPE
 This macro defines the C calling convention used as the standard for JUCE calls. More...
 
#define JUCE_CDECL
 
#define JUCE_LOG_CURRENT_ASSERTION
 
#define JUCE_BREAK_IN_DEBUGGER   { ::kill (0, SIGTRAP); }
 This will try to break into the debugger if the app is currently being debugged. More...
 
#define JUCE_ANALYZER_NORETURN
 
#define JUCE_BLOCK_WITH_FORCED_SEMICOLON(x)   do { x } while (false)
 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. More...
 
#define DBG(textToWrite)   JUCE_BLOCK_WITH_FORCED_SEMICOLON (juce::String tempDbgBuf; tempDbgBuf << textToWrite; juce::Logger::outputDebugString (tempDbgBuf);)
 Writes a string to the standard error stream. More...
 
#define jassertfalse   JUCE_BLOCK_WITH_FORCED_SEMICOLON (JUCE_LOG_CURRENT_ASSERTION; if (juce::juce_isRunningUnderDebugger()) JUCE_BREAK_IN_DEBUGGER; JUCE_ANALYZER_NORETURN)
 This will always cause an assertion failure. More...
 
#define jassert(expression)   JUCE_BLOCK_WITH_FORCED_SEMICOLON (if (! (expression)) jassertfalse;)
 Platform-independent assertion macro. More...
 
#define JUCE_JOIN_MACRO(item1, item2)   JUCE_JOIN_MACRO_HELPER (item1, item2)
 A good old-fashioned C macro concatenation helper. More...
 
#define JUCE_STRINGIFY(item)   JUCE_STRINGIFY_MACRO_HELPER (item)
 A handy C macro for stringifying any symbol, rather than just a macro parameter. More...
 
#define JUCE_DECLARE_NON_COPYABLE(className)
 This is a shorthand macro for declaring stubs for a class's copy constructor and operator=. More...
 
#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. More...
 
#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. More...
 
#define JUCE_COMPILER_WARNING(message)   _Pragma(JUCE_STRINGIFY (JUCE_WARNING_HELPER (message)))
 This macro allows you to emit a custom compiler warning message. More...
 
#define forcedinline   inline
 A platform-independent way of forcing an inline function. More...
 
#define JUCE_ALIGN(bytes)   __declspec (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. More...
 
#define JUCE_DEPRECATED(functionDef)
 This macro can be used to wrap a function which has been deprecated. More...
 
#define JUCE_DEPRECATED_WITH_BODY(functionDef, body)
 
#define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS   __attribute__((__optimize__("no-associative-math")))
 This can be appended to a function declaration to tell gcc to disable associative math optimisations which break some floating point algorithms. More...
 
#define JUCE_MAJOR_VERSION   5
 Current JUCE version number. More...
 
#define JUCE_MINOR_VERSION   3
 
#define JUCE_BUILDNUMBER   1
 
#define JUCE_VERSION   ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
 Current JUCE version number. More...
 
#define JUCE_API
 This macro is added to all JUCE public class declarations. More...
 
#define JUCE_PUBLIC_IN_DLL_BUILD(declaration)   declaration;
 
#define JUCE_PUBLIC_FUNCTION   JUCE_API JUCE_CALLTYPE
 This macro is added to all JUCE public function declarations. More...
 
#define JUCE_ANDROID   1
 
#define JUCE_DEBUG   1
 
#define JUCE_BIG_ENDIAN   1
 
#define JUCE_BIG_ENDIAN   1
 
#define JUCE_32BIT   1
 
#define JUCE_32BIT   1
 
#define JUCE_INTEL   1
 

Macro Definition Documentation

◆ JUCE_CONSTEXPR

#define JUCE_CONSTEXPR

◆ JUCE_ATOMIC_AVAILABLE

#define JUCE_ATOMIC_AVAILABLE   1

◆ JUCE_CALLTYPE

#define JUCE_CALLTYPE

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

◆ JUCE_CDECL

#define JUCE_CDECL

◆ JUCE_LOG_CURRENT_ASSERTION

#define JUCE_LOG_CURRENT_ASSERTION

◆ JUCE_BREAK_IN_DEBUGGER

#define JUCE_BREAK_IN_DEBUGGER   { ::kill (0, SIGTRAP); }

This will try to break into the debugger if the app is currently being debugged.

If called by an app that's not being debugged, the behaviour isn't defined - it may crash or not, depending on the platform.

See also
jassert()

◆ JUCE_ANALYZER_NORETURN

#define JUCE_ANALYZER_NORETURN

◆ JUCE_BLOCK_WITH_FORCED_SEMICOLON

#define JUCE_BLOCK_WITH_FORCED_SEMICOLON (   x)    do { x } while (false)

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.

◆ DBG

#define DBG (   textToWrite)    JUCE_BLOCK_WITH_FORCED_SEMICOLON (juce::String tempDbgBuf; tempDbgBuf << textToWrite; juce::Logger::outputDebugString (tempDbgBuf);)

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);

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

Referenced by OSCException::OSCException(), and LeakedObjectDetector< OwnerClass >::~LeakedObjectDetector().

◆ jassertfalse

#define jassertfalse   JUCE_BLOCK_WITH_FORCED_SEMICOLON (JUCE_LOG_CURRENT_ASSERTION; if (juce::juce_isRunningUnderDebugger()) JUCE_BREAK_IN_DEBUGGER; JUCE_ANALYZER_NORETURN)

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

Referenced by ListenerList< MenuBarModel::Listener >::add(), OwnedArray< MarkerList::Marker >::addArray(), ReferenceCountedArray< AudioProcessorGraph::Node >::addArray(), Array< Component *>::addArray(), OwnedArray< MarkerList::Marker >::addCopiesOf(), SortedSet< ColourSetting >::addSet(), SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::get(), littlefoot::LittleFootRemoteHeap< ImplementationClass >::getByte(), littlefoot::Runner< programAndHeapSpace, stackAndGlobalsSpace >::getHeapBits(), littlefoot::Program::getNumExtraBytesForOpcode(), BlocksProtocol::HostPacketDecoder< Handler >::handleButtonDownOrUp(), BlocksProtocol::HostPacketDecoder< Handler >::handleCustomMessage(), BlocksProtocol::HostPacketDecoder< Handler >::handleFirmwareUpdateACK(), BlocksProtocol::HostPacketDecoder< Handler >::handlePacketACK(), BlocksProtocol::HostPacketDecoder< Handler >::handleTopology(), BlocksProtocol::HostPacketDecoder< Handler >::handleTopologyEnd(), BlocksProtocol::HostPacketDecoder< Handler >::handleTouch(), BlocksProtocol::HostPacketDecoder< Handler >::handleTouchWithVelocity(), AudioProcessor::memoryWarningReceived(), JUCEApplicationBase::memoryWarningReceived(), dsp::Reverb::process(), BlocksProtocol::HostPacketDecoder< Handler >::processNextMessage(), BlocksProtocol::HostPacketDecoder< Handler >::processNextPacket(), dsp::StateVariableFilter::Filter< SampleType >::processSample(), Array< Component *>::remove(), OwnedArray< MarkerList::Marker >::set(), littlefoot::LittleFootRemoteHeap< ImplementationClass >::setBits(), littlefoot::LittleFootRemoteHeap< ImplementationClass >::setByte(), and LeakedObjectDetector< OwnerClass >::~LeakedObjectDetector().

◆ jassert

#define jassert (   expression)    JUCE_BLOCK_WITH_FORCED_SEMICOLON (if (! (expression)) jassertfalse;)

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

Referenced by RectangleList< int >::add(), OwnedArray< MarkerList::Marker >::add(), dsp::AudioBlock< float >::add(), ReferenceCountedArray< AudioProcessorGraph::Node >::add(), OwnedArray< MarkerList::Marker >::addArray(), OwnedArray< MarkerList::Marker >::addCopiesOf(), AudioBuffer< float >::addFrom(), AudioBuffer< float >::addFromWithRamp(), dsp::AudioBlock< float >::addSample(), AudioBuffer< float >::addSample(), SortedSet< ColourSetting >::addSet(), StatisticsAccumulator< FloatType >::addValue(), dsp::AudioBlock< float >::addWithMultiply(), RectangleList< int >::addWithoutMerging(), dsp::Phase< NumericType >::advance(), String::appendCharPointer(), LinkedListPointer< ObjectType >::Appender::Appender(), LinearSmoothedValue< Type >::applyGain(), AudioBuffer< float >::applyGain(), AudioBuffer< float >::applyGainRamp(), dsp::AudioBlock< float >::AudioBlock(), AudioBuffer< float >::AudioBuffer(), LassoComponent< SelectableItemType >::beginLasso(), AudioBuffer< float >::clear(), AudioFormatReader::clearSamplesBeyondAvailableLength(), RectangleList< int >::clipTo(), AudioData::ConverterInstance< SourceSampleType, DestSampleType >::convertSamples(), AudioBuffer< float >::copyFrom(), AudioBuffer< float >::copyFromWithRamp(), LinkedListPointer< XmlElement >::copyToArray(), dsp::SIMDRegister< Type >::copyToRawArray(), littlefoot::NativeFunction::createID(), StandalonePluginHolder::createPlugin(), ReferenceCountedObject::decReferenceCount(), SingleThreadedReferenceCountedObject::decReferenceCount(), ReferenceCountedObject::decReferenceCountWithoutDeleting(), SingleThreadedReferenceCountedObject::decReferenceCountWithoutDeleting(), ArrayAllocationBase< ProgressBar *, DummyCriticalSection >::ensureAllocatedSize(), SpinLock::exit(), AudioBuffer< float >::findMinMax(), dsp::SIMDRegister< Type >::fromRawArray(), dsp::AudioBlock< float >::getChannelPointer(), OwnedArray< MarkerList::Marker >::getFirst(), ReferenceCountedArray< AudioProcessorGraph::Node >::getFirst(), Array< Component *>::getFirst(), RectangleList< int >::getIntersectionWith(), OwnedArray< MarkerList::Marker >::getLast(), ReferenceCountedArray< AudioProcessorGraph::Node >::getLast(), Array< Component *>::getLast(), AudioBuffer< float >::getMagnitude(), littlefoot::Runner< programAndHeapSpace, stackAndGlobalsSpace >::getNativeFunction(), ReferenceCountedArray< AudioProcessorGraph::Node >::getObjectPointer(), ReferenceCountedArray< AudioProcessorGraph::Node >::getObjectPointerUnchecked(), AudioBuffer< float >::getReadPointer(), Array< Component *>::getReference(), AudioBuffer< float >::getRMSLevel(), dsp::AudioBlock< float >::getSample(), AudioBuffer< float >::getSample(), WeakReference< ObjectType, ReferenceCountingType >::Master::getSharedPointer(), dsp::AudioBlock< float >::getSingleChannelBlock(), dsp::AudioBlock< float >::getSubBlock(), dsp::AudioBlock< float >::getSubsetChannelBlock(), dsp::LookupTable< Type >::getUnchecked(), OwnedArray< MarkerList::Marker >::getUnchecked(), Array< Component *>::getUnchecked(), AudioBuffer< float >::getWritePointer(), OwnedArray< MarkerList::Marker >::insert(), ReferenceCountedArray< AudioProcessorGraph::Node >::insert(), Array< Component *>::insert(), LinkedListPointer< XmlElement >::insertAtIndex(), LinkedListPointer< XmlElement >::insertNext(), BlocksProtocol::IntegerWithBitSize< 8 >::IntegerWithBitSize(), CharPointer_UTF8::isByteOrderMark(), CharPointer_UTF16::isByteOrderMarkBigEndian(), CharPointer_UTF16::isByteOrderMarkLittleEndian(), isPositiveAndBelow(), isPositiveAndNotGreaterThan(), EdgeTable::iterate(), jlimit(), jmap(), dsp::AudioBlock< float >::max(), MidiMessage::MidiMessage(), dsp::AudioBlock< float >::min(), dsp::AudioBlock< float >::move(), dsp::AudioBlock< float >::multiply(), negativeAwareModulo(), Quaternion< float >::normalised(), dsp::Matrix< ElementType >::operator()(), CharPointer_UTF8::operator++(), ReferenceCountedObjectPtr< ImagePixelData >::operator->(), LinkedListPointer< XmlElement >::operator=(), ScopedPointer< ListViewport >::operator=(), OwnedArray< MarkerList::Marker >::operator[](), dsp::SIMDRegister< Type >::operator[](), Array< Component *>::operator[](), LassoComponent< SelectableItemType >::paint(), dsp::Polynomial< FloatingType >::Polynomial(), dsp::FIR::Filter< SampleType >::prepare(), dsp::ProcessorDuplicator< MonoProcessorType, StateType >::process(), dsp::Reverb::process(), dsp::LadderFilter< Type >::process(), dsp::Gain< FloatType >::process(), dsp::Bias< FloatType >::process(), dsp::Oscillator< SampleType >::process(), dsp::FIR::Filter< SampleType >::process(), dsp::AudioBlock< float >::process(), Reverb::processMono(), dsp::Oscillator< SampleType >::processSample(), dsp::LookupTableTransform< Type >::processSample(), dsp::LookupTableTransform< Type >::processSampleUnchecked(), Reverb::processStereo(), littlefoot::Program::Program(), BlocksProtocol::Packed7BitArrayReader::readBits(), ListenerList< MenuBarModel::Listener >::remove(), Array< Component *>::remove(), Array< Component *>::removeAndReturn(), LinkedListPointer< XmlElement >::replaceNext(), dsp::AudioBlock< float >::replaceWithAbsoluteValueOf(), dsp::AudioBlock< float >::replaceWithNegativeOf(), LinearSmoothedValue< Type >::reset(), Array< Component *>::resize(), AudioBuffer< float >::reverse(), littlefoot::Runner< programAndHeapSpace, stackAndGlobalsSpace >::FunctionExecutionContext::run(), ReferenceCountedArray< AudioProcessorGraph::Node >::set(), Array< Component *>::set(), dsp::Bias< FloatType >::setBias(), dsp::StateVariableFilter::Parameters< NumericType >::setCutOffFrequency(), AudioBuffer< float >::setDataToReferTo(), dsp::AudioBlock< float >::setSample(), AudioBuffer< float >::setSample(), Reverb::setSampleRate(), AudioBuffer< float >::setSize(), NormalisableRange< float >::setSkewForCentre(), Array< Component *>::setUnchecked(), CharPointer_UTF8::sizeInBytes(), GridItem::Span::Span(), dsp::AudioBlock< float >::subtract(), ScopedPointer< ListViewport >::swapWith(), truncatePositiveToUnsignedInt(), TouchList< Type >::updateTouch(), Range< int64 >::withStartAndLength(), BlocksProtocol::Packed7BitArrayBuilder< maxPacketBytes >::writeBits(), BlocksProtocol::Packed7BitArrayBuilder< maxPacketBytes >::writeHeaderSysexBytes(), BlocksProtocol::Packed7BitArrayBuilder< maxPacketBytes >::writePacketSysexFooter(), BlocksProtocol::HostPacketBuilder< maxPacketBytes >::writePacketSysexHeaderBytes(), WeakReference< ObjectType, ReferenceCountingType >::Master::~Master(), ReferenceCountedObject::~ReferenceCountedObject(), SingleThreadedReferenceCountedObject::~SingleThreadedReferenceCountedObject(), and SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::~SingletonHolder().

◆ JUCE_JOIN_MACRO

#define JUCE_JOIN_MACRO (   item1,
  item2 
)    JUCE_JOIN_MACRO_HELPER (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.

◆ JUCE_STRINGIFY

#define JUCE_STRINGIFY (   item)    JUCE_STRINGIFY_MACRO_HELPER (item)

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

◆ JUCE_DECLARE_NON_COPYABLE

#define JUCE_DECLARE_NON_COPYABLE (   className)
Value:
className (const className&) = delete;\
className& operator= (const className&) = delete;

This is a shorthand macro for declaring stubs for a class's copy constructor and operator=.

For example, instead of

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

..you can just write:

class MyClass
{
etc..
private:
};

◆ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR

#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (   className)
Value:
JUCE_LEAK_DETECTOR(className)
#define JUCE_DECLARE_NON_COPYABLE(className)
This is a shorthand macro for declaring stubs for a class&#39;s copy constructor and operator=.
Definition: juce_PlatformDefs.h:197

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

◆ JUCE_PREVENT_HEAP_ALLOCATION

#define JUCE_PREVENT_HEAP_ALLOCATION
Value:
private: \
static void* operator new (size_t) = delete; \
static void operator delete (void*) = delete;

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.

◆ JUCE_COMPILER_WARNING

#define JUCE_COMPILER_WARNING (   message)    _Pragma(JUCE_STRINGIFY (JUCE_WARNING_HELPER (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.

◆ forcedinline

#define forcedinline   inline

A platform-independent way of forcing an inline function.

Use the syntax:

forcedinline void myfunction (int x)

◆ JUCE_ALIGN

#define JUCE_ALIGN (   bytes)    __declspec (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.

◆ JUCE_DEPRECATED

#define JUCE_DEPRECATED (   functionDef)

This macro can be used to wrap a function which has been deprecated.

◆ JUCE_DEPRECATED_WITH_BODY

#define JUCE_DEPRECATED_WITH_BODY (   functionDef,
  body 
)

◆ JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS

#define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS   __attribute__((__optimize__("no-associative-math")))

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

◆ JUCE_MAJOR_VERSION

#define JUCE_MAJOR_VERSION   5

Current JUCE version number.

See also SystemStats::getJUCEVersion() for a string version.

◆ JUCE_MINOR_VERSION

#define JUCE_MINOR_VERSION   3

◆ JUCE_BUILDNUMBER

#define JUCE_BUILDNUMBER   1

◆ JUCE_VERSION

#define JUCE_VERSION   ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)

Current JUCE version number.

Bits 16 to 32 = major version. Bits 8 to 16 = minor version. Bits 0 to 8 = point release.

See also SystemStats::getJUCEVersion() for a string version.

◆ JUCE_API

#define JUCE_API

This macro is added to all JUCE public class declarations.

◆ JUCE_PUBLIC_IN_DLL_BUILD

#define JUCE_PUBLIC_IN_DLL_BUILD (   declaration)    declaration;

◆ JUCE_PUBLIC_FUNCTION

#define JUCE_PUBLIC_FUNCTION   JUCE_API JUCE_CALLTYPE

This macro is added to all JUCE public function declarations.

◆ JUCE_ANDROID

#define JUCE_ANDROID   1

◆ JUCE_DEBUG

#define JUCE_DEBUG   1

◆ JUCE_BIG_ENDIAN [1/2]

#define JUCE_BIG_ENDIAN   1

◆ JUCE_BIG_ENDIAN [2/2]

#define JUCE_BIG_ENDIAN   1

◆ JUCE_32BIT [1/2]

#define JUCE_32BIT   1

◆ JUCE_32BIT [2/2]

#define JUCE_32BIT   1

◆ JUCE_INTEL

#define JUCE_INTEL   1