|
|
|
|
@ -16,25 +16,30 @@
|
|
|
|
|
namespace fluid {
|
|
|
|
|
namespace client {
|
|
|
|
|
|
|
|
|
|
template <typename Client, typename Params> class FluidSCWrapper;
|
|
|
|
|
template <typename Client, typename Params>
|
|
|
|
|
class FluidSCWrapper;
|
|
|
|
|
|
|
|
|
|
namespace impl {
|
|
|
|
|
|
|
|
|
|
template <typename Client, typename T, size_t N> struct Setter;
|
|
|
|
|
template <size_t N, typename T> struct ArgumentGetter;
|
|
|
|
|
template <size_t N, typename T> struct ControlGetter;
|
|
|
|
|
template <typename T> using msg_iter_method = T (sc_msg_iter::*)(T);
|
|
|
|
|
template <typename Client, typename T, size_t N>
|
|
|
|
|
struct Setter;
|
|
|
|
|
template <size_t N, typename T>
|
|
|
|
|
struct ArgumentGetter;
|
|
|
|
|
template <size_t N, typename T>
|
|
|
|
|
struct ControlGetter;
|
|
|
|
|
template <typename T>
|
|
|
|
|
using msg_iter_method = T (sc_msg_iter::*)(T);
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Iterate over kr/ir inputs via callbacks from params object
|
|
|
|
|
struct FloatControlsIter
|
|
|
|
|
{
|
|
|
|
|
FloatControlsIter(float** vals, size_t N):mValues(vals), mSize(N) {}
|
|
|
|
|
FloatControlsIter(float **vals, size_t N)
|
|
|
|
|
: mValues(vals)
|
|
|
|
|
, mSize(N)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
float next()
|
|
|
|
|
{
|
|
|
|
|
return mCount >= mSize ? 0 : *mValues[mCount++];
|
|
|
|
|
}
|
|
|
|
|
float next() { return mCount >= mSize ? 0 : *mValues[mCount++]; }
|
|
|
|
|
|
|
|
|
|
void reset(float **vals)
|
|
|
|
|
{
|
|
|
|
|
@ -51,16 +56,19 @@ struct FloatControlsIter
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// General case
|
|
|
|
|
template <size_t N, typename T> struct GetControl
|
|
|
|
|
template <size_t N, typename T>
|
|
|
|
|
struct GetControl
|
|
|
|
|
{
|
|
|
|
|
T operator()(World *, FloatControlsIter &controls) { return controls.next(); }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <size_t N, typename T> struct ControlGetter : public GetControl<N, typename T::type>
|
|
|
|
|
template <size_t N, typename T>
|
|
|
|
|
struct ControlGetter : public GetControl<N, typename T::type>
|
|
|
|
|
{};
|
|
|
|
|
|
|
|
|
|
// Specializations
|
|
|
|
|
template <size_t N> struct ControlGetter<N, BufferT>
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ControlGetter<N, BufferT>
|
|
|
|
|
{
|
|
|
|
|
auto operator()(World *w, FloatControlsIter &iter)
|
|
|
|
|
{
|
|
|
|
|
@ -90,7 +98,8 @@ struct ControlGetter<N,FFTParamsT>
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// Iterate over arguments in sc_msg_iter, via callbacks from params object
|
|
|
|
|
|
|
|
|
|
template <size_t N, typename T, msg_iter_method<T> Method> struct GetArgument
|
|
|
|
|
template <size_t N, typename T, msg_iter_method<T> Method>
|
|
|
|
|
struct GetArgument
|
|
|
|
|
{
|
|
|
|
|
T operator()(World *w, sc_msg_iter *args)
|
|
|
|
|
{
|
|
|
|
|
@ -100,17 +109,21 @@ template <size_t N, typename T, msg_iter_method<T> Method> struct GetArgument
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// General cases
|
|
|
|
|
template <size_t N> struct ArgumentGetter<N, FloatT> : public GetArgument<N, float, &sc_msg_iter::getf>
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ArgumentGetter<N, FloatT> : public GetArgument<N, float, &sc_msg_iter::getf>
|
|
|
|
|
{};
|
|
|
|
|
|
|
|
|
|
template <size_t N> struct ArgumentGetter<N, LongT> : public GetArgument<N, int32, &sc_msg_iter::geti>
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ArgumentGetter<N, LongT> : public GetArgument<N, int32, &sc_msg_iter::geti>
|
|
|
|
|
{};
|
|
|
|
|
|
|
|
|
|
template <size_t N> struct ArgumentGetter<N, EnumT> : public GetArgument<N, int32, &sc_msg_iter::geti>
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ArgumentGetter<N, EnumT> : public GetArgument<N, int32, &sc_msg_iter::geti>
|
|
|
|
|
{};
|
|
|
|
|
|
|
|
|
|
// Specializations
|
|
|
|
|
template <size_t N> struct ArgumentGetter<N, BufferT>
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ArgumentGetter<N, BufferT>
|
|
|
|
|
{
|
|
|
|
|
auto operator()(World *w, sc_msg_iter *args)
|
|
|
|
|
{
|
|
|
|
|
@ -119,7 +132,8 @@ template <size_t N> struct ArgumentGetter<N, BufferT>
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <size_t N> struct ArgumentGetter<N, FloatPairsArrayT>
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ArgumentGetter<N, FloatPairsArrayT>
|
|
|
|
|
{
|
|
|
|
|
typename FloatPairsArrayT::type operator()(World *w, sc_msg_iter *args)
|
|
|
|
|
{
|
|
|
|
|
@ -127,19 +141,17 @@ template <size_t N> struct ArgumentGetter<N, FloatPairsArrayT>
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <size_t N> struct ArgumentGetter<N, FFTParamsT>
|
|
|
|
|
{
|
|
|
|
|
typename FFTParamsT::type operator()(World* w, sc_msg_iter *args)
|
|
|
|
|
template <size_t N>
|
|
|
|
|
struct ArgumentGetter<N, FFTParamsT>
|
|
|
|
|
{
|
|
|
|
|
return {args->geti(),args->geti(),args->geti()};
|
|
|
|
|
}
|
|
|
|
|
typename FFTParamsT::type operator()(World *w, sc_msg_iter *args) { return {args->geti(), args->geti(), args->geti()}; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Real Time Processor
|
|
|
|
|
|
|
|
|
|
template <typename Client,class Wrapper, class Params> class RealTime : public SCUnit
|
|
|
|
|
template <typename Client, class Wrapper, class Params>
|
|
|
|
|
class RealTime : public SCUnit
|
|
|
|
|
{
|
|
|
|
|
using HostVector = FluidTensorView<float, 1>;
|
|
|
|
|
// using Client = typename Wrapper::ClientType;
|
|
|
|
|
@ -162,24 +174,25 @@ public:
|
|
|
|
|
ft->fSendNodeReply(&unit->mParent->mNode, -1, ss.str().c_str(), 1, l);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RealTime():
|
|
|
|
|
mControlsIterator{mInBuf + mSpecialIndex + 1,mNumInputs - mSpecialIndex - 1},
|
|
|
|
|
mParams{*Wrapper::getParamDescriptors()},
|
|
|
|
|
mClient{Wrapper::setParams(mParams,mWorld->mVerbosity > 0, mWorld, mControlsIterator)}
|
|
|
|
|
RealTime()
|
|
|
|
|
: mControlsIterator{mInBuf + mSpecialIndex + 1, mNumInputs - mSpecialIndex - 1}
|
|
|
|
|
, mParams{*Wrapper::getParamDescriptors()}
|
|
|
|
|
, mClient{Wrapper::setParams(mParams, mWorld->mVerbosity > 0, mWorld, mControlsIterator)}
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
void init()
|
|
|
|
|
{
|
|
|
|
|
assert(!(mClient.audioChannelsOut() > 0 && mClient.controlChannelsOut() > 0) && "Client can't have both audio and control outputs");
|
|
|
|
|
assert(!(mClient.audioChannelsOut() > 0 && mClient.controlChannelsOut() > 0) &&
|
|
|
|
|
"Client can't have both audio and control outputs");
|
|
|
|
|
|
|
|
|
|
// If we don't the number of arguments we expect, the language side code is probably the wrong version
|
|
|
|
|
// set plugin to no-op, squawk, and bail;
|
|
|
|
|
if (mControlsIterator.size() != Wrapper::getParamDescriptors()->count())
|
|
|
|
|
{
|
|
|
|
|
mCalcFunc = Wrapper::getInterfaceTable()->fClearUnitOutputs;
|
|
|
|
|
std::cout << "ERROR: " << Wrapper::getName() <<
|
|
|
|
|
" wrong number of arguments. Expected " << Wrapper::getParamDescriptors()->count() <<
|
|
|
|
|
", got " << mControlsIterator.size() << ". Your .sc file and binary plugin might be different versions." << std::endl;
|
|
|
|
|
std::cout << "ERROR: " << Wrapper::getName() << " wrong number of arguments. Expected "
|
|
|
|
|
<< Wrapper::getParamDescriptors()->count() << ", got " << mControlsIterator.size()
|
|
|
|
|
<< ". Your .sc file and binary plugin might be different versions." << std::endl;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -200,10 +213,7 @@ public:
|
|
|
|
|
mOutputs.emplace_back(nullptr, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < mClient.controlChannelsOut(); ++i)
|
|
|
|
|
{
|
|
|
|
|
mOutputs.emplace_back(nullptr, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < mClient.controlChannelsOut(); ++i) { mOutputs.emplace_back(nullptr, 0, 0); }
|
|
|
|
|
|
|
|
|
|
set_calc_function<RealTime, &RealTime::next>();
|
|
|
|
|
Wrapper::getInterfaceTable()->fClearUnitOutputs(this, 1);
|
|
|
|
|
@ -212,7 +222,8 @@ public:
|
|
|
|
|
void next(int n)
|
|
|
|
|
{
|
|
|
|
|
mControlsIterator.reset(mInBuf + 1); // mClient.audioChannelsIn());
|
|
|
|
|
Wrapper::setParams(mParams,mWorld->mVerbosity > 0, mWorld,mControlsIterator); // forward on inputs N + audio inputs as params
|
|
|
|
|
Wrapper::setParams(mParams, mWorld->mVerbosity > 0, mWorld,
|
|
|
|
|
mControlsIterator); // forward on inputs N + audio inputs as params
|
|
|
|
|
const Unit *unit = this;
|
|
|
|
|
for (int i = 0; i < mClient.audioChannelsIn(); ++i)
|
|
|
|
|
{
|
|
|
|
|
@ -222,18 +233,17 @@ public:
|
|
|
|
|
{
|
|
|
|
|
if (mOutputConnections[i]) mOutputs[i].reset(out(i), 0, fullBufferSize());
|
|
|
|
|
}
|
|
|
|
|
for(int i = 0; i < mClient.controlChannelsOut();++i)
|
|
|
|
|
{
|
|
|
|
|
mOutputs[i].reset(out(i),0,1);
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < mClient.controlChannelsOut(); ++i) { mOutputs[i].reset(out(i), 0, 1); }
|
|
|
|
|
mClient.process(mAudioInputs, mOutputs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::vector<bool> mInputConnections;
|
|
|
|
|
std::vector<bool> mOutputConnections;
|
|
|
|
|
std::vector<HostVector> mAudioInputs;
|
|
|
|
|
std::vector<HostVector> mOutputs;
|
|
|
|
|
FloatControlsIter mControlsIterator;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
ParameterSet<Params> mParams;
|
|
|
|
|
Client mClient;
|
|
|
|
|
@ -241,14 +251,15 @@ protected:
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// Non Real Time Processor
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params> class NonRealTime
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params>
|
|
|
|
|
class NonRealTime
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static void setup(InterfaceTable *ft, const char *name) { DefinePlugInCmd(name, launch, nullptr); }
|
|
|
|
|
|
|
|
|
|
NonRealTime(World *world,sc_msg_iter *args):
|
|
|
|
|
mParams{*Wrapper::getParamDescriptors()},
|
|
|
|
|
mClient{mParams}
|
|
|
|
|
NonRealTime(World *world, sc_msg_iter *args)
|
|
|
|
|
: mParams{*Wrapper::getParamDescriptors()}
|
|
|
|
|
, mClient{mParams}
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
void init(){};
|
|
|
|
|
@ -256,16 +267,16 @@ public:
|
|
|
|
|
static void launch(World *world, void *inUserData, struct sc_msg_iter *args, void *replyAddr)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (args->tags && ((std::string{args->tags}.size() - 1) != Wrapper::getParamDescriptors()->count()))
|
|
|
|
|
{
|
|
|
|
|
std::cout << "ERROR: " << Wrapper::getName() <<
|
|
|
|
|
" wrong number of arguments. Expected " << Wrapper::getParamDescriptors()->count() <<
|
|
|
|
|
", got " << (std::string{args->tags}.size() - 1) << ". Your .sc file and binary plugin might be different versions." << std::endl;
|
|
|
|
|
std::cout << "ERROR: " << Wrapper::getName() << " wrong number of arguments. Expected "
|
|
|
|
|
<< Wrapper::getParamDescriptors()->count() << ", got " << (std::string{args->tags}.size() - 1)
|
|
|
|
|
<< ". Your .sc file and binary plugin might be different versions." << std::endl;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Wrapper *w = new Wrapper(world,args); //this has to be on the heap, because it doesn't get destoryed until the async command is done
|
|
|
|
|
Wrapper *w = new Wrapper(
|
|
|
|
|
world, args); // this has to be on the heap, because it doesn't get destoryed until the async command is done
|
|
|
|
|
|
|
|
|
|
int argsPosition = args->count;
|
|
|
|
|
auto argsRdPos = args->rdpos;
|
|
|
|
|
@ -283,28 +294,21 @@ public:
|
|
|
|
|
size_t msgSize = args->getbsize();
|
|
|
|
|
std::vector<char> completionMessage(msgSize);
|
|
|
|
|
// char * completionMsgData = 0;
|
|
|
|
|
if (msgSize)
|
|
|
|
|
{
|
|
|
|
|
args->getb(completionMessage.data(), msgSize);
|
|
|
|
|
}
|
|
|
|
|
if (msgSize) { args->getb(completionMessage.data(), msgSize); }
|
|
|
|
|
|
|
|
|
|
world->ft->fDoAsynchronousCommand(world, replyAddr, Wrapper::getName(), w, process, exchangeBuffers, tidyUp, destroy,msgSize, completionMessage.data());
|
|
|
|
|
world->ft->fDoAsynchronousCommand(world, replyAddr, Wrapper::getName(), w, process, exchangeBuffers, tidyUp, destroy,
|
|
|
|
|
msgSize, completionMessage.data());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool process(World *world, void *data) { return static_cast<Wrapper *>(data)->process(world); }
|
|
|
|
|
static bool exchangeBuffers(World *world, void *data) { return static_cast<Wrapper *>(data)->exchangeBuffers(world); }
|
|
|
|
|
static bool tidyUp(World *world, void *data) { return static_cast<Wrapper *>(data)->tidyUp(world); }
|
|
|
|
|
static void destroy(World *world, void *data)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// void* c = static_cast<Wrapper *>(data)->mCompletionMessage;
|
|
|
|
|
// if(c) world->ft->fRTFree(world,c);
|
|
|
|
|
delete static_cast<Wrapper *>(data);
|
|
|
|
|
}
|
|
|
|
|
static void destroy(World *world, void *data) { delete static_cast<Wrapper *>(data); }
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
ParameterSet<Params> mParams;
|
|
|
|
|
Client mClient;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static Result validateParameters(NonRealTime *w, World *world, sc_msg_iter *args)
|
|
|
|
|
{
|
|
|
|
|
@ -318,7 +322,7 @@ private:
|
|
|
|
|
|
|
|
|
|
bool process(World *world)
|
|
|
|
|
{
|
|
|
|
|
Result r = mClient.process();///mInputs, mOutputs);
|
|
|
|
|
Result r = mClient.process();
|
|
|
|
|
|
|
|
|
|
if (!r.ok())
|
|
|
|
|
{
|
|
|
|
|
@ -332,14 +336,11 @@ private:
|
|
|
|
|
bool exchangeBuffers(World *world)
|
|
|
|
|
{
|
|
|
|
|
mParams.template forEachParamType<BufferT, AssignBuffer>(world);
|
|
|
|
|
// for (auto &b : mBuffersOut) b.assignToRT(world);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool tidyUp(World *world)
|
|
|
|
|
{
|
|
|
|
|
// for (auto &b : mBuffersIn) b.cleanUp();
|
|
|
|
|
// for (auto &b : mBuffersOut) b.cleanUp()
|
|
|
|
|
mParams.template forEachParamType<BufferT, CleanUpBuffer>();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@ -349,8 +350,7 @@ private:
|
|
|
|
|
{
|
|
|
|
|
void operator()(typename BufferT::type &p, World *w)
|
|
|
|
|
{
|
|
|
|
|
if(auto b = static_cast<SCBufferAdaptor*>(p.get()))
|
|
|
|
|
b->assignToRT(w);
|
|
|
|
|
if (auto b = static_cast<SCBufferAdaptor *>(p.get())) b->assignToRT(w);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -359,15 +359,10 @@ private:
|
|
|
|
|
{
|
|
|
|
|
void operator()(typename BufferT::type &p)
|
|
|
|
|
{
|
|
|
|
|
if(auto b = static_cast<SCBufferAdaptor*>(p.get()))
|
|
|
|
|
b->cleanUp();
|
|
|
|
|
if (auto b = static_cast<SCBufferAdaptor *>(p.get())) b->cleanUp();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// std::vector<SCBufferAdaptor> mBuffersIn;
|
|
|
|
|
// std::vector<SCBufferAdaptor> mBuffersOut;
|
|
|
|
|
// std::vector<BufferProcessSpec> mInputs;
|
|
|
|
|
// std::vector<BufferProcessSpec> mOutputs;
|
|
|
|
|
char * mCompletionMessage = nullptr;
|
|
|
|
|
void * mReplyAddr = nullptr;
|
|
|
|
|
const char *mName = nullptr;
|
|
|
|
|
@ -375,7 +370,8 @@ private:
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// An impossible monstrosty
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params> class NonRealTimeAndRealTime : public RealTime<Client,Wrapper, Params>, public NonRealTime<Client,Wrapper, Params>
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params>
|
|
|
|
|
class NonRealTimeAndRealTime : public RealTime<Client, Wrapper, Params>, public NonRealTime<Client, Wrapper, Params>
|
|
|
|
|
{
|
|
|
|
|
static void setup(InterfaceTable *ft, const char *name)
|
|
|
|
|
{
|
|
|
|
|
@ -387,27 +383,34 @@ template <typename Client, typename Wrapper, typename Params> class NonRealTimeA
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Template Specialisations for NRT/RT
|
|
|
|
|
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params, typename NRT, typename RT> class FluidSCWrapperImpl;
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params, typename NRT, typename RT>
|
|
|
|
|
class FluidSCWrapperImpl;
|
|
|
|
|
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params> class FluidSCWrapperImpl<Client, Wrapper, Params, std::true_type, std::false_type> : public NonRealTime<Client, Wrapper, Params>
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params>
|
|
|
|
|
class FluidSCWrapperImpl<Client, Wrapper, Params, std::true_type, std::false_type>
|
|
|
|
|
: public NonRealTime<Client, Wrapper, Params>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FluidSCWrapperImpl(World* w, sc_msg_iter *args): NonRealTime<Client, Wrapper, Params>(w,args){};
|
|
|
|
|
FluidSCWrapperImpl(World *w, sc_msg_iter *args)
|
|
|
|
|
: NonRealTime<Client, Wrapper, Params>(w, args){};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params> class FluidSCWrapperImpl<Client, Wrapper,Params, std::false_type, std::true_type> : public RealTime<Client, Wrapper, Params>
|
|
|
|
|
template <typename Client, typename Wrapper, typename Params>
|
|
|
|
|
class FluidSCWrapperImpl<Client, Wrapper, Params, std::false_type, std::true_type> : public RealTime<Client, Wrapper, Params>
|
|
|
|
|
{};
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Make base class(es), full of CRTP mixin goodness
|
|
|
|
|
template <typename Client, typename Params>
|
|
|
|
|
using FluidSCWrapperBase = FluidSCWrapperImpl<Client, FluidSCWrapper<Client, Params>,Params, isNonRealTime<Client>, isRealTime<Client>>;
|
|
|
|
|
using FluidSCWrapperBase =
|
|
|
|
|
FluidSCWrapperImpl<Client, FluidSCWrapper<Client, Params>, Params, isNonRealTime<Client>, isRealTime<Client>>;
|
|
|
|
|
|
|
|
|
|
} // namespace impl
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// The main wrapper
|
|
|
|
|
template <typename C, typename P> class FluidSCWrapper : public impl::FluidSCWrapperBase<C,P>
|
|
|
|
|
template <typename C, typename P>
|
|
|
|
|
class FluidSCWrapper : public impl::FluidSCWrapperBase<C, P>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
@ -415,11 +418,15 @@ public:
|
|
|
|
|
using Params = P;
|
|
|
|
|
|
|
|
|
|
FluidSCWrapper() // mParams{*getParamDescriptors()}, //impl::FluidSCWrapperBase<Client,Params>()
|
|
|
|
|
{ impl::FluidSCWrapperBase<Client,Params>::init(); }
|
|
|
|
|
|
|
|
|
|
FluidSCWrapper(World* w, sc_msg_iter *args): impl::FluidSCWrapperBase<Client, Params>(w,args)
|
|
|
|
|
{ impl::FluidSCWrapperBase<Client, Params>::init(); }
|
|
|
|
|
{
|
|
|
|
|
impl::FluidSCWrapperBase<Client, Params>::init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluidSCWrapper(World *w, sc_msg_iter *args)
|
|
|
|
|
: impl::FluidSCWrapperBase<Client, Params>(w, args)
|
|
|
|
|
{
|
|
|
|
|
impl::FluidSCWrapperBase<Client, Params>::init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *getName(const char *setName = nullptr)
|
|
|
|
|
{
|
|
|
|
|
@ -462,13 +469,6 @@ public:
|
|
|
|
|
p.template setParameterValues<impl::ArgumentGetter>(verbose, world, args);
|
|
|
|
|
return p;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// impl::ParameterSet<Params> mParams;
|
|
|
|
|
|
|
|
|
|
// Client &client() { return mClient; }
|
|
|
|
|
//
|
|
|
|
|
//private:
|
|
|
|
|
// Client mClient;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <template <typename...> class Client, typename... Rest, typename Params>
|
|
|
|
|
@ -479,3 +479,4 @@ void makeSCWrapper(const char *name, Params& params, InterfaceTable *ft)
|
|
|
|
|
|
|
|
|
|
} // namespace client
|
|
|
|
|
} // namespace fluid
|
|
|
|
|
|
|
|
|
|
|