JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Defines
juce_PlatformDefs.h File Reference

Defines

#define JUCE_CALLTYPE
 This macro defines the C calling convention used as the standard for Juce calls.
#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.
#define DBG(dbgtext)   { juce::String tempDbgBuf; tempDbgBuf << dbgtext; juce::Logger::outputDebugString (tempDbgBuf); }
 Writes a string to the standard error stream.
#define jassertfalse   { juce_LogCurrentAssertion; if (juce::juce_isRunningUnderDebugger()) juce_breakDebugger; }
 This will always cause an assertion failure.
#define jassert(expression)   { if (! (expression)) jassertfalse; }
 Platform-independent assertion macro.
#define static_jassert(expression)   juce::JuceStaticAssert<expression>::dummy();
 A compile-time assertion macro.
#define JUCE_DECLARE_NON_COPYABLE(className)
 This is a shorthand macro for declaring stubs for a class's copy constructor and 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_JOIN_MACRO(item1, item2)   JUCE_JOIN_MACRO_HELPER (item1, item2)
 A good old-fashioned C macro concatenation helper.
#define JUCE_STRINGIFY(item)   JUCE_STRINGIFY_MACRO_HELPER (item)
 A handy C macro for stringifying any symbol, rather than just a macro parameter.
#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.
#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.
#define JUCE_DEPRECATED(functionDef)   __declspec(deprecated) functionDef
 This can be used to wrap a function which has been deprecated.
#define JUCE_MODAL_LOOPS_PERMITTED   1
 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 Documentation

#define JUCE_CALLTYPE

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

#define JUCE_CDECL
#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 behaiour isn't defined - it may crash or not, depending on the platform.

See also:
jassert()
#define DBG (   dbgtext)    { 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.

See also:
Logger::outputDebugString

Referenced by LeakedObjectDetector< OwnerClass >::~LeakedObjectDetector().

#define jassert (   expression)    { 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 ListenerList< FocusChangeListener >::add(), SortedSet< ActionListener * >::add(), SparseSet< int >::addRange(), SortedSet< ActionListener * >::addSet(), LinkedListPointer< ObjectType >::Appender::Appender(), LassoComponent< SelectableItemType >::beginLasso(), ReferenceCountedArray< SynthesiserSound >::clear(), AudioData::ConverterInstance< SourceSampleType, DestSampleType >::convertSamples(), LinkedListPointer< NamedValue >::copyToArray(), ReferenceCountedObject::decReferenceCount(), SingleThreadedReferenceCountedObject::decReferenceCount(), Component::SafePointer< AudioProcessorEditor >::deleteAndZero(), SpinLock::exit(), ReferenceCountedArray< SynthesiserSound >::getObjectPointerUnchecked(), SortedSet< ActionListener * >::getReference(), Array< Glyph >::getReference(), AudioSampleBuffer::getSampleData(), WeakReference< ObjectType, ReferenceCountingType >::Master::getSharedPointer(), SparseSet< int >::getTotalRange(), OwnedArray< MidiBuffer >::getUnchecked(), SortedSet< ActionListener * >::getUnchecked(), Array< Glyph >::getUnchecked(), LinkedListPointer< NamedValue >::insertAtIndex(), LinkedListPointer< NamedValue >::insertNext(), isPositiveAndBelow(), isPositiveAndNotGreaterThan(), EdgeTable::iterate(), jlimit(), negativeAwareModulo(), Quaternion< GLfloat >::normalised(), ScopedPointer< ListViewport >::operator=(), LassoComponent< SelectableItemType >::paint(), Reverb::processMono(), Reverb::processStereo(), ListenerList< FocusChangeListener >::remove(), SparseSet< int >::removeRange(), LinkedListPointer< NamedValue >::replaceNext(), Array< Glyph >::resize(), Array< Glyph >::set(), Reverb::setSampleRate(), Array< Glyph >::setUnchecked(), CharPointer_UTF8::sizeInBytes(), ScopedPointer< ListViewport >::swapWith(), WeakReference< ObjectType, ReferenceCountingType >::Master::~Master(), ReferenceCountedObject::~ReferenceCountedObject(), and SingleThreadedReferenceCountedObject::~SingleThreadedReferenceCountedObject().

#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(), 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)
Value:
className (const className&);\
    className& operator= (const className&)

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 (MyClass);
    };
Value:
JUCE_DECLARE_NON_COPYABLE(className);\
    JUCE_LEAK_DETECTOR(className)

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

Value:
private: \
    static void* operator new (size_t); \
    static void operator delete (void*);

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_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 JUCE_TRY
#define JUCE_CATCH_ALL
#define forcedinline   inline

A platform-independent way of forcing an inline function.

Use the syntax:

      forcedinline void myfunction (int x)
#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.

#define JUCE_DEPRECATED (   functionDef)    __declspec(deprecated) functionDef

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

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.