liblives  2.4.1-svn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lives::effect Class Reference

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

livesAppm_lives
 
int m_idx
 

Detailed Description

class "effect".

Represents a single effect.

Constructor & Destructor Documentation

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.

Parameters
livesa livesApp instance
hashnamethe 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_fullif 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.
Returns
an effect.
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.

Parameters
livesa livesApp instance
packagea package name (e.g. "frei0r", "LADSPA"), or "" to match any package.
fxnamethe name of a filter (e.g. "chroma blend") or "" to match any filter name.
authorthe 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.
versionthe number of a version to match, or 0 to match any version.
Returns
an effect.

Member Function Documentation

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.

Returns
true if the effect is valid.
bool lives::effect::operator== ( const effect other)
inline
Returns
true if the two effects have the same index and the same livesApp owner

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