VCV Rack API v2
Loading...
Searching...
No Matches
rack::plugin Namespace Reference

Loads and manages Rack plugins. More...

Classes

struct  Model
 Type information for a module. More...
 
struct  Plugin
 

Functions

PRIVATE void init ()
 
PRIVATE void destroy ()
 
PRIVATE void settingsMergeJson (json_t *rootJ)
 
PlugingetPlugin (const std::string &pluginSlug)
 Finds a loaded Plugin by slug.
 
PlugingetPluginFallback (const std::string &pluginSlug)
 Finds a loaded Plugin by slug, or a fallback plugin if exists.
 
ModelgetModel (const std::string &pluginSlug, const std::string &modelSlug)
 Finds a loaded Model by plugin and model slug.
 
ModelgetModelFallback (const std::string &pluginSlug, const std::string &modelSlug)
 Finds a loaded Model by plugin and model slug, or a fallback model if exists.
 
ModelmodelFromJson (json_t *moduleJ)
 Creates a Model from a JSON module object.
 
bool isSlugValid (const std::string &slug)
 Checks that the slug contains only alphanumeric characters, "-", and "_".
 
std::string normalizeSlug (const std::string &slug)
 Returns a string containing only the valid slug characters.
 

Variables

std::string pluginsPath
 Path to plugins installation dir.
 
std::vector< Plugin * > plugins
 

Detailed Description

Loads and manages Rack plugins.

Function Documentation

◆ init()

PRIVATE void rack::plugin::init ( )

◆ destroy()

PRIVATE void rack::plugin::destroy ( )

◆ settingsMergeJson()

PRIVATE void rack::plugin::settingsMergeJson ( json_t * rootJ)

◆ getPlugin()

Plugin * rack::plugin::getPlugin ( const std::string & pluginSlug)

Finds a loaded Plugin by slug.

◆ getPluginFallback()

Plugin * rack::plugin::getPluginFallback ( const std::string & pluginSlug)

Finds a loaded Plugin by slug, or a fallback plugin if exists.

◆ getModel()

Model * rack::plugin::getModel ( const std::string & pluginSlug,
const std::string & modelSlug )

Finds a loaded Model by plugin and model slug.

◆ getModelFallback()

Model * rack::plugin::getModelFallback ( const std::string & pluginSlug,
const std::string & modelSlug )

Finds a loaded Model by plugin and model slug, or a fallback model if exists.

◆ modelFromJson()

Model * rack::plugin::modelFromJson ( json_t * moduleJ)

Creates a Model from a JSON module object.

Throws an Exception if the model is not found.

◆ isSlugValid()

bool rack::plugin::isSlugValid ( const std::string & slug)

Checks that the slug contains only alphanumeric characters, "-", and "_".

◆ normalizeSlug()

std::string rack::plugin::normalizeSlug ( const std::string & slug)

Returns a string containing only the valid slug characters.

Variable Documentation

◆ pluginsPath

std::string rack::plugin::pluginsPath
extern

Path to plugins installation dir.

◆ plugins

std::vector<Plugin*> rack::plugin::plugins
extern