Loading...
Searching...
No Matches
juce::ToVarOptions Class Reference

Detailed Description

Options that control conversion from arbitrary types to juce::var.

See also
ToVar

Public Member Functions

ToVarOptions withExplicitVersion (std::optional< int > x) const
 By default, conversion will serialise the type using the marshallingVersion defined for that type.
ToVarOptions withVersionIncluded (bool x) const
 By default, conversion will include version information for any type with a non-null marshallingVersion.
auto getExplicitVersion () const
auto getVersionIncluded () const

Member Functions

◆ withExplicitVersion()

ToVarOptions juce::ToVarOptions::withExplicitVersion ( std::optional< int > x) const
nodiscard

By default, conversion will serialise the type using the marshallingVersion defined for that type.

Setting an explicit version allows the type to be serialised as an earlier version.

References juce::withMember(), and x.

◆ withVersionIncluded()

ToVarOptions juce::ToVarOptions::withVersionIncluded ( bool x) const
nodiscard

By default, conversion will include version information for any type with a non-null marshallingVersion.

Setting versionIncluded to false will cause the version info to be omitted, which is useful in situations where the version information is not needed (e.g. when presenting transient information to the user, rather than writing data to disk that must be deserialised in the future).

References juce::withMember(), and x.

◆ getExplicitVersion()

auto juce::ToVarOptions::getExplicitVersion ( ) const
nodiscard

◆ getVersionIncluded()

auto juce::ToVarOptions::getVersionIncluded ( ) const
nodiscard
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram