v2.0.0
Loading...
Searching...
No Matches
mne_mgh_tag_group.h
Go to the documentation of this file.
1//=============================================================================================================
35
36#ifndef MNEMGHTAGGROUP_H
37#define MNEMGHTAGGROUP_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "mne_global.h"
44#include "mne_mgh_tag.h"
45
46//=============================================================================================================
47// STL INCLUDES
48//=============================================================================================================
49
50#include <memory>
51#include <vector>
52
53//=============================================================================================================
54// QT INCLUDES
55//=============================================================================================================
56
57#include <QSharedPointer>
58
59//=============================================================================================================
60// DEFINE NAMESPACE MNELIB
61//=============================================================================================================
62
63namespace MNELIB
64{
65
66//=============================================================================================================
73{
74public:
75 typedef QSharedPointer<MNEMghTagGroup> SPtr;
76 typedef QSharedPointer<const MNEMghTagGroup> ConstSPtr;
77
78 //=========================================================================================================
82 MNEMghTagGroup() = default;
83
85 {
86 tags.reserve(other.tags.size());
87 for (const auto& t : other.tags)
88 tags.push_back(std::make_unique<MNEMghTag>(*t));
89 }
90
92 {
93 if (this != &other) {
94 tags.clear();
95 tags.reserve(other.tags.size());
96 for (const auto& t : other.tags)
97 tags.push_back(std::make_unique<MNEMghTag>(*t));
98 }
99 return *this;
100 }
101
104
105 //=========================================================================================================
109 ~MNEMghTagGroup() = default;
110
111public:
112 std::vector<std::unique_ptr<MNEMghTag>> tags;
113
117 int ntags() const { return static_cast<int>(tags.size()); }
118};
119
120//=============================================================================================================
121// INLINE DEFINITIONS
122//=============================================================================================================
123} // NAMESPACE MNELIB
124
125#endif // MNEMGHTAGGROUP_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
MNEMghTag class declaration.
Core MNE data structures (source spaces, source estimates, hemispheres).
QSharedPointer< MNEMghTagGroup > SPtr
int ntags() const
Returns the number of tags in the group.
MNEMghTagGroup & operator=(const MNEMghTagGroup &other)
MNEMghTagGroup(MNEMghTagGroup &&)=default
std::vector< std::unique_ptr< MNEMghTag > > tags
QSharedPointer< const MNEMghTagGroup > ConstSPtr
MNEMghTagGroup & operator=(MNEMghTagGroup &&)=default
MNEMghTagGroup(const MNEMghTagGroup &other)