forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOutputProcess.h
60 lines (50 loc) · 2.12 KB
/
OutputProcess.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
/***************************************************************
* This source files comes from the xLights project
* https://www.xlights.org
* https://github.com/smeighan/xLights
* See the github commit history for a record of contributing
* developers.
* Copyright claimed based on commit dates recorded in Github
* License: https://github.com/smeighan/xLights/blob/master/License.txt
**************************************************************/
#include <string>
#include <wx/wx.h>
class wxXmlNode;
class OutputManager;
class OutputProcessExcludeDim;
class OutputProcess
{
protected:
std::string _description;
std::string _startChannel;
int _changeCount;
int _lastSavedChangeCount;
bool _enabled;
OutputManager* _outputManager;
long _sc;
void Save(wxXmlNode* node);
public:
static OutputProcess* CreateFromXml(OutputManager* outputManager, wxXmlNode* node);
bool IsDirty() const { return _changeCount != _lastSavedChangeCount; };
void ClearDirty() { _lastSavedChangeCount = _changeCount; };
OutputProcess(OutputManager* outputManager, wxXmlNode* node);
OutputProcess(OutputManager* outputManager);
OutputProcess(const OutputProcess& op);
OutputProcess(OutputManager* outputManager, std::string startChannel, const std::string& description);
std::string GetDescription() const { return _description; }
virtual ~OutputProcess() {}
virtual wxXmlNode* Save() = 0;
std::string GetStartChannel() const { return _startChannel; }
size_t GetStartChannelAsNumber();
virtual size_t GetP1() const = 0;
virtual size_t GetP2() const = 0;
virtual std::string GetType() const = 0;
bool IsEnabled() const
{
return _enabled;
}
void Enable(bool enable) { _enabled = enable; _changeCount++; }
static std::list<OutputProcessExcludeDim*> GetExcludeDim(std::list<OutputProcess*>& processes, size_t sc, size_t ec);
virtual void Frame(uint8_t* buffer, size_t size, std::list<OutputProcess*>& processes) = 0;
};