Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::old_dsp::plugins::PluginCollections Class Reference

Serializable plugin collections. More...

#include <src/gui/backend/plugin_collections.h>

Public Member Functions

void serialize_to_file () const
 Serializes the cached descriptors to the standard file.
void serialize_to_file_no_throw () const
 Wrapper over serialize_to_file that ignores exceptions.
std::string get_document_type () const
int get_format_major_version () const
int get_format_minor_version () const
void add (const PluginCollection &collection, bool serialize)
 Appends a collection.
const PluginCollectionfind_from_name (std::string_view name) const
 Finds a collection by name.
void remove (PluginCollection &collection, bool serialize)
 Removes the given collection.

Static Public Member Functions

static std::unique_ptr< PluginCollectionsread_or_new ()
 Returns a new instance with the cache pre-filled from the cache file, or an empty instance if there is no file or an error occurred.

Data Fields

std::vector< std::unique_ptr< PluginCollection > > collections_
 Plugin collections.

Friends

void to_json (nlohmann::json &j, const PluginCollections &pc)
void from_json (const nlohmann::json &j, PluginCollections &pc)

Detailed Description

Serializable plugin collections.

Definition at line 91 of file plugin_collections.h.

Member Function Documentation

◆ add()

void zrythm::gui::old_dsp::plugins::PluginCollections::add ( const PluginCollection & collection,
bool serialize )

Appends a collection.

Parameters
serializeWhether to serialize the updated cache now.

◆ get_document_type()

std::string zrythm::gui::old_dsp::plugins::PluginCollections::get_document_type ( ) const
inline

Definition at line 125 of file plugin_collections.h.

◆ get_format_major_version()

int zrythm::gui::old_dsp::plugins::PluginCollections::get_format_major_version ( ) const
inline

Definition at line 126 of file plugin_collections.h.

◆ get_format_minor_version()

int zrythm::gui::old_dsp::plugins::PluginCollections::get_format_minor_version ( ) const
inline

Definition at line 127 of file plugin_collections.h.

◆ read_or_new()

std::unique_ptr< PluginCollections > zrythm::gui::old_dsp::plugins::PluginCollections::read_or_new ( )
static

Returns a new instance with the cache pre-filled from the cache file, or an empty instance if there is no file or an error occurred.

Returns
std::unique_ptr<PluginCollections>

◆ remove()

void zrythm::gui::old_dsp::plugins::PluginCollections::remove ( PluginCollection & collection,
bool serialize )

Removes the given collection.

Parameters
serializeWhether to serialize the updated cache now.

◆ serialize_to_file()

void zrythm::gui::old_dsp::plugins::PluginCollections::serialize_to_file ( ) const

Serializes the cached descriptors to the standard file.

Exceptions
ZrythmExceptionif an error occurred while serializing.

◆ serialize_to_file_no_throw()

void zrythm::gui::old_dsp::plugins::PluginCollections::serialize_to_file_no_throw ( ) const
inline

Wrapper over serialize_to_file that ignores exceptions.

Definition at line 113 of file plugin_collections.h.

◆ from_json

void from_json ( const nlohmann::json & j,
PluginCollections & pc )
friend

Definition at line 156 of file plugin_collections.h.

◆ to_json

void to_json ( nlohmann::json & j,
const PluginCollections & pc )
friend

Definition at line 152 of file plugin_collections.h.

Field Documentation

◆ collections_

std::vector<std::unique_ptr<PluginCollection> > zrythm::gui::old_dsp::plugins::PluginCollections::collections_

Plugin collections.

Definition at line 172 of file plugin_collections.h.


The documentation for this class was generated from the following file: