Main Page | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members

PRESET Class Reference

Class for representing effect presets. More...

Inheritance diagram for PRESET:

CHAIN_OPERATOR ECA_SAMPLERATE_AWARE OPERATOR DYNAMIC_OBJECT< SAMPLE_SPECS::sample_t > DYNAMIC_PARAMETERS< SAMPLE_SPECS::sample_t > ECA_OBJECT FILE_PRESET GLOBAL_PRESET List of all members.

Public Member Functions

Public virtual functions to notify about changes
(Reimplemented from ECA_SAMPLERATE_AWARE)

virtual void set_samples_per_second (SAMPLE_SPECS::sample_rate_t v)
Constructors and destructors
 PRESET (const std::string &formatted_string)
Public API functions
virtual PRESETclone (void) const
 Virtual method that clones the current object and returns a pointer to it.
virtual PRESETnew_expr (void) const
 Virtual method that creates a new object of current type.
virtual std::string name (void) const
 Object name used to identify the object type.
virtual std::string description (void) const
 Object description.
void set_name (const std::string &v)
virtual void init (SAMPLE_BUFFER *sbuf)
 Prepares chain operator for processing.
virtual void process (void)
 Processes sample data in the buffer passed to init().
virtual std::string parameter_names (void) const
 A comma-separated list of parameters names.
virtual void set_parameter (int param, parameter_t value)
virtual parameter_t get_parameter (int param) const
 Get parameter value.
virtual void parameter_description (int param, struct PARAM_DESCRIPTION *pd) const
 An optional function for querying parameter descriptions.
void parse (const std::string &formatted_string)
 Parse preset data from the formatted string given as argument.
bool is_parsed (void) const
 Whether preset data has been parsed.

Detailed Description

Class for representing effect presets.

Author:
Arto Hamara

Kai Vehmanen


Member Function Documentation

PRESET * PRESET::clone void   )  const [virtual]
 

Virtual method that clones the current object and returns a pointer to it.

This must be implemented by all subclasses!

Implements OPERATOR.

Reimplemented in FILE_PRESET, and GLOBAL_PRESET.

string PRESET::description void   )  const [virtual]
 

Object description.

Description should be short, informative and unformatted.

Reimplemented from ECA_OBJECT.

CHAIN_OPERATOR::parameter_t PRESET::get_parameter int  param  )  const [virtual]
 

Get parameter value.

Parameters:
param parameter id, require: param > 0

Implements DYNAMIC_PARAMETERS< SAMPLE_SPECS::sample_t >.

void PRESET::init SAMPLE_BUFFER sbuf  )  [virtual]
 

Prepares chain operator for processing.

Whenever attributes of the sample buffer pointed by 'sbuf' are changed, chain operator should be reinitialized with a new call to init().

Parameters:
sbuf pointer to a sample buffer object
See also:
release

Implements CHAIN_OPERATOR.

string PRESET::name void   )  const [virtual]
 

Object name used to identify the object type.

In most cases, object name is same for all class instances. Must be implemented in all subclasses.

Implements ECA_OBJECT.

PRESET * PRESET::new_expr void   )  const [virtual]
 

Virtual method that creates a new object of current type.

This must be implemented by all subclasses!

Implements OPERATOR.

Reimplemented in FILE_PRESET, and GLOBAL_PRESET.

void PRESET::parameter_description int  param,
struct PARAM_DESCRIPTION *  pd
const [virtual]
 

An optional function for querying parameter descriptions.

This is meant primarily for building generic user-interfaces. It's important to note that these values only serve as hints, they are not meant to be absolute.

Parameters:
param parameter id
Precondition:
param > 0 && param <= number_of_params()

Reimplemented from OPERATOR.

string PRESET::parameter_names void   )  const [virtual]
 

A comma-separated list of parameters names.

Derived classes must implement this.

Implements DYNAMIC_PARAMETERS< SAMPLE_SPECS::sample_t >.

void PRESET::parse const std::string &  formatted_string  ) 
 

Parse preset data from the formatted string given as argument.

require: formatted_string.empty() == false ensure: is_parsed() == true


The documentation for this class was generated from the following files:
Generated on Fri Apr 8 01:38:04 2005 for libecasound by  doxygen 1.4.1