v2.0.0
Loading...
Searching...
No Matches
mne_event_list.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef MNE_EVENT_LIST_H
38#define MNE_EVENT_LIST_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "mne_global.h"
45#include "mne_event.h"
46
47#include <memory>
48#include <vector>
49
50//=============================================================================================================
51// DEFINE NAMESPACE MNELIB
52//=============================================================================================================
53
54namespace MNELIB
55{
56
57//=============================================================================================================
64{
65public:
66 MNEEventList() = default;
67 ~MNEEventList() = default;
68
70 {
71 events.reserve(other.events.size());
72 for (const auto& e : other.events)
73 events.push_back(std::make_unique<MNEEvent>(*e));
74 }
75
77 {
78 if (this != &other) {
79 events.clear();
80 events.reserve(other.events.size());
81 for (const auto& e : other.events)
82 events.push_back(std::make_unique<MNEEvent>(*e));
83 }
84 return *this;
85 }
86
89
90 //=========================================================================================================
94 int nevent() const { return static_cast<int>(events.size()); }
95
96 std::vector<std::unique_ptr<MNEEvent>> events;
97};
98
99} // namespace MNELIB
100
101#endif // MNE_EVENT_LIST_H
MNEEvent class declaration.
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
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)