v2.0.0
Loading...
Searching...
No Matches
mne_event_list.h
Go to the documentation of this file.
1#ifndef MNE_EVENT_LIST_H
2#define MNE_EVENT_LIST_H
3
4//=============================================================================================================
5// INCLUDES
6//=============================================================================================================
7
8#include "mne_global.h"
9#include "mne_event.h"
10
11#include <memory>
12#include <vector>
13
14//=============================================================================================================
15// DEFINE NAMESPACE MNELIB
16//=============================================================================================================
17
18namespace MNELIB
19{
20
21//=============================================================================================================
28{
29public:
30 MNEEventList() = default;
31 ~MNEEventList() = default;
32
34 {
35 events.reserve(other.events.size());
36 for (const auto& e : other.events)
37 events.push_back(std::make_unique<MNEEvent>(*e));
38 }
39
41 {
42 if (this != &other) {
43 events.clear();
44 events.reserve(other.events.size());
45 for (const auto& e : other.events)
46 events.push_back(std::make_unique<MNEEvent>(*e));
47 }
48 return *this;
49 }
50
53
54 //=========================================================================================================
58 int nevent() const { return static_cast<int>(events.size()); }
59
60 std::vector<std::unique_ptr<MNEEvent>> events;
61};
62
63} // namespace MNELIB
64
65#endif // MNE_EVENT_LIST_H
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)