added
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@880 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#ifndef NULLSINK_HPP
|
||||
#define NULLSINK_HPP
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Block.hpp>
|
||||
|
||||
class NullSink : public Block
|
||||
{
|
||||
public:
|
||||
NullSink(DType dt_in)
|
||||
: Block(1, 0, dt_in, DType::None)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual ~NullSink() = default;
|
||||
|
||||
void process(IBuffer &in) override
|
||||
{
|
||||
if (dtype_in() == DType::Double)
|
||||
{
|
||||
auto buf = reinterpret_cast<Buffer<double>&>(in);
|
||||
process_double(buf);
|
||||
}
|
||||
}
|
||||
|
||||
void process_double(Buffer<double> &buf)
|
||||
{
|
||||
buf.consume(buf.len());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user