v2.0.0
Loading...
Searching...
No Matches
eventgroup.h
Go to the documentation of this file.
1//=============================================================================================================
35
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//=============================================================================================================
77{
78 //=========================================================================================================
82 RgbColor();
83
84 //=========================================================================================================
92 RgbColor(const uchar rRhs, const uchar gRhs, const uchar bRhs);
93
94 //=========================================================================================================
103 RgbColor(const uchar rRhs, const uchar gRhs,
104 const uchar bRhs, const uchar aRhs);
105
110};
111
119{
120
121 //=========================================================================================================
125 EventGroup() = default;
126
127 //=========================================================================================================
134
135 //=========================================================================================================
142
144 std::string name;
146 int order;
147};
148
149namespace EVENTSINTERNAL {
150
157{
158public:
159
160 //=========================================================================================================
166 EventGroupINT(const char* name);
167
168 //=========================================================================================================
174 EventGroupINT(std::string&& name);
175
176 //=========================================================================================================
183 EventGroupINT(idNum id, const std::string& name);
184
185 //=========================================================================================================
193 EventGroupINT(idNum id, const std::string& name, const EVENTSLIB::RgbColor& color);
194
195 //=========================================================================================================
201 void setColor(const EVENTSLIB::RgbColor& color);
202
203 //=========================================================================================================
207 void setRandomColor();
208
209 //=========================================================================================================
216
217 //=========================================================================================================
223 const std::string& getName() const;
224
225 //=========================================================================================================
231 void setName(const std::string& sName);
232
233 //=========================================================================================================
239 idNum getId() const;
240
241 //=========================================================================================================
247 std::string getDescription() const;
248
249 //=========================================================================================================
255 int getOrder() const;
256
257 //=========================================================================================================
263 void setOrder(int order);
264
265 //=========================================================================================================
273 bool operator<(const EventGroupINT& groupRHS) const;
274
275private:
276 std::string m_sName;
277 EVENTSLIB::RgbColor m_Color;
278 idNum m_Id;
279 std::string m_sDescription;
280 int m_order;
281};
282
283} //namespace EVENTSINTERNAL
284} //namespace EVENTSLIB
285#endif // EVENTGROUP_H
unsigned char uchar
Definition eventgroup.h:52
unsigned int idNum
Definition eventgroup.h:51
event library export/import macros.
#define EVENTS_EXPORT
Event annotation management (creation, grouping, shared-memory transport).
Definition event.h:56
Simple RGB triplet for color-coding event groups.
Definition eventgroup.h:77
EventGroup class is designed as a data holder for a group. It is designed towards ease of use for a c...
Definition eventgroup.h:119
the class stores the concept of an event group internally in the Event library.
Definition eventgroup.h:157
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