MNE-CPP
0.1.9
A Framework for Electrophysiology
libraries
events
event.cpp
Go to the documentation of this file.
1
//=============================================================================================================
36
//=============================================================================================================
37
// INCLUDES
38
//=============================================================================================================
39
40
#include "
event.h
"
41
#include "
eventgroup.h
"
42
43
//=============================================================================================================
44
// QT INCLUDES
45
//=============================================================================================================
46
47
//=============================================================================================================
48
// EIGEN INCLUDES
49
//=============================================================================================================
50
51
//=============================================================================================================
52
// USED NAMESPACES
53
//=============================================================================================================
54
55
using namespace
EVENTSLIB
;
56
57
//=============================================================================================================
58
// INIT STATIC MEMBERS
59
//=============================================================================================================
60
61
//=============================================================================================================
62
// DEFINE MEMBER METHODS
63
//=============================================================================================================
64
65
Event::Event
()
66
:
Event
(0,0,0)
67
{ }
68
69
//=============================================================================================================
70
71
Event::Event
(
const
idNum
id
,
const
int
sample
,
const
idNum
groupId
)
72
: id(id)
73
, sample(sample)
74
, groupId(groupId)
75
{ }
76
77
//=============================================================================================================
78
79
Event::Event
(
const
EVENTSINTERNAL::EventINT
& e)
80
:
Event
(e.getId(), e.getSample(), e.getGroupId())
81
{ }
82
83
//=============================================================================================================
84
85
EVENTSINTERNAL::EventINT::EventINT
(idNum
id
)
86
:
EventINT
(id, 0, 0)
87
{ }
88
89
//=============================================================================================================
90
91
EVENTSINTERNAL::EventINT::EventINT
(idNum
id
,
int
iSample, idNum groupId)
92
: m_iId(id)
93
, m_iSample(iSample)
94
, m_iGroup(groupId)
95
, m_sDescription(
""
)
96
{ }
97
98
//=============================================================================================================
99
100
EVENTSINTERNAL::EventINT::EventINT
(
const
EventINT
& rhs)
101
: m_iId(rhs.
getId
())
102
, m_iSample(rhs.
getSample
())
103
, m_iGroup(rhs.
getGroupId
())
104
, m_sDescription(rhs.
getDescription
())
105
{ }
106
107
//=============================================================================================================
108
109
EVENTSINTERNAL::EventINT::EventINT
(
EventINT
&& other)
110
: m_iId(other.
getId
())
111
, m_iSample(other.
getSample
())
112
, m_iGroup(other.
getGroupId
())
113
, m_sDescription(other.
getDescription
())
114
{ }
115
116
//=============================================================================================================
117
118
int
EVENTSINTERNAL::EventINT::getSample
()
const
119
{
120
return
m_iSample;
121
}
122
123
//=============================================================================================================
124
125
void
EVENTSINTERNAL::EventINT::setSample
(
int
iSample)
126
{
127
m_iSample = iSample;
128
}
129
130
//=============================================================================================================
131
132
idNum
EVENTSINTERNAL::EventINT::getGroupId
()
const
133
{
134
return
m_iGroup;
135
}
136
137
//=============================================================================================================
138
139
void
EVENTSINTERNAL::EventINT::setGroupId
(idNum iGroup)
140
{
141
m_iGroup = iGroup;
142
}
143
144
//=============================================================================================================
145
146
idNum
EVENTSINTERNAL::EventINT::getId
()
const
147
{
148
return
m_iId;
149
}
150
151
//=============================================================================================================
152
153
std::string
EVENTSINTERNAL::EventINT::getDescription
()
const
154
{
155
return
m_sDescription;
156
}
157
158
//=============================================================================================================
159
160
bool
EVENTSINTERNAL::EventINT::operator<
(
const
EventINT
& rhs)
const
161
{
162
return
m_iSample < rhs.
getSample
();
163
}
164
165
//=============================================================================================================
166
167
bool
EVENTSINTERNAL::EventINT::operator==
(
const
EventINT
& rhs)
const
168
{
169
return
(m_iId == rhs.
getId
());
170
}
171
172
EVENTSINTERNAL::EventINT
EVENTSINTERNAL::EventINT::operator=
(
const
EventINT
& rhs)
173
{
174
return
EVENTSINTERNAL::EventINT
(rhs);
175
}
eventgroup.h
EventGroup declaration.
EVENTSLIB::Event::Event
Event()
Definition:
event.cpp:65
EVENTSLIB::EVENTSINTERNAL::EventINT::getId
idNum getId() const
Definition:
event.cpp:146
EVENTSLIB::EVENTSINTERNAL::EventINT::setSample
void setSample(int iSample)
Definition:
event.cpp:125
EVENTSLIB::EVENTSINTERNAL::EventINT::setGroupId
void setGroupId(idNum iGroup)
Definition:
event.cpp:139
EVENTSLIB::Event
Definition:
event.h:71
event.h
Event declaration.
EVENTSLIB::Event::groupId
idNum groupId
Definition:
event.h:99
EVENTSLIB
Definition:
event.h:56
EVENTSLIB::EVENTSINTERNAL::EventINT::getGroupId
idNum getGroupId() const
Definition:
event.cpp:132
EVENTSLIB::EVENTSINTERNAL::EventINT::operator<
bool operator<(const EventINT &rhs) const
Definition:
event.cpp:160
EVENTSLIB::EVENTSINTERNAL::EventINT::getSample
int getSample() const
Definition:
event.cpp:118
EVENTSLIB::EVENTSINTERNAL::EventINT::operator==
bool operator==(const EventINT &rhs) const
Definition:
event.cpp:167
EVENTSLIB::EVENTSINTERNAL::EventINT
Definition:
event.h:115
EVENTSLIB::EVENTSINTERNAL::EventINT::getDescription
std::string getDescription() const
Definition:
event.cpp:153
EVENTSLIB::EVENTSINTERNAL::EventINT::operator=
EventINT operator=(const EventINT &rhs)
Definition:
event.cpp:172
EVENTSLIB::Event::sample
int sample
Definition:
event.h:98
EVENTSLIB::EVENTSINTERNAL::EventINT::EventINT
EventINT(idNum id)
Definition:
event.cpp:85
Generated on Thu May 26 2022 14:44:32 for MNE-CPP by
1.8.13