forked from projectM-visualizer/projectm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PresetFactory.hpp
42 lines (32 loc) · 1.01 KB
/
PresetFactory.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// C++ Interface: PresetFactory
//
// Description:
//
//
// Author: Carmelo Piccione <[email protected]>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "Preset.hpp"
#include <memory>
#ifndef __PRESET_FACTORY_HPP
#define __PRESET_FACTORY_HPP
class PresetFactory {
public:
static const std::string IDLE_PRESET_PROTOCOL;
static std::string protocol(const std::string & url, std::string & path);
inline PresetFactory() {}
inline virtual ~PresetFactory() {}
/// Constructs a new preset given an url and optional meta data
/// \param url a locational identifier referencing the preset
/// \param name the preset name
/// \param author the preset author
/// \returns a valid preset object
virtual std::unique_ptr<Preset> allocate(const std::string & url, const std::string & name=std::string(),
const std::string & author=std::string()) = 0;
/// Returns a space separated list of supported extensions
virtual std::string supportedExtensions() const = 0;
};
#endif