Loading...
Searching...
No Matches
juce_ApplicationProperties.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
Agreement and JUCE Privacy Policy.
End User License Agreement: www.juce.com/juce-7-licence
Privacy Policy: www.juce.com/juce-privacy-policy
Or: You may also use this code under the terms of the GPL v3 (see
www.gnu.org/licenses).
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
class JUCE_API ApplicationProperties
{
public:
//==============================================================================
ApplicationProperties() = default;
~ApplicationProperties();
//==============================================================================
void setStorageParameters (const PropertiesFile::Options& options);
const PropertiesFile::Options& getStorageParameters() const noexcept { return options; }
//==============================================================================
PropertiesFile* getUserSettings();
PropertiesFile* getCommonSettings (bool returnUserPropsIfReadOnly);
//==============================================================================
bool saveIfNeeded();
void closeFiles();
private:
//==============================================================================
PropertiesFile::Options options;
std::unique_ptr<PropertiesFile> userProps, commonProps;
int commonSettingsAreReadOnly = 0;
void openFiles();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ApplicationProperties)
};
} // namespace juce
juce::ApplicationProperties
Definition juce_ApplicationProperties.h:51
juce::ApplicationProperties::ApplicationProperties
ApplicationProperties()=default
juce::ApplicationProperties::getStorageParameters
const PropertiesFile::Options & getStorageParameters() const noexcept
Definition juce_ApplicationProperties.h:74
juce::ApplicationProperties::setStorageParameters
void setStorageParameters(const PropertiesFile::Options &options)
Definition juce_ApplicationProperties.cpp:35
juce::PropertiesFile
Definition juce_PropertiesFile.h:48
juce::PropertiesFile::Options
Definition juce_PropertiesFile.h:61