iso::synth::BinaryOpUnit Class Reference

abstract base class for units that perform binary operations More...

#include <iso_synth_binary_op_unit.h>

Inherits iso::synth::ProcessUnit.

Inherited by iso::synth::AddUnit, and iso::synth::MultiplyUnit.

Inheritance diagram for iso::synth::BinaryOpUnit:

Inheritance graph
[legend]
Collaboration diagram for iso::synth::BinaryOpUnit:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BinaryOpUnit ()
 default constructor
 BinaryOpUnit (const String &pName)
 name constructor
 BinaryOpUnit (unsigned int pChannelCount)
 default constructor
 BinaryOpUnit (const String &pName, unsigned int pChannelCount)
 name constructor
 BinaryOpUnit (const String &pName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, FanInType pFanInType=FANIN_ADD) throw (SynthException)
 name and parameter based contructor
 BinaryOpUnit (const String &pName, const Unit &pUnit)
 name & copy constructor
 BinaryOpUnit (const data::Values &pValues) throw (SynthException)
 values based constructor
virtual ~BinaryOpUnit ()
 destructor
virtual void process (Buffer *pBuffer)=0 throw (SynthException)
 processes buffer

Static Public Attributes

static const String sClassName
 default name

Protected Attributes

ControlPort * mOperand
 operand control port
Buffer * mOperandBuffer
 operand control port buffer

Detailed Description

abstract base class for units that perform binary operations

class for units that perform binary operations

Created by Daniel Bisig on 6/24/06. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

BinaryOpUnit::BinaryOpUnit (  ) 

default constructor

BinaryOpUnit::BinaryOpUnit ( const String &  pName  ) 

name constructor

Parameters:
pName unit name

BinaryOpUnit::BinaryOpUnit ( unsigned int  pChannelCount  ) 

default constructor

Parameters:
pChannelCount number of channels

BinaryOpUnit::BinaryOpUnit ( const String &  pName,
unsigned int  pChannelCount 
)

name constructor

Parameters:
pName unit name
pChannelCount number of channels

BinaryOpUnit::BinaryOpUnit ( const String &  pName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
FanInType  pFanInType = FANIN_ADD 
) throw (SynthException)

name and parameter based contructor

Parameters:
pName unit name
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate
pFanInType strategy for combining audio buffers in case this unit is connected to several units

BinaryOpUnit::BinaryOpUnit ( const String &  pName,
const Unit &  pUnit 
)

name & copy constructor

Parameters:
pName unit name
pUnit unit to copy properties from
constructor copies frameCount, channelCount and rate but not unit name

BinaryOpUnit::BinaryOpUnit ( const data::Values &  pValues  )  throw (SynthException)

values based constructor

Parameters:
pValues unit values
Exceptions:
SynthException failed to create unit
pValues structure & data types: 0: const String& : unit name 1: unsigned int : number of frames 2: unsigned int : number of channels 3: unsigned int : samping rate

BinaryOpUnit::~BinaryOpUnit (  )  [virtual]

destructor


Member Function Documentation

virtual void iso::synth::BinaryOpUnit::process ( Buffer *  pBuffer  )  throw (SynthException) [pure virtual]

processes buffer

Parameters:
pBuffer buffer to process
two step processing procedure:
1. calls process function of all it's input ports
2. as soon as these other processing functions return, it changes the buffer according to it's function

Reimplemented from iso::synth::ProcessUnit.

Implemented in iso::synth::AddUnit, and iso::synth::MultiplyUnit.


Member Data Documentation

const String BinaryOpUnit::sClassName [static]

default name

Reimplemented from iso::synth::ProcessUnit.

Reimplemented in iso::synth::AddUnit, and iso::synth::MultiplyUnit.

ControlPort* iso::synth::BinaryOpUnit::mOperand [protected]

operand control port

Buffer* iso::synth::BinaryOpUnit::mOperandBuffer [protected]

operand control port buffer


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:18:45 2011 for synth by  doxygen 1.5.1