JUCE
|
Macros | |
#define | JUCE_CALLTYPE |
This macro defines the C calling convention used as the standard for Juce calls. More... | |
#define | JUCE_CDECL |
#define | juce_LogCurrentAssertion |
#define | juce_breakDebugger { ::kill (0, SIGTRAP); } |
This will try to break into the debugger if the app is currently being debugged. More... | |
#define | JUCE_ANALYZER_NORETURN |
#define | MACRO_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(dbgtext) MACRO_WITH_FORCED_SEMICOLON (juce::String tempDbgBuf; tempDbgBuf << dbgtext; juce::Logger::outputDebugString (tempDbgBuf);) |
Writes a string to the standard error stream. More... | |
#define | jassertfalse MACRO_WITH_FORCED_SEMICOLON (juce_LogCurrentAssertion; if (juce::juce_isRunningUnderDebugger()) juce_breakDebugger; JUCE_ANALYZER_NORETURN) |
This will always cause an assertion failure. More... | |
#define | jassert(expression) MACRO_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 | static_jassert(expression) juce::JuceStaticAssert<expression>::dummy(); |
A compile-time assertion macro. 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 | JUCE_TRY |
#define | JUCE_CATCH_EXCEPTION |
#define | JUCE_CATCH_ALL |
#define | JUCE_CATCH_ALL_ASSERT |
#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_CALLTYPE |
This macro defines the C calling convention used as the standard for Juce calls.
Referenced by AlertWindow::getAlertType(), String::getCharPointer(), Component::getComponentEffect(), juce::getHostType(), JUCEApplicationBase::getInstance(), OutputStream::getNewLineString(), MemoryOutputStream::getPosition(), Thread::getThreadName(), Timer::getTimerInterval(), JUCEApplicationBase::isInitialising(), operator<<(), and Thread::threadShouldExit().
#define JUCE_CDECL |
#define juce_LogCurrentAssertion |
#define juce_breakDebugger { ::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.
#define JUCE_ANALYZER_NORETURN |
#define MACRO_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.
#define DBG | ( | dbgtext | ) | MACRO_WITH_FORCED_SEMICOLON (juce::String tempDbgBuf; tempDbgBuf << dbgtext; juce::Logger::outputDebugString (tempDbgBuf);) |
Writes a string to the standard error stream.
This is only compiled in a debug build.
Referenced by OSCException::OSCException(), and LeakedObjectDetector< OwnerClass >::~LeakedObjectDetector().
#define jassertfalse MACRO_WITH_FORCED_SEMICOLON (juce_LogCurrentAssertion; if (juce::juce_isRunningUnderDebugger()) juce_breakDebugger; 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).
Referenced by ReferenceCountedArray< AudioProcessorGraph::Node >::addArray(), OwnedArray< MidiBuffer >::addArray(), Array< Button::Listener * >::addArray(), OwnedArray< MidiBuffer >::addCopiesOf(), SortedSet< ColourSetting >::addSet(), OwnedArray< MidiBuffer >::set(), and LeakedObjectDetector< OwnerClass >::~LeakedObjectDetector().
#define jassert | ( | expression | ) | MACRO_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!
Referenced by ListenerList< MenuBarModel::Listener >::add(), RectangleList< int >::add(), OwnedArray< MidiBuffer >::add(), ReferenceCountedArray< AudioProcessorGraph::Node >::add(), OwnedArray< MidiBuffer >::addArray(), OwnedArray< MidiBuffer >::addCopiesOf(), AudioBuffer< float >::addFrom(), AudioBuffer< float >::addFromWithRamp(), SparseSet< int >::addRange(), AudioBuffer< float >::addSample(), SortedSet< ColourSetting >::addSet(), RectangleList< int >::addWithoutMerging(), String::appendCharPointer(), LinkedListPointer< ObjectType >::Appender::Appender(), AudioBuffer< float >::applyGain(), AudioBuffer< float >::applyGainRamp(), VST3BufferExchange< float >::associateBufferTo(), 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(), StandalonePluginHolder::createPlugin(), ReferenceCountedObject::decReferenceCount(), SingleThreadedReferenceCountedObject::decReferenceCount(), ReferenceCountedObject::decReferenceCountWithoutDeleting(), SingleThreadedReferenceCountedObject::decReferenceCountWithoutDeleting(), ArrayAllocationBase< ProgressBar *, DummyCriticalSection >::ensureAllocatedSize(), SpinLock::exit(), AudioBuffer< float >::findMinMax(), OwnedArray< MidiBuffer >::getFirst(), ReferenceCountedArray< AudioProcessorGraph::Node >::getFirst(), Array< Button::Listener * >::getFirst(), RectangleList< int >::getIntersectionWith(), OwnedArray< MidiBuffer >::getLast(), ReferenceCountedArray< AudioProcessorGraph::Node >::getLast(), Array< Button::Listener * >::getLast(), AudioBuffer< float >::getMagnitude(), ReferenceCountedArray< AudioProcessorGraph::Node >::getObjectPointer(), ReferenceCountedArray< AudioProcessorGraph::Node >::getObjectPointerUnchecked(), Draggable3DOrientation::getQuaternion(), AudioBuffer< float >::getReadPointer(), Array< Button::Listener * >::getReference(), AudioBuffer< float >::getRMSLevel(), AudioBuffer< float >::getSample(), WeakReference< ObjectType, ReferenceCountingType >::Master::getSharedPointer(), SparseSet< int >::getTotalRange(), OwnedArray< MidiBuffer >::getUnchecked(), Array< Button::Listener * >::getUnchecked(), AudioBuffer< float >::getWritePointer(), OwnedArray< MidiBuffer >::insert(), ReferenceCountedArray< AudioProcessorGraph::Node >::insert(), Array< Button::Listener * >::insert(), LinkedListPointer< XmlElement >::insertAtIndex(), LinkedListPointer< XmlElement >::insertNext(), CharPointer_UTF8::isByteOrderMark(), CharPointer_UTF16::isByteOrderMarkBigEndian(), CharPointer_UTF16::isByteOrderMarkLittleEndian(), isPositiveAndBelow(), isPositiveAndNotGreaterThan(), EdgeTable::iterate(), jlimit(), jmap(), ComSmartPtr< ObjectType >::loadFrom(), negativeAwareModulo(), Quaternion< float >::normalised(), SparseSet< int >::operator!=(), CharPointer_UTF8::operator++(), ReferenceCountedObjectPtr< ImagePixelData >::operator->(), LinkedListPointer< XmlElement >::operator=(), ScopedPointer< ListViewport >::operator=(), OwnedArray< MidiBuffer >::operator[](), Array< Button::Listener * >::operator[](), LassoComponent< SelectableItemType >::paint(), Reverb::processMono(), Reverb::processStereo(), ListenerList< MenuBarModel::Listener >::remove(), Array< Button::Listener * >::remove(), SparseSet< int >::removeRange(), LinkedListPointer< XmlElement >::replaceNext(), LinearSmoothedValue< float >::reset(), Array< Button::Listener * >::resize(), PluginBusUtilities::restoreBusArrangement(), AudioBuffer< float >::reverse(), ReferenceCountedArray< AudioProcessorGraph::Node >::set(), Array< Button::Listener * >::set(), AudioBuffer< float >::setDataToReferTo(), AudioBuffer< float >::setSample(), Reverb::setSampleRate(), AudioBuffer< float >::setSize(), Array< Button::Listener * >::setUnchecked(), CharPointer_UTF8::sizeInBytes(), ScopedPointer< ListViewport >::swapWith(), toString(), Range< int64 >::withStartAndLength(), WeakReference< ObjectType, ReferenceCountingType >::Master::~Master(), ReferenceCountedObject::~ReferenceCountedObject(), and SingleThreadedReferenceCountedObject::~SingleThreadedReferenceCountedObject().
#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.
#define JUCE_STRINGIFY | ( | item | ) | JUCE_STRINGIFY_MACRO_HELPER (item) |
A handy C macro for stringifying any symbol, rather than just a macro parameter.
#define static_jassert | ( | expression | ) | juce::JuceStaticAssert<expression>::dummy(); |
A compile-time assertion macro.
If the expression parameter is false, the macro will cause a compile error. (The actual error message that the compiler generates may be completely bizarre and seem to have no relation to the place where you put the static_assert though!)
Referenced by AudioData::Pointer< SampleFormat, Endianness, InterleavingType, Constness >::convertSamples(), operator!=(), AudioData::Pointer< SampleFormat, Endianness, InterleavingType, Constness >::Pointer(), AudioData::Pointer< SampleFormat, Endianness, InterleavingType, Constness >::setAsFloat(), AudioData::Pointer< SampleFormat, Endianness, InterleavingType, Constness >::setAsInt32(), and Atomic< int >::~Atomic().
#define JUCE_DECLARE_NON_COPYABLE | ( | className | ) |
This is a shorthand macro for declaring stubs for a class's copy constructor and operator=.
For example, instead of
..you can just write:
Referenced by LinkedListPointer< ObjectType >::Appender::append(), WeakReference< ObjectType, ReferenceCountingType >::Master::clear(), WeakReference< ObjectType, ReferenceCountingType >::SharedPointer::clearPointer(), AudioData::ConverterInstance< SourceSampleType, DestSampleType >::convertSamples(), ScopedPointer< ListViewport >::createCopy(), ModalCallbackFunction::forComponent(), ListenerList< ListenerClass, ArrayType >::Iterator< BailOutCheckerType, ListType >::getListener(), ListenerList< MenuBarModel::Listener >::getListeners(), InterProcessLock::ScopedLockType::isLocked(), GenericScopedTryLock< LockType >::isLocked(), Reverb::processMono(), PluginBusUtilities::ScopedBusRestorer::release(), ThreadLocalValue< Type >::releaseCurrentThreadStorage(), Decibels::toString(), CallbackMessage::~CallbackMessage(), GenericScopedLock< LockType >::~GenericScopedLock(), GenericScopedUnlock< LockType >::~GenericScopedUnlock(), AudioIODeviceType::Listener::~Listener(), GroupComponent::LookAndFeelMethods::~LookAndFeelMethods(), ScopedReadLock::~ScopedReadLock(), ScopedValueSetter< ValueType >::~ScopedValueSetter(), and ScopedWriteLock::~ScopedWriteLock().
#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.
Referenced by AudioPluginInstance::AudioPluginInstance(), AudioUnitPluginFormat::canScanForPlugins(), LADSPAPluginFormat::canScanForPlugins(), VSTPluginFormat::canScanForPlugins(), AudioFormatReader::clearSamplesBeyondAvailableLength(), AudioFormatManager::end(), ModalCallbackFunction::forComponent(), ThreadWithProgressWindow::getAlertWindow(), AudioFormatReaderSource::getAudioFormatReader(), ComponentMovementWatcher::getComponent(), Component::Positioner::getComponent(), ResizableBorderComponent::getCurrentZone(), MemoryInputStream::getDataSize(), AudioProcessorPlayer::getDoublePrecisionProcessing(), PluginDirectoryScanner::getFailedFiles(), FileBasedDocument::getFile(), PropertiesFile::getFile(), OpenGLGraphicsContextCustomShader::getFragmentShaderCode(), AnimatedAppComponent::getFrameCounter(), AudioSourcePlayer::getGain(), AudioTransportSource::getGain(), OpenGLTexture::getHeight(), Viewport::getHorizontalScrollBar(), Graphics::getInternalContext(), FileTreeComponent::getItemHeight(), ImageConvolutionKernel::getKernelSize(), ApplicationCommandManager::getKeyMappings(), FileLogger::getLogFile(), ComponentBoundsConstrainer::getMinimumWhenOffTheRight(), MidiOutput::getName(), DynamicLibrary::getNativeHandle(), OutputStream::getNewLineString(), StretchableObjectResizer::getNumItems(), AudioProcessorGraph::AudioGraphIOProcessor::getParentGraph(), MemoryOutputStream::getPosition(), AudioParameterInt::getRange(), MemoryMappedFile::getRange(), StreamingSocket::getRawSocketHandle(), DatagramSocket::getRawSocketHandle(), AppleRemoteDevice::getRemoteId(), ResamplingAudioSource::getResamplingRatio(), FileChooser::getResults(), ValueTreeSynchroniser::getRoot(), FFT::getSize(), ApplicationProperties::getStorageParameters(), TemporaryFile::getTargetFile(), Thread::getThreadName(), DirectoryContentsList::getTimeSliceThread(), ComboBox::getTooltip(), HyperlinkButton::getURL(), HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::Iterator::getValue(), LassoComponent< SelectableItemType >::hitTest(), InputStream::InputStream(), TableListBox::isAutoSizeMenuOptionShown(), ReverbAudioSource::isBypassed(), BufferingAudioSource::isLooping(), PopupMenu::CustomComponent::isTriggeredAutomatically(), FileInputStream::openedOk(), FileOutputStream::openedOk(), AudioParameterBool::operator bool(), Reverb::processMono(), MemoryMappedAudioFormatReader::scanMinAndMaxInterleaved(), MidiInput::setName(), MidiEventList::toEventList(), MouseInactivityDetector::Listener::~Listener(), MenuBarModel::Listener::~Listener(), StretchableLayoutResizerBar::LookAndFeelMethods::~LookAndFeelMethods(), ProgressBar::LookAndFeelMethods::~LookAndFeelMethods(), TooltipWindow::LookAndFeelMethods::~LookAndFeelMethods(), ImageButton::LookAndFeelMethods::~LookAndFeelMethods(), CallOutBox::LookAndFeelMethods::~LookAndFeelMethods(), BubbleComponent::LookAndFeelMethods::~LookAndFeelMethods(), FileBrowserComponent::LookAndFeelMethods::~LookAndFeelMethods(), FilenameComponent::LookAndFeelMethods::~LookAndFeelMethods(), Label::LookAndFeelMethods::~LookAndFeelMethods(), TableHeaderComponent::LookAndFeelMethods::~LookAndFeelMethods(), and AlertWindow::LookAndFeelMethods::~LookAndFeelMethods().
#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 | ) | _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.
#define JUCE_TRY |
#define JUCE_CATCH_EXCEPTION |
#define JUCE_CATCH_ALL |
#define JUCE_CATCH_ALL_ASSERT |
#define forcedinline inline |
A platform-independent way of forcing an inline function.
Use the syntax:
Referenced by PixelARGB::blend(), and PixelARGB::getBlue().
#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.
Referenced by Atomic< int >::set().
#define JUCE_DEPRECATED | ( | functionDef | ) |
This macro can be used to wrap a function which has been deprecated.
Referenced by Component::getCachedComponentImage(), String::getCharPointer(), Button::getState(), and ComboBox::getTooltip().
#define JUCE_DEPRECATED_WITH_BODY | ( | functionDef, | |
body | |||
) |