v2.0.0
Loading...
Searching...
No Matches
mne_event_list.h
Go to the documentation of this file.
1//=============================================================================================================
16
17#ifndef MNE_EVENT_LIST_H
18#define MNE_EVENT_LIST_H
19
20//=============================================================================================================
21// INCLUDES
22//=============================================================================================================
23
24#include "mne_global.h"
25#include "mne_event.h"
26
27#include <memory>
28#include <vector>
29
30//=============================================================================================================
31// DEFINE NAMESPACE MNELIB
32//=============================================================================================================
33
34namespace MNELIB
35{
36
37//=============================================================================================================
44{
45public:
46 MNEEventList() = default;
47 ~MNEEventList() = default;
48
50 {
51 events.reserve(other.events.size());
52 for (const auto& e : other.events)
53 events.push_back(std::make_unique<MNEEvent>(*e));
54 }
55
57 {
58 if (this != &other) {
59 events.clear();
60 events.reserve(other.events.size());
61 for (const auto& e : other.events)
62 events.push_back(std::make_unique<MNEEvent>(*e));
63 }
64 return *this;
65 }
66
69
70 //=========================================================================================================
74 int nevent() const { return static_cast<int>(events.size()); }
75
76 std::vector<std::unique_ptr<MNEEvent>> events;
77};
78
79} // namespace MNELIB
80
81#endif // MNE_EVENT_LIST_H
Single recorded event (sample, previous and new trigger code).
MNELIB shared-library export/import macros and library build metadata.
#define MNESHARED_EXPORT
Definition mne_global.h:40
Core MNE data structures (source spaces, source estimates, hemispheres).
std::vector< std::unique_ptr< MNEEvent > > events
MNEEventList & operator=(MNEEventList &&)=default
MNEEventList & operator=(const MNEEventList &other)
MNEEventList(MNEEventList &&)=default
int nevent() const
Returns the number of events in the list.
MNEEventList(const MNEEventList &other)