1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 03:45:56 +01:00
Clementine-audio-player-Mac.../3rdparty/libprojectm/NativePresetFactory/NativePreset.hpp

39 lines
859 B
C++
Raw Normal View History

2010-06-06 23:43:45 +02:00
/*
* Preset.hpp
*
* Created on: Aug 5, 2008
* Author: carm
*/
#ifndef __NATIVE_PRESET_HPP_
#define __NATIVE_PRESET_HPP_
#include <string>
#include "BeatDetect.hpp"
#include "Pipeline.hpp"
#include "PipelineContext.hpp"
#include "Preset.hpp"
/// A templated preset class to build different various hard coded presets and
/// compile them into object files to be loaded into a playlist
template <class PipelineT>
class NativePreset : public Preset {
public:
inline NativePreset(const std::string & name=std::string(),
const std::string & author = std::string()) : Preset(name, author) {}
virtual ~NativePreset() {}
inline PipelineT & pipeline() { return _pipeline; }
inline virtual void Render(const BeatDetect &music, const PipelineContext &context) {
_pipeline.Render(music, context);
}
private:
PipelineT _pipeline;
};
#endif