#include <aflibChain.h>
Inheritance diagram for aflibChain::
Public Methods | |
virtual | ~aflibChain () |
Destructor. | |
const map<int, aflibAudio *, less<int> >& | getParents () const |
Returns parent objects and IDs for this audio object. More... | |
int | addParent (aflibAudio &parent) |
Adds a parent to an object in a chain. More... | |
void | removeParent (int parent_id) |
Removes a parent from an object in a chain referenced by ID. More... | |
void | removeParent (aflibAudio &parent) |
Removes a parent from an object in a chain referenced by object. More... | |
bool | getNodeProcessed () const |
Notifies if this object has been fully processed in the chain. More... | |
void | setNodeProcessed (bool node) |
Sets the processed state for this object in the chain. More... | |
void | dumpChain (bool check_env=TRUE) |
Dumps the contents of audio chain. More... | |
Protected Methods | |
aflibChain () | |
Constructor. More... | |
aflibChain (aflibAudio &parent) | |
Constructor. More... | |
void | replaceParent (aflibAudio &old_p, aflibAudio &new_p) |
Replaces a parent with another parent keeping the same ID. More... | |
virtual void | parentWasDestroyed (int parent_id) |
Callback to notify derived class when parent was destroyed. More... | |
virtual void | parentWasAdded (int parent_id) |
Callback to notify derived class when parent was added. More... |
This is the base class that provides the mechanism to chain audio objects together. It maintains several static lists that contain all of the chain information for this application. Derived class can override two functions that will inform them when a parent has been added or destroyed. Also provided in this base class are member functions to add and remove parents from an audio object. The ID for a parent that is added by using the constructor is 1. All others added with the addParent call will be returned with this call.
This class provides a default contructor for the start of a chain and a constructor that takes an aflibAudio object as the parent of this object. This class is also designed to be a base class for aflibAudio. This is so that all aflibAudio derived classes will inherit its functionality.
|
Destructor.
|
|
Constructor. This constructor is for derived classes that have no parent audio object. |
|
Constructor. This constructor is for derived classes that have a parent audio object. |
|
Adds a parent to an object in a chain. If an object wishes to add another item as a parent we will let them. Some objects need more than one input. This provides for it. An ID will be be returned to the user. This is how users should reference this input. If the parent is already attached to the child and in te list then its existing ID will be returned. |
|
Dumps the contents of audio chain. This function will dump the contents of the current chain. If TRUE or no input parameter then the env AFLIB_DUMP_CHAIN will be checked to see if it is set. If it is not then no output. If FALSE is passed in then the chain will be dumped to stdout if the env is set or not. |
|
Notifies if this object has been fully processed in the chain. This notifies the caller if the chain has been fully processed. This is useful so that the base classes can modify the chain if it needs to after it has been changed or modified and before any data it passed thru the chain. This is needed for things such as the sample rate converter class that can be inserted automattically if needed. If TRUE is returned then this node has not changed since it was processed last. If FALSE then this node has changed. |
|
Returns parent objects and IDs for this audio object. This function will return the parents and IDs for this audio object. The order in the map will be in ID order. |
|
Callback to notify derived class when parent was added. This is a callback that derived classes override to get notified when a parent is added. It will not get called when a parent is set in the constructor. Reimplemented in aflibAudioEdit. |
|
Callback to notify derived class when parent was destroyed. This is a callback that derived classes override to get notified when a parent was removed from an object Reimplemented in aflibAudioEdit. |
|
Removes a parent from an object in a chain referenced by object. This is a convience function that will perform the same function as the removeParent function that takes a parent id. It will simply lookup the parent id and call that function. |
|
Removes a parent from an object in a chain referenced by ID. If an object wishes to remove a parent then we will let them. Some objects have more than one input and may want to remove one or more. NOTE: we are not talking about the node being deleted just the chain between this child and parent |
|
Replaces a parent with another parent keeping the same ID. This allows one to replace one parent with another parent while keeping the same ID. This is useful when inserting an object between two other objects but one does not want the audio object to consider this a new input. The aflibAudio base class uses this to insert a aflibAudioSampleRateCvt object in a chain without the child knowing it. |
|
Sets the processed state for this object in the chain. This allows the caller to set the state of the node. The state is set in proper node class. It is initially set to FALSE in the node class. The caller should set it to TRUE when the chain has been fully setup and processed. Each node in the chain must be processed before data can be puled thru the chain. |