liblives
2.4.1-svn
|
class "effect". More...
#include <liblives.hpp>
Public Member Functions | |
effect (const livesApp &lives, livesString hashname, bool match_full=false) | |
Create a new effect from a hashname. More... | |
effect (const livesApp &lives, livesString package, livesString fxname, livesString author=livesString(), int version=0) | |
Create a new effect from a template. More... | |
bool | isValid () const |
Returns whether the effect is valid or not. More... | |
bool | operator== (const effect &other) |
Protected Member Functions | |
effect (livesApp *m_lives, int idx) | |
Protected Attributes | |
livesApp * | m_lives |
int | m_idx |
class "effect".
Represents a single effect.
lives::effect::effect | ( | const livesApp & | lives, |
livesString | hashname, | ||
bool | match_full = false |
||
) |
Create a new effect from a hashname.
In case of multiple matches, only the first match is returned. The hashname should be in utf-8 format, and matching is case insensitive. In the case of no matches, an invalid effect is returned. If livesApp::isInvalid() is true, or livesApp::status() is LIVES_STATUS_NOTREADY, an invalid effect will be returned. Implementation note: we use const livesApp & here to avoid the destructor being called on a copy object, which would cause LiVES to terminate prematurely.
lives | a livesApp instance |
hashname | the hashname of an effect, a concatenation of package name, filter name, and if match_full is true, author and version string. If the filter has "extra_authors" these are also checked. |
match_full | if true then author and version string must match, otherwise only package name and filter name are matched. If false then the hashname and the target must be equivalent strings. |
lives::effect::effect | ( | const livesApp & | lives, |
livesString | package, | ||
livesString | fxname, | ||
livesString | author = livesString() , |
||
int | version = 0 |
||
) |
Create a new effect from a template.
In case of multiple matches, only the first match is returned. In the case of no matches, an invalid effect is returned. LiVESStrings here should be in utf-8 format and matching is case insensitive. If livesApp::isInvalid() is true, or livesApp::status() is LIVES_STATUS_NOTREADY, an invalid effect will be returned. Implementation note: we use const livesApp & here to avoid the destructor being called on a copy object, which would cause LiVES to terminate prematurely.
lives | a livesApp instance |
package | a package name (e.g. "frei0r", "LADSPA"), or "" to match any package. |
fxname | the name of a filter (e.g. "chroma blend") or "" to match any filter name. |
author | the name of the author of the effect (e.g. "jsmith") or "" to match any author. If the plugin has "extra_authors" this value is also permitted as a match. |
version | the number of a version to match, or 0 to match any version. |
bool lives::effect::isValid | ( | ) | const |
Returns whether the effect is valid or not.
A valid effect is owned by a valid livesApp, whose livesApp::status() is not LIVES_STATUS_NOTREADY, and which references an existing effect plugin.
|
inline |