| @@ -4425,7 +4425,13 @@ public: | |||
| static const VariantType_Object instance; | |||
| void cleanUp (ValueUnion& data) const noexcept { if (data.objectValue != nullptr) data.objectValue->decReferenceCount(); } | |||
| void createCopy (ValueUnion& dest, const ValueUnion& source) const { dest.objectValue = source.objectValue; if (dest.objectValue != nullptr) dest.objectValue->incReferenceCount(); } | |||
| void createCopy (ValueUnion& dest, const ValueUnion& source) const | |||
| { | |||
| dest.objectValue = source.objectValue; | |||
| if (dest.objectValue != nullptr) | |||
| dest.objectValue->incReferenceCount(); | |||
| } | |||
| String toString (const ValueUnion& data) const { return "Object 0x" + String::toHexString ((int) (pointer_sized_int) data.objectValue); } | |||
| bool toBool (const ValueUnion& data) const noexcept { return data.objectValue != 0; } | |||
| @@ -4526,40 +4532,15 @@ var::var (const var& valueToCopy) : type (valueToCopy.type) | |||
| type->createCopy (value, valueToCopy.value); | |||
| } | |||
| var::var (const int value_) noexcept : type (&VariantType_Int::instance) | |||
| { | |||
| value.intValue = value_; | |||
| } | |||
| var::var (const int value_) noexcept : type (&VariantType_Int::instance) { value.intValue = value_; } | |||
| var::var (const int64 value_) noexcept : type (&VariantType_Int64::instance) { value.int64Value = value_; } | |||
| var::var (const bool value_) noexcept : type (&VariantType_Bool::instance) { value.boolValue = value_; } | |||
| var::var (const double value_) noexcept : type (&VariantType_Double::instance) { value.doubleValue = value_; } | |||
| var::var (MethodFunction method_) noexcept : type (&VariantType_Method::instance) { value.methodValue = method_; } | |||
| var::var (const int64 value_) noexcept : type (&VariantType_Int64::instance) | |||
| { | |||
| value.int64Value = value_; | |||
| } | |||
| var::var (const bool value_) noexcept : type (&VariantType_Bool::instance) | |||
| { | |||
| value.boolValue = value_; | |||
| } | |||
| var::var (const double value_) noexcept : type (&VariantType_Double::instance) | |||
| { | |||
| value.doubleValue = value_; | |||
| } | |||
| var::var (const String& value_) : type (&VariantType_String::instance) | |||
| { | |||
| new (value.stringValue) String (value_); | |||
| } | |||
| var::var (const char* const value_) : type (&VariantType_String::instance) | |||
| { | |||
| new (value.stringValue) String (value_); | |||
| } | |||
| var::var (const wchar_t* const value_) : type (&VariantType_String::instance) | |||
| { | |||
| new (value.stringValue) String (value_); | |||
| } | |||
| var::var (const String& value_) : type (&VariantType_String::instance) { new (value.stringValue) String (value_); } | |||
| var::var (const char* const value_) : type (&VariantType_String::instance) { new (value.stringValue) String (value_); } | |||
| var::var (const wchar_t* const value_) : type (&VariantType_String::instance) { new (value.stringValue) String (value_); } | |||
| var::var (const Array<var>& value_) : type (&VariantType_Array::instance) | |||
| { | |||
| @@ -4574,11 +4555,6 @@ var::var (ReferenceCountedObject* const object) : type (&VariantType_Object::in | |||
| object->incReferenceCount(); | |||
| } | |||
| var::var (MethodFunction method_) noexcept : type (&VariantType_Method::instance) | |||
| { | |||
| value.methodValue = method_; | |||
| } | |||
| bool var::isVoid() const noexcept { return type->isVoid(); } | |||
| bool var::isInt() const noexcept { return type->isInt(); } | |||
| bool var::isInt64() const noexcept { return type->isInt64(); } | |||
| @@ -4606,17 +4582,17 @@ void var::swapWith (var& other) noexcept | |||
| std::swap (value, other.value); | |||
| } | |||
| const var& var::operator= (const var& newValue) { type->cleanUp (value); type = newValue.type; type->createCopy (value, newValue.value); return *this; } | |||
| const var& var::operator= (const int newValue) { type->cleanUp (value); type = &VariantType_Int::instance; value.intValue = newValue; return *this; } | |||
| const var& var::operator= (const int64 newValue) { type->cleanUp (value); type = &VariantType_Int64::instance; value.int64Value = newValue; return *this; } | |||
| const var& var::operator= (const bool newValue) { type->cleanUp (value); type = &VariantType_Bool::instance; value.boolValue = newValue; return *this; } | |||
| const var& var::operator= (const double newValue) { type->cleanUp (value); type = &VariantType_Double::instance; value.doubleValue = newValue; return *this; } | |||
| const var& var::operator= (const char* const newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const wchar_t* const newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const String& newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const Array<var>& newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (ReferenceCountedObject* newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (MethodFunction newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const var& v) { type->cleanUp (value); type = v.type; type->createCopy (value, v.value); return *this; } | |||
| const var& var::operator= (const int v) { type->cleanUp (value); type = &VariantType_Int::instance; value.intValue = v; return *this; } | |||
| const var& var::operator= (const int64 v) { type->cleanUp (value); type = &VariantType_Int64::instance; value.int64Value = v; return *this; } | |||
| const var& var::operator= (const bool v) { type->cleanUp (value); type = &VariantType_Bool::instance; value.boolValue = v; return *this; } | |||
| const var& var::operator= (const double v) { type->cleanUp (value); type = &VariantType_Double::instance; value.doubleValue = v; return *this; } | |||
| const var& var::operator= (const char* const v) { type->cleanUp (value); type = &VariantType_String::instance; new (value.stringValue) String (v); return *this; } | |||
| const var& var::operator= (const wchar_t* const v) { type->cleanUp (value); type = &VariantType_String::instance; new (value.stringValue) String (v); return *this; } | |||
| const var& var::operator= (const String& v) { type->cleanUp (value); type = &VariantType_String::instance; new (value.stringValue) String (v); return *this; } | |||
| const var& var::operator= (const Array<var>& v) { var v2 (v); swapWith (v2); return *this; } | |||
| const var& var::operator= (ReferenceCountedObject* v) { var v2 (v); swapWith (v2); return *this; } | |||
| const var& var::operator= (MethodFunction v) { var v2 (v); swapWith (v2); return *this; } | |||
| bool var::equals (const var& other) const noexcept | |||
| { | |||
| @@ -4641,6 +4617,11 @@ var var::operator[] (const Identifier& propertyName) const | |||
| return o != nullptr ? o->getProperty (propertyName) : var::null; | |||
| } | |||
| var var::operator[] (const char* const propertyName) const | |||
| { | |||
| return operator[] (Identifier (propertyName)); | |||
| } | |||
| var var::invoke (const Identifier& method, const var* arguments, int numArguments) const | |||
| { | |||
| DynamicObject* const o = getDynamicObject(); | |||
| @@ -4803,7 +4784,8 @@ var var::readFromStream (InputStream& input) | |||
| return v; | |||
| } | |||
| default: input.skipNextBytes (numBytes - 1); break; | |||
| default: | |||
| input.skipNextBytes (numBytes - 1); break; | |||
| } | |||
| } | |||
| @@ -37126,11 +37108,11 @@ AudioProcessor::~AudioProcessor() | |||
| // that it refers to is deleted.. | |||
| jassert (activeEditor == nullptr); | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| // This will fail if you've called beginParameterChangeGesture() for one | |||
| // or more parameters without having made a corresponding call to endParameterChangeGesture... | |||
| jassert (changingParams.countNumberOfSetBits() == 0); | |||
| #endif | |||
| #endif | |||
| } | |||
| void AudioProcessor::setPlayHead (AudioPlayHead* const newPlayHead) noexcept | |||
| @@ -37204,12 +37186,12 @@ void AudioProcessor::beginParameterChangeGesture (int parameterIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (parameterIndex, getNumParameters())); | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| // This means you've called beginParameterChangeGesture twice in succession without a matching | |||
| // call to endParameterChangeGesture. That might be fine in most hosts, but better to avoid doing it. | |||
| jassert (! changingParams [parameterIndex]); | |||
| changingParams.setBit (parameterIndex); | |||
| #endif | |||
| #endif | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| @@ -37229,13 +37211,13 @@ void AudioProcessor::endParameterChangeGesture (int parameterIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (parameterIndex, getNumParameters())); | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| // This means you've called endParameterChangeGesture without having previously called | |||
| // endParameterChangeGesture. That might be fine in most hosts, but better to keep the | |||
| // calls matched correctly. | |||
| jassert (changingParams [parameterIndex]); | |||
| changingParams.clearBit (parameterIndex); | |||
| #endif | |||
| #endif | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| @@ -72,8 +72,8 @@ namespace JuceDummyNamespace {} | |||
| See also SystemStats::getJUCEVersion() for a string version. | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 53 | |||
| #define JUCE_BUILDNUMBER 107 | |||
| #define JUCE_MINOR_VERSION 54 | |||
| #define JUCE_BUILDNUMBER 2 | |||
| /** Current Juce version number. | |||
| @@ -8638,6 +8638,8 @@ public: | |||
| /** If this variant is an object, this returns one of its properties. */ | |||
| var operator[] (const Identifier& propertyName) const; | |||
| /** If this variant is an object, this returns one of its properties. */ | |||
| var operator[] (const char* propertyName) const; | |||
| /** If this variant is an object, this invokes one of its methods with no arguments. */ | |||
| var call (const Identifier& method) const; | |||
| @@ -37,7 +37,7 @@ | |||
| well as ones that can open a cocoa view. If this is enabled, you'll need to also add the AUCarbonBase | |||
| files to your project. | |||
| */ | |||
| #ifndef BUILD_AU_CARBON_UI | |||
| #if ! (defined (BUILD_AU_CARBON_UI) || JUCE_64BIT) | |||
| #define BUILD_AU_CARBON_UI 1 | |||
| #endif | |||
| @@ -36,13 +36,10 @@ | |||
| #include "../juce_PluginHeaders.h" | |||
| #include "../juce_PluginHostType.h" | |||
| #if ! (JUCE_64BIT || defined (ADD_CARBON_BODGE)) | |||
| #define ADD_CARBON_BODGE 1 // see note below.. | |||
| #endif | |||
| //============================================================================== | |||
| BEGIN_JUCE_NAMESPACE | |||
| #if ! JUCE_64BIT | |||
| static void updateComponentPos (Component* const comp) | |||
| { | |||
| HIViewRef dummyView = (HIViewRef) (void*) (pointer_sized_int) | |||
| @@ -66,6 +63,7 @@ static pascal OSStatus viewBoundsChangedEvent (EventHandlerCallRef, EventRef, vo | |||
| updateComponentPos ((Component*) user); | |||
| return noErr; | |||
| } | |||
| #endif | |||
| //============================================================================== | |||
| void initialiseMac() | |||
| @@ -94,7 +94,6 @@ | |||
| //============================================================================== | |||
| #if __LP64__ && (defined(__APPLE_CPP__) || defined(__APPLE_CC__)) // (disable VSTs and RTAS in a 64-bit mac build) | |||
| #undef JucePlugin_Build_VST | |||
| #undef JucePlugin_Build_RTAS | |||
| #endif | |||
| @@ -50,11 +50,11 @@ AudioProcessor::~AudioProcessor() | |||
| // that it refers to is deleted.. | |||
| jassert (activeEditor == nullptr); | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| // This will fail if you've called beginParameterChangeGesture() for one | |||
| // or more parameters without having made a corresponding call to endParameterChangeGesture... | |||
| jassert (changingParams.countNumberOfSetBits() == 0); | |||
| #endif | |||
| #endif | |||
| } | |||
| void AudioProcessor::setPlayHead (AudioPlayHead* const newPlayHead) noexcept | |||
| @@ -128,12 +128,12 @@ void AudioProcessor::beginParameterChangeGesture (int parameterIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (parameterIndex, getNumParameters())); | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| // This means you've called beginParameterChangeGesture twice in succession without a matching | |||
| // call to endParameterChangeGesture. That might be fine in most hosts, but better to avoid doing it. | |||
| jassert (! changingParams [parameterIndex]); | |||
| changingParams.setBit (parameterIndex); | |||
| #endif | |||
| #endif | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| @@ -153,13 +153,13 @@ void AudioProcessor::endParameterChangeGesture (int parameterIndex) | |||
| { | |||
| jassert (isPositiveAndBelow (parameterIndex, getNumParameters())); | |||
| #if JUCE_DEBUG | |||
| #if JUCE_DEBUG | |||
| // This means you've called endParameterChangeGesture without having previously called | |||
| // endParameterChangeGesture. That might be fine in most hosts, but better to keep the | |||
| // calls matched correctly. | |||
| jassert (changingParams [parameterIndex]); | |||
| changingParams.clearBit (parameterIndex); | |||
| #endif | |||
| #endif | |||
| for (int i = listeners.size(); --i >= 0;) | |||
| { | |||
| @@ -240,7 +240,13 @@ public: | |||
| static const VariantType_Object instance; | |||
| void cleanUp (ValueUnion& data) const noexcept { if (data.objectValue != nullptr) data.objectValue->decReferenceCount(); } | |||
| void createCopy (ValueUnion& dest, const ValueUnion& source) const { dest.objectValue = source.objectValue; if (dest.objectValue != nullptr) dest.objectValue->incReferenceCount(); } | |||
| void createCopy (ValueUnion& dest, const ValueUnion& source) const | |||
| { | |||
| dest.objectValue = source.objectValue; | |||
| if (dest.objectValue != nullptr) | |||
| dest.objectValue->incReferenceCount(); | |||
| } | |||
| String toString (const ValueUnion& data) const { return "Object 0x" + String::toHexString ((int) (pointer_sized_int) data.objectValue); } | |||
| bool toBool (const ValueUnion& data) const noexcept { return data.objectValue != 0; } | |||
| @@ -347,40 +353,15 @@ var::var (const var& valueToCopy) : type (valueToCopy.type) | |||
| type->createCopy (value, valueToCopy.value); | |||
| } | |||
| var::var (const int value_) noexcept : type (&VariantType_Int::instance) | |||
| { | |||
| value.intValue = value_; | |||
| } | |||
| var::var (const int64 value_) noexcept : type (&VariantType_Int64::instance) | |||
| { | |||
| value.int64Value = value_; | |||
| } | |||
| var::var (const bool value_) noexcept : type (&VariantType_Bool::instance) | |||
| { | |||
| value.boolValue = value_; | |||
| } | |||
| var::var (const double value_) noexcept : type (&VariantType_Double::instance) | |||
| { | |||
| value.doubleValue = value_; | |||
| } | |||
| var::var (const String& value_) : type (&VariantType_String::instance) | |||
| { | |||
| new (value.stringValue) String (value_); | |||
| } | |||
| var::var (const int value_) noexcept : type (&VariantType_Int::instance) { value.intValue = value_; } | |||
| var::var (const int64 value_) noexcept : type (&VariantType_Int64::instance) { value.int64Value = value_; } | |||
| var::var (const bool value_) noexcept : type (&VariantType_Bool::instance) { value.boolValue = value_; } | |||
| var::var (const double value_) noexcept : type (&VariantType_Double::instance) { value.doubleValue = value_; } | |||
| var::var (MethodFunction method_) noexcept : type (&VariantType_Method::instance) { value.methodValue = method_; } | |||
| var::var (const char* const value_) : type (&VariantType_String::instance) | |||
| { | |||
| new (value.stringValue) String (value_); | |||
| } | |||
| var::var (const wchar_t* const value_) : type (&VariantType_String::instance) | |||
| { | |||
| new (value.stringValue) String (value_); | |||
| } | |||
| var::var (const String& value_) : type (&VariantType_String::instance) { new (value.stringValue) String (value_); } | |||
| var::var (const char* const value_) : type (&VariantType_String::instance) { new (value.stringValue) String (value_); } | |||
| var::var (const wchar_t* const value_) : type (&VariantType_String::instance) { new (value.stringValue) String (value_); } | |||
| var::var (const Array<var>& value_) : type (&VariantType_Array::instance) | |||
| { | |||
| @@ -395,11 +376,6 @@ var::var (ReferenceCountedObject* const object) : type (&VariantType_Object::in | |||
| object->incReferenceCount(); | |||
| } | |||
| var::var (MethodFunction method_) noexcept : type (&VariantType_Method::instance) | |||
| { | |||
| value.methodValue = method_; | |||
| } | |||
| //============================================================================== | |||
| bool var::isVoid() const noexcept { return type->isVoid(); } | |||
| bool var::isInt() const noexcept { return type->isInt(); } | |||
| @@ -429,17 +405,17 @@ void var::swapWith (var& other) noexcept | |||
| std::swap (value, other.value); | |||
| } | |||
| const var& var::operator= (const var& newValue) { type->cleanUp (value); type = newValue.type; type->createCopy (value, newValue.value); return *this; } | |||
| const var& var::operator= (const int newValue) { type->cleanUp (value); type = &VariantType_Int::instance; value.intValue = newValue; return *this; } | |||
| const var& var::operator= (const int64 newValue) { type->cleanUp (value); type = &VariantType_Int64::instance; value.int64Value = newValue; return *this; } | |||
| const var& var::operator= (const bool newValue) { type->cleanUp (value); type = &VariantType_Bool::instance; value.boolValue = newValue; return *this; } | |||
| const var& var::operator= (const double newValue) { type->cleanUp (value); type = &VariantType_Double::instance; value.doubleValue = newValue; return *this; } | |||
| const var& var::operator= (const char* const newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const wchar_t* const newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const String& newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const Array<var>& newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (ReferenceCountedObject* newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (MethodFunction newValue) { var v (newValue); swapWith (v); return *this; } | |||
| const var& var::operator= (const var& v) { type->cleanUp (value); type = v.type; type->createCopy (value, v.value); return *this; } | |||
| const var& var::operator= (const int v) { type->cleanUp (value); type = &VariantType_Int::instance; value.intValue = v; return *this; } | |||
| const var& var::operator= (const int64 v) { type->cleanUp (value); type = &VariantType_Int64::instance; value.int64Value = v; return *this; } | |||
| const var& var::operator= (const bool v) { type->cleanUp (value); type = &VariantType_Bool::instance; value.boolValue = v; return *this; } | |||
| const var& var::operator= (const double v) { type->cleanUp (value); type = &VariantType_Double::instance; value.doubleValue = v; return *this; } | |||
| const var& var::operator= (const char* const v) { type->cleanUp (value); type = &VariantType_String::instance; new (value.stringValue) String (v); return *this; } | |||
| const var& var::operator= (const wchar_t* const v) { type->cleanUp (value); type = &VariantType_String::instance; new (value.stringValue) String (v); return *this; } | |||
| const var& var::operator= (const String& v) { type->cleanUp (value); type = &VariantType_String::instance; new (value.stringValue) String (v); return *this; } | |||
| const var& var::operator= (const Array<var>& v) { var v2 (v); swapWith (v2); return *this; } | |||
| const var& var::operator= (ReferenceCountedObject* v) { var v2 (v); swapWith (v2); return *this; } | |||
| const var& var::operator= (MethodFunction v) { var v2 (v); swapWith (v2); return *this; } | |||
| //============================================================================== | |||
| bool var::equals (const var& other) const noexcept | |||
| @@ -467,6 +443,11 @@ var var::operator[] (const Identifier& propertyName) const | |||
| return o != nullptr ? o->getProperty (propertyName) : var::null; | |||
| } | |||
| var var::operator[] (const char* const propertyName) const | |||
| { | |||
| return operator[] (Identifier (propertyName)); | |||
| } | |||
| var var::invoke (const Identifier& method, const var* arguments, int numArguments) const | |||
| { | |||
| DynamicObject* const o = getDynamicObject(); | |||
| @@ -631,7 +612,8 @@ var var::readFromStream (InputStream& input) | |||
| return v; | |||
| } | |||
| default: input.skipNextBytes (numBytes - 1); break; | |||
| default: | |||
| input.skipNextBytes (numBytes - 1); break; | |||
| } | |||
| } | |||
| @@ -192,6 +192,8 @@ public: | |||
| //============================================================================== | |||
| /** If this variant is an object, this returns one of its properties. */ | |||
| var operator[] (const Identifier& propertyName) const; | |||
| /** If this variant is an object, this returns one of its properties. */ | |||
| var operator[] (const char* propertyName) const; | |||
| /** If this variant is an object, this invokes one of its methods with no arguments. */ | |||
| var call (const Identifier& method) const; | |||
| @@ -32,8 +32,8 @@ | |||
| See also SystemStats::getJUCEVersion() for a string version. | |||
| */ | |||
| #define JUCE_MAJOR_VERSION 1 | |||
| #define JUCE_MINOR_VERSION 53 | |||
| #define JUCE_BUILDNUMBER 107 | |||
| #define JUCE_MINOR_VERSION 54 | |||
| #define JUCE_BUILDNUMBER 2 | |||
| /** Current Juce version number. | |||