MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
eventgroup.h
Go to the documentation of this file.
1//=============================================================================================================
36#ifndef EVENTGROUP_EVENTS_H
37#define EVENTGROUP_EVENTS_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include <string>
44#include <cstdint>
45#include "events_global.h"
46
47//=============================================================================================================
48// LOCAL DEFINITIONS
49//=============================================================================================================
50
51using idNum = unsigned int; //We want to eventually modify the idNum to be a hash string or a user-defined class. For now, just an int.
52using uchar = unsigned char;
53
54//=============================================================================================================
55// NAMESPACE EVENTSLIB
56//=============================================================================================================
57
58namespace EVENTSLIB {
59
60//=============================================================================================================
61// EVENTSINTERNAL FORWARD DECLARATIONS
62//=============================================================================================================
63
64namespace EVENTSINTERNAL {
65 class EventGroupINT;
66}
67
68//=============================================================================================================
75{
76 //=========================================================================================================
80 RgbColor();
81
82 //=========================================================================================================
90 RgbColor(const uchar rRhs, const uchar gRhs, const uchar bRhs);
91
92 //=========================================================================================================
101 RgbColor(const uchar rRhs, const uchar gRhs,
102 const uchar bRhs, const uchar aRhs);
103
104 uchar r;
105 uchar g;
106 uchar b;
107 uchar a;
108};
109
117{
118
119 //=========================================================================================================
123 EventGroup() = default;
124
125 //=========================================================================================================
132
133 //=========================================================================================================
140
141 idNum id;
142 std::string name;
144 int order;
145};
146
147namespace EVENTSINTERNAL {
148
155{
156public:
157
158 //=========================================================================================================
164 EventGroupINT(const char* name);
165
166 //=========================================================================================================
172 EventGroupINT(std::string&& name);
173
174 //=========================================================================================================
181 EventGroupINT(idNum id, const std::string& name);
182
183 //=========================================================================================================
191 EventGroupINT(idNum id, const std::string& name, const EVENTSLIB::RgbColor& color);
192
193 //=========================================================================================================
199 void setColor(const EVENTSLIB::RgbColor& color);
200
201 //=========================================================================================================
205 void setRandomColor();
206
207 //=========================================================================================================
214
215 //=========================================================================================================
221 const std::string& getName() const;
222
223 //=========================================================================================================
229 void setName(const std::string& sName);
230
231 //=========================================================================================================
237 idNum getId() const;
238
239 //=========================================================================================================
245 std::string getDescription() const;
246
247 //=========================================================================================================
253 int getOrder() const;
254
255 //=========================================================================================================
261 void setOrder(int order);
262
263 //=========================================================================================================
271 bool operator<(const EventGroupINT& groupRHS) const;
272
273private:
274 std::string m_sName;
275 EVENTSLIB::RgbColor m_Color;
276 idNum m_Id;
277 std::string m_sDescription;
278 int m_order;
279};
280
281} //namespace EVENTSINTERNAL
282} //namespace EVENTSLIB
283#endif // EVENTGROUP_H
event library export/import macros.
#define EVENTS_EXPORT
EventGroup class is designed as a data holder for a group. It is designed towards ease of use for a c...
Definition eventgroup.h:117
the class stores the concept of an event group internally in the Event library.
Definition eventgroup.h:155
EVENTSLIB::RgbColor getColor() const
void setColor(const EVENTSLIB::RgbColor &color)
void setName(const std::string &sName)
const std::string & getName() const
bool operator<(const EventGroupINT &groupRHS) const