JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::AudioProcessorGraph::Node Class Reference

Represents one of the nodes, or processors, in an AudioProcessorGraph. More...

#include <juce_AudioProcessorGraph.h>

Inheritance diagram for juce::AudioProcessorGraph::Node:
Collaboration diagram for juce::AudioProcessorGraph::Node:

Public Types

using Ptr = ReferenceCountedObjectPtr< Node >
 A convenient typedef for referring to a pointer to a node object.
 

Public Member Functions

 Node (NodeID n, std::unique_ptr< AudioProcessor > p) noexcept
 
void decReferenceCount () noexcept
 Decreases the object's reference count.
 
bool decReferenceCountWithoutDeleting () noexcept
 Decreases the object's reference count.
 
AudioProcessorgetProcessor () const noexcept
 The actual processor object that this node represents.
 
int getReferenceCount () const noexcept
 Returns the object's current reference count.
 
void incReferenceCount () noexcept
 Increments the object's reference count.
 
bool isBypassed () const noexcept
 Returns if the node is bypassed or not.
 
void setBypassed (bool shouldBeBypassed) noexcept
 Tell this node to bypass processing.
 
bool userRequestedBypass () const
 

Public Attributes

const NodeID nodeID
 The ID number assigned to this node.
 
NamedValueSet properties
 A set of user-definable properties that are associated with this node.
 

Protected Member Functions

void resetReferenceCount () noexcept
 Resets the reference count to zero without deleting the object.
 

Private Attributes

std::atomic< boolbypassed { false }
 
std::unique_ptr< AudioProcessorprocessor
 
Atomic< int > refCount { 0 }
 

Detailed Description

Represents one of the nodes, or processors, in an AudioProcessorGraph.

To create a node, call AudioProcessorGraph::addNode().

Member Typedef Documentation

◆ Ptr

A convenient typedef for referring to a pointer to a node object.

Constructor & Destructor Documentation

◆ Node()

juce::AudioProcessorGraph::Node::Node ( NodeID  n,
std::unique_ptr< AudioProcessor p 
)
inlinenoexcept

To create a new node, use AudioProcessorGraph::addNode.

References jassert.

Member Function Documentation

◆ decReferenceCount()

void juce::ReferenceCountedObject::decReferenceCount ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will be deleted.

References jassert.

◆ decReferenceCountWithoutDeleting()

bool juce::ReferenceCountedObject::decReferenceCountWithoutDeleting ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will not be deleted, but this method will return true, allowing the caller to take care of deletion.

References jassert.

◆ getProcessor()

AudioProcessor * juce::AudioProcessorGraph::Node::getProcessor ( ) const
inlinenoexcept

The actual processor object that this node represents.

◆ getReferenceCount()

int juce::ReferenceCountedObject::getReferenceCount ( ) const
inlinenoexceptinherited

Returns the object's current reference count.

◆ incReferenceCount()

void juce::ReferenceCountedObject::incReferenceCount ( )
inlinenoexceptinherited

Increments the object's reference count.

This is done automatically by the smart pointer, but is public just in case it's needed for nefarious purposes.

◆ isBypassed()

bool juce::AudioProcessorGraph::Node::isBypassed ( ) const
inlinenoexcept

Returns if the node is bypassed or not.

References juce::approximatelyEqual().

◆ resetReferenceCount()

void juce::ReferenceCountedObject::resetReferenceCount ( )
inlineprotectednoexceptinherited

Resets the reference count to zero without deleting the object.

You should probably never need to use this!

◆ setBypassed()

void juce::AudioProcessorGraph::Node::setBypassed ( bool  shouldBeBypassed)
inlinenoexcept

Tell this node to bypass processing.

◆ userRequestedBypass()

bool juce::AudioProcessorGraph::Node::userRequestedBypass ( ) const
inline

Returns true if setBypassed (true) was called on this node. This behaviour is different from isBypassed(), which may additionally return true if the node has a bypass parameter that is not set to 0.

Member Data Documentation

◆ bypassed

std::atomic<bool> juce::AudioProcessorGraph::Node::bypassed { false }
private

◆ nodeID

const NodeID juce::AudioProcessorGraph::Node::nodeID

The ID number assigned to this node.

This is assigned by the graph that owns it, and can't be changed.

◆ processor

std::unique_ptr<AudioProcessor> juce::AudioProcessorGraph::Node::processor
private

◆ properties

NamedValueSet juce::AudioProcessorGraph::Node::properties

A set of user-definable properties that are associated with this node.

This can be used to attach values to the node for whatever purpose seems useful. For example, you might store an x and y position if your application is displaying the nodes on-screen.

◆ refCount

Atomic<int> juce::ReferenceCountedObject::refCount { 0 }
privateinherited

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