v2.0.0
Loading...
Searching...
No Matches
mne_msh_light_set.h
Go to the documentation of this file.
1//=============================================================================================================
35
36#ifndef MNEMSHLIGHTSET_H
37#define MNEMSHLIGHTSET_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "mne_global.h"
44#include "mne_msh_light.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#include <QString>
59
60//=============================================================================================================
61// DEFINE NAMESPACE MNELIB
62//=============================================================================================================
63
64namespace MNELIB
65{
66
67//=============================================================================================================
72{
73public:
74 typedef QSharedPointer<MNEMshLightSet> SPtr;
75 typedef QSharedPointer<const MNEMshLightSet> ConstSPtr;
76
77 //=========================================================================================================
81 MNEMshLightSet() = default;
82
84 : name(other.name)
85 {
86 lights.reserve(other.lights.size());
87 for (const auto& l : other.lights)
88 lights.push_back(std::make_unique<MNEMshLight>(*l));
89 }
90
92 {
93 if (this != &other) {
94 name = other.name;
95 lights.clear();
96 lights.reserve(other.lights.size());
97 for (const auto& l : other.lights)
98 lights.push_back(std::make_unique<MNEMshLight>(*l));
99 }
100 return *this;
101 }
102
105
106 //=========================================================================================================
110 ~MNEMshLightSet() = default;
111
112public:
113 QString name;
114 std::vector<std::unique_ptr<MNEMshLight>> lights;
115
119 int nlight() const { return static_cast<int>(lights.size()); }
120};
121
122//=============================================================================================================
123// INLINE DEFINITIONS
124//=============================================================================================================
125} // NAMESPACE MNELIB
126
127#endif // MNEMSHLIGHTSET_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
MNEMshLight class declaration.
Core MNE data structures (source spaces, source estimates, hemispheres).
MNEMshLightSet(const MNEMshLightSet &other)
int nlight() const
Returns the number of lights in the set.
MNEMshLightSet(MNEMshLightSet &&)=default
QSharedPointer< MNEMshLightSet > SPtr
MNEMshLightSet & operator=(MNEMshLightSet &&)=default
std::vector< std::unique_ptr< MNEMshLight > > lights
QSharedPointer< const MNEMshLightSet > ConstSPtr
MNEMshLightSet & operator=(const MNEMshLightSet &other)