![]() |
pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
|
00001 /* 00002 ------------------------------------------------------------------------------- 00003 This file is part of the Plink, Plonk, Plank libraries 00004 by Martin Robinson 00005 00006 http://code.google.com/p/pl-nk/ 00007 00008 Copyright University of the West of England, Bristol 2011-14 00009 All rights reserved. 00010 00011 Redistribution and use in source and binary forms, with or without 00012 modification, are permitted provided that the following conditions are met: 00013 00014 * Redistributions of source code must retain the above copyright 00015 notice, this list of conditions and the following disclaimer. 00016 * Redistributions in binary form must reproduce the above copyright 00017 notice, this list of conditions and the following disclaimer in the 00018 documentation and/or other materials provided with the distribution. 00019 * Neither the name of University of the West of England, Bristol nor 00020 the names of its contributors may be used to endorse or promote products 00021 derived from this software without specific prior written permission. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00024 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00025 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF THE WEST OF ENGLAND, BRISTOL BE 00027 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00028 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00029 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00030 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00031 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00032 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 00034 This software makes use of third party libraries. For more information see: 00035 doc/license.txt included in the distribution. 00036 ------------------------------------------------------------------------------- 00037 */ 00038 00039 #ifndef PLONK_GRAPHFORWARDDECLARATIONS_H 00040 #define PLONK_GRAPHFORWARDDECLARATIONS_H 00041 00042 #include "../maths/plonk_InlineBinaryOps.h" 00043 #include "../maths/plonk_InlineUnaryOps.h" 00044 #include "../maths/plonk_InlineMiscOps.h" 00045 #include "../core/plonk_CoreForwardDeclarations.h" 00046 #include "../containers/plonk_ContainerForwardDeclarations.h" 00047 #include "../containers/variables/plonk_VariableForwardDeclarations.h" 00048 00049 // graph types 00050 class ChannelInternalCore; 00051 class BlockSize; 00052 class SampleRate; 00053 class ProcessInfo; 00054 class ProcessInfoInternal; 00055 class TimeStamp; 00056 class InputDictionary; 00057 00058 // info 00059 class IOKey; 00060 class IOLimit; 00061 class Measure; 00062 class IOInfo; 00063 class UnitInfo; 00064 typedef ObjectArray<IOInfo> IOInfos; 00065 typedef ObjectArray<UnitInfo> UnitInfos; 00066 00067 // core templated graph types 00068 template<class SampleType> class BusBuffer; 00069 template<class SampleType> class ChannelBase; 00070 template<class SampleType> class ChannelInternalBase; 00071 template<class SampleType, class DataType> class ChannelInternal; 00072 template<class SampleType> class UnitBase; 00073 template<class SampleType, class DataType> class ProxyOwnerChannelInternal; 00074 template<class SampleType> class ProxyChannelInternal; 00075 template<class OwnerType> struct ChannelData; 00076 00077 // common channels 00078 template<class SampleType> class ConstantChannelInternal; 00079 template<class SampleType> class NullChannelInternal; 00080 00081 template<class SampleType, PLONK_BINARYOPFUNCTION(SampleType, op)> class BinaryOpChannelInternal; 00082 template<class SampleType, PLONK_UNARYOPFUNCTION(SampleType, op)> class UnaryOpChannelInternal; 00083 template<class SampleType> class MulAddChannelInternal; 00084 00085 // common units 00086 template<class SampleType> class MulAddUnit; 00087 template<class SampleType> class ReblockUnit; 00088 template<class SampleType,Interp::TypeCode> class ResampleUnit; 00089 template<class SampleType> class MixerUnit; 00090 template<class SampleType> class OverlapMakeUnit; 00091 template<class SampleType> class OverlapMixUnit; 00092 template<class SampleType> class ParamUnit; 00093 template<class SampleType> class AtomicVariableUnit; 00094 template<class SampleType, 00095 Interp::TypeCode InterpTypeCode = Interp::Linear> class InputTaskUnit; 00096 template<class SampleType, 00097 Interp::TypeCode InterpTypeCode = Interp::Linear> class LagUnit; 00098 template<class SampleType, 00099 Interp::TypeCode InterpTypeCode = Interp::Linear> class DCUnit; 00100 00101 // type conversion units 00102 template<class OutputSampleType, class InputSampleType> class TypeUnit; 00103 00104 typedef TypeUnit<float,int> TypeInt2Float; 00105 typedef TypeUnit<int,float> TypeFloat2Int; 00106 typedef TypeUnit<float,double> TypeDouble2Float; 00107 typedef TypeUnit<double,float> TypeFloat2Double; 00108 typedef TypeUnit<float,short> TypeShort2Float; 00109 typedef TypeUnit<short,float> TypeFloat2Short; 00110 typedef TypeUnit<float,Int24> TypeInt242Float; 00111 typedef TypeUnit<Int24,float> TypeFloat2In24; 00112 00113 typedef TypeUnit<PLONK_TYPE_DEFAULT,float> TypeFloat2Default; 00114 typedef TypeUnit<PLONK_TYPE_DEFAULT,double> TypeDouble2Default; 00115 typedef TypeUnit<PLONK_TYPE_DEFAULT,char> TypeChar2Default; 00116 typedef TypeUnit<PLONK_TYPE_DEFAULT,int> TypeInt2Default; 00117 typedef TypeUnit<PLONK_TYPE_DEFAULT,short> TypeShort2Default; 00118 typedef TypeUnit<PLONK_TYPE_DEFAULT,Int24> TypeInt242Default; 00119 00120 typedef TypeUnit<float,PLONK_TYPE_DEFAULT> TypeDefault2Float; 00121 typedef TypeUnit<double,PLONK_TYPE_DEFAULT> TypeDefault2Double; 00122 typedef TypeUnit<char,PLONK_TYPE_DEFAULT> TypeDefault2Char; 00123 typedef TypeUnit<int,PLONK_TYPE_DEFAULT> TypeDefault2Int; 00124 typedef TypeUnit<short,PLONK_TYPE_DEFAULT> TypeDefault2Short; 00125 typedef TypeUnit<Int24,PLONK_TYPE_DEFAULT> TypeDefault2Int24; 00126 00127 00128 // sampletype typedefs 00129 typedef ChannelBase<float> FloatChannel; 00130 typedef ChannelBase<double> DoubleChannel; 00131 typedef ChannelBase<short> ShortChannel; 00132 typedef ChannelBase<int> IntChannel; 00133 typedef ChannelBase<Int24> Int24Channel; 00134 typedef ChannelBase<Long> LongChannel; 00135 00136 typedef UnitBase<float> FloatUnit; 00137 typedef UnitBase<double> DoubleUnit; 00138 typedef UnitBase<short> ShortUnit; 00139 typedef UnitBase<char> CharUnit; 00140 typedef UnitBase<int> IntUnit; 00141 typedef UnitBase<Int24> Int24Unit; 00142 typedef UnitBase<Long> LongUnit; 00143 00144 typedef BusBuffer<float> FloatBus; 00145 typedef BusBuffer<double> DoubleBus; 00146 typedef BusBuffer<char> CharBus; 00147 typedef BusBuffer<int> IntBus; 00148 typedef BusBuffer<Int24> Int24Bus; 00149 typedef BusBuffer<short> ShortBus; 00150 typedef BusBuffer<Long> LongBus; 00151 00152 #define PLONK_BUSARRAYBASETYPE NumericalArray 00153 typedef PLONK_BUSARRAYBASETYPE<FloatBus> FloatBusses; 00154 typedef PLONK_BUSARRAYBASETYPE<DoubleBus> DoubleBusses; 00155 typedef PLONK_BUSARRAYBASETYPE<IntBus> IntBusses; 00156 typedef PLONK_BUSARRAYBASETYPE<Int24Bus> Int24Busses; 00157 typedef PLONK_BUSARRAYBASETYPE<ShortBus> ShortBusses; 00158 typedef PLONK_BUSARRAYBASETYPE<LongBus> LongBusses; 00159 00160 #define PLONK_UNITBASETYPE NumericalArray 00161 typedef PLONK_UNITBASETYPE<FloatUnit> FloatUnitRaw; 00162 typedef PLONK_UNITBASETYPE<DoubleUnit> DoubleUnitRaw; 00163 typedef PLONK_UNITBASETYPE<ShortUnit> ShortUnitRaw; 00164 typedef PLONK_UNITBASETYPE<IntUnit> IntUnitRaw; 00165 typedef PLONK_UNITBASETYPE<Int24Unit> Int24UnitRaw; 00166 typedef PLONK_UNITBASETYPE<LongUnit> LongUnitRaw; 00167 00168 typedef NumericalArray2D<FloatChannel,FloatUnit> FloatUnits; 00169 typedef NumericalArray2D<DoubleChannel,DoubleUnit> DoubleUnits; 00170 typedef NumericalArray2D<ShortChannel,ShortUnit> ShortUnits; 00171 typedef NumericalArray2D<IntChannel,IntUnit> IntUnits; 00172 typedef NumericalArray2D<Int24Channel,Int24Unit> Int24Units; 00173 typedef NumericalArray2D<LongChannel,LongUnit> LongUnits; 00174 00175 // default types 00176 typedef ChannelBase<PLONK_TYPE_DEFAULT> Channel; 00177 typedef UnitBase<PLONK_TYPE_DEFAULT> Unit; 00178 typedef PLONK_UNITBASETYPE<UnitBase<PLONK_TYPE_DEFAULT> > UnitRaw; 00179 typedef NumericalArray2D<Channel,Unit> Units; 00180 typedef BusBuffer<PLONK_TYPE_DEFAULT> Bus; 00181 typedef PLONK_BUSARRAYBASETYPE<Bus> Busses; 00182 00183 // variable graph objects 00184 typedef Variable< ChannelBase<float>& > FloatChannelVariable; 00185 typedef Variable< ChannelBase<double>& > DoubleChannelVariable; 00186 typedef Variable< ChannelBase<int>& > IntChannelVariable; 00187 typedef Variable< ChannelBase<short>& > ShortChannelVariable; 00188 typedef Variable< ChannelBase<Int24>& > Int24ChannelVariable; 00189 typedef Variable< ChannelBase<Long>& > LongChannelVariable; 00190 typedef Variable< ChannelBase<PLONK_TYPE_DEFAULT>& > ChannelVariable; 00191 00192 typedef Variable< UnitBase<float>& > FloatUnitVariable; 00193 typedef Variable< UnitBase<double>& > DoubleUnitVariable; 00194 typedef Variable< UnitBase<int>& > IntUnitVariable; 00195 typedef Variable< UnitBase<short>& > ShortUnitVariable; 00196 typedef Variable< UnitBase<Int24>& > Int24UnitVariable; 00197 typedef Variable< UnitBase<Long>& > LongUnitVariable; 00198 typedef Variable< UnitBase<PLONK_TYPE_DEFAULT>& > UnitVariable; 00199 00200 typedef Variable< BusBuffer<float>& > FloatBusVariable; 00201 typedef Variable< BusBuffer<double>& > DoubleBusVariable; 00202 typedef Variable< BusBuffer<int>& > IntBusVariable; 00203 typedef Variable< BusBuffer<short>& > ShortBusVariable; 00204 typedef Variable< BusBuffer<Int24>& > Int24BusVariable; 00205 typedef Variable< BusBuffer<Long>& > LongBusVariable; 00206 typedef Variable< BusBuffer<PLONK_TYPE_DEFAULT>& > BusVariable; 00207 00208 typedef Variable< FloatBusses& > FloatBussesVariable; 00209 typedef Variable< DoubleBusses& > DoubleBussesVariable; 00210 typedef Variable< IntBusses& > IntBussesVariable; 00211 typedef Variable< ShortBusses& > ShortBussesVariable; 00212 typedef Variable< Int24Busses& > Int24BussesVariable; 00213 typedef Variable< LongBusses& > LongBussesVariable; 00214 typedef Variable< Busses& > BussesVariable; 00215 00216 typedef Variable< FloatUnits& > FloatUnitsVariable; 00217 typedef Variable< DoubleUnits& > DoubleUnitsVariable; 00218 typedef Variable< IntUnits& > IntUnitsVariable; 00219 typedef Variable< ShortUnits& > ShortUnitsVariable; 00220 typedef Variable< Int24Units& > Int24UnitsVariable; 00221 typedef Variable< LongUnits& > LongUnitsVariable; 00222 typedef Variable< Units& > UnitsVariable; 00223 00224 typedef LockFreeQueue< UnitBase<float> > FloatUnitQueue; 00225 typedef LockFreeQueue< UnitBase<double> > DoubleUnitQueue; 00226 typedef LockFreeQueue< UnitBase<short> > ShortUnitQueue; 00227 typedef LockFreeQueue< UnitBase<char> > CharUnitQueue; 00228 typedef LockFreeQueue< UnitBase<int> > IntUnitQueue; 00229 typedef LockFreeQueue< UnitBase<Int24> > Int24UnitQueue; 00230 typedef LockFreeQueue< UnitBase<Long> > LongUnitQueue; 00231 typedef LockFreeQueue< UnitBase<PLONK_TYPE_DEFAULT> > UnitQueue; 00232 00233 00234 #endif // PLONK_GRAPHFORWARDDECLARATIONS_H