git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@884 b431acfa-c32f-4a4a-93f1-934dc6c82436
38 lines
575 B
C++
38 lines
575 B
C++
#ifndef TESTBLOCK_HPP
|
|
#define TESTBLOCK_HPP
|
|
|
|
#pragma once
|
|
|
|
#include <Block.hpp>
|
|
|
|
using DTIN = double;
|
|
using DTOUT = double;
|
|
|
|
class TestBlock : public Block
|
|
{
|
|
public:
|
|
TestBlock(size_t bufSize)
|
|
: Block(1, 1, DType::Double, DType::Double)
|
|
, m_buf_in(bufSize)
|
|
{
|
|
|
|
}
|
|
virtual ~TestBlock() = default;
|
|
|
|
void process() override
|
|
{
|
|
Buffer<DTOUT> *buf_out = dynamic_cast<Buffer<DTOUT>*>(m_buf_out);
|
|
process(m_buf_in, *buf_out);
|
|
}
|
|
|
|
void process(Buffer<DTIN> &in, Buffer<DTOUT> &out);
|
|
IBuffer* buffer()
|
|
{
|
|
return &m_buf_in;
|
|
}
|
|
|
|
private:
|
|
Buffer<DTIN> m_buf_in;
|
|
};
|
|
|
|
#endif |