Commit efdb0cf5 authored by Robert Manzke's avatar Robert Manzke

initial

parents
cmake_minimum_required(VERSION 3.0.0)
project(CTAG-Plug VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CTest)
enable_testing()
add_executable(CTAG-Plug main.cpp ctagAudioPluginAM.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
#include <iostream>
#include "registerer.hpp"
class ctagAudioPlugin {
public:
virtual ~ctagAudioPlugin() {}
virtual void Process() const = 0;
};
#include "ctagAudioPluginAM.hpp"
void ctagAudioPluginAM::Process () const {
std::cout << "ctag AM\n";
}
\ No newline at end of file
#include "ctagAudioPlugin.hpp"
#include <iostream>
class ctagAudioPluginAM : public ctagAudioPlugin{
REGISTER("ctagAudioPluginAM", ctagAudioPlugin);
public:
void Process() const override;
};
\ No newline at end of file
#include "registerer.hpp"
#include "ctagAudioPlugin.hpp"
#include <iostream>
using factory::Registry;
int main(int, char**) {
std::unique_ptr<ctagAudioPlugin> shape = Registry<ctagAudioPlugin>::New("ctagAudioPluginAM");
assert(shape);
shape->Process(); // will draw a rectangle!
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment