v2.0.0
Loading...
Searching...
No Matches
mne_mgh_tag_group.h
Go to the documentation of this file.
1//=============================================================================================================
18
19#ifndef MNEMGHTAGGROUP_H
20#define MNEMGHTAGGROUP_H
21
22//=============================================================================================================
23// INCLUDES
24//=============================================================================================================
25
26#include "mne_global.h"
27#include "mne_mgh_tag.h"
28
29//=============================================================================================================
30// STL INCLUDES
31//=============================================================================================================
32
33#include <memory>
34#include <vector>
35
36//=============================================================================================================
37// QT INCLUDES
38//=============================================================================================================
39
40#include <QSharedPointer>
41
42//=============================================================================================================
43// DEFINE NAMESPACE MNELIB
44//=============================================================================================================
45
46namespace MNELIB
47{
48
49//=============================================================================================================
56{
57public:
58 typedef QSharedPointer<MNEMghTagGroup> SPtr;
59 typedef QSharedPointer<const MNEMghTagGroup> ConstSPtr;
60
61 //=========================================================================================================
65 MNEMghTagGroup() = default;
66
68 {
69 tags.reserve(other.tags.size());
70 for (const auto& t : other.tags)
71 tags.push_back(std::make_unique<MNEMghTag>(*t));
72 }
73
75 {
76 if (this != &other) {
77 tags.clear();
78 tags.reserve(other.tags.size());
79 for (const auto& t : other.tags)
80 tags.push_back(std::make_unique<MNEMghTag>(*t));
81 }
82 return *this;
83 }
84
87
88 //=========================================================================================================
92 ~MNEMghTagGroup() = default;
93
94public:
95 std::vector<std::unique_ptr<MNEMghTag>> tags;
96
100 int ntags() const { return static_cast<int>(tags.size()); }
101};
102
103//=============================================================================================================
104// INLINE DEFINITIONS
105//=============================================================================================================
106} // NAMESPACE MNELIB
107
108#endif // MNEMGHTAGGROUP_H
MNELIB shared-library export/import macros and library build metadata.
#define MNESHARED_EXPORT
Definition mne_global.h:40
Single FreeSurfer MGH/MGZ tag (key, length, opaque payload).
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)