5 #ifndef LODESTAR_BUFFERBLOCK_HPP
6 #define LODESTAR_BUFFERBLOCK_HPP
8 #include <Lodestar/blocks/Block.hpp>
13 template<
typename TInput,
unsigned int NSize=2>
17 typename ls::aux::TemplateTools::repeat<TInput, NSize, ::std::tuple>::type,
24 typename ls::aux::TemplateTools::repeat<TInput, NSize, ::std::tuple>::type,
33 void clear(TInput value)
38 void clear(TInput &value)
40 return clearRef_(value);
47 this->equation = ::std::bind(
50 ::std::placeholders::_1
54 void triggerFunction(
Base &b)
59 template<
unsigned int NIdx = NSize - 1>
60 typename ::std::enable_if<(NIdx > 0),
void>::type
63 this->
template o<NIdx>().object = this->
template o<NIdx-1>().
object;
64 this->
template o<NIdx>().propagate();
66 return update<NIdx - 1>();
69 template<
unsigned int NIdx = NSize - 1>
70 typename ::std::enable_if<(NIdx == 0),
void>::type
73 this->
template o<NIdx>() = this->
template i<NIdx>();
76 template<
unsigned int NIdx = NSize - 1>
77 typename ::std::enable_if<(NIdx < 0), void>::type
83 template<
unsigned int NIdx = NSize - 1>
84 typename ::std::enable_if<(NIdx > 0),
void>::type
85 clearRef_(
const TInput &value)
87 this->
template o<NIdx>() = value;
89 return clearRef_<NIdx - 1>(value);
92 template<
unsigned int NIdx = NSize - 1>
93 typename ::std::enable_if<(NIdx == 0),
void>::type
94 clearRef_(
const TInput &value)
96 this->
template o<NIdx>() = value;
99 template<
unsigned int NIdx = NSize - 1>
100 typename ::std::enable_if<(NIdx < 0), void>::type
101 clearRef_(
const TInput &value)
106 template<
unsigned int NIdx = NSize - 1>
107 typename ::std::enable_if<(NIdx > 0),
void>::type
108 clear_(
const TInput value)
110 this->
template o<NIdx>() = value;
112 return clear_<NIdx - 1>(value);
115 template<
unsigned int NIdx = NSize - 1>
116 typename ::std::enable_if<(NIdx == 0),
void>::type
117 clear_(
const TInput value)
119 this->
template o<NIdx>() = value;
122 template<
unsigned int NIdx = NSize - 1>
123 typename ::std::enable_if<(NIdx < 0), void>::type
124 clear_(
const TInput value)
131 template<
typename TInput,
unsigned int NSize>
148 static const ::std::array<::std::string, kIns>
inTypes;
149 static const ::std::array<::std::string, kOuts>
outTypes;
150 static const ::std::array<::std::string, kPars>
parTypes;
155 template<
typename TInput,
unsigned int NSize>
157 {demangle(
typeid(TInput).name())};
159 template<
typename TInput,
unsigned int NSize>
160 const ::std::array<::std::string, BlockTraits<std::BufferBlock<TInput, NSize>>::kOuts> BlockTraits<std::BufferBlock<TInput, NSize>>::outTypes =
161 {demangle(
typeid(TInput).name())};
163 template<
typename TInput,
unsigned int NSize>
164 const ::std::array<::std::string, BlockTraits<std::BufferBlock<TInput, NSize>>::kPars> BlockTraits<std::BufferBlock<TInput, NSize>>::parTypes =
167 template<
typename TInput,
unsigned int NSize>
168 const ::std::array<::std::string, 2> BlockTraits<std::BufferBlock<TInput, NSize>>::templateTypes =
169 {demangle(
typeid(TInput).name()),
"unsigned int"};
173 #endif //LODESTAR_BUFFERBLOCK_HPP