BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Particle3DContainer.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Realspace/Particle3DContainer.h
6 //! @brief Implements namespace GUI::View::TransformTo3D
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_VIEW_REALSPACE_PARTICLE3DCONTAINER_H
16 #define BORNAGAIN_GUI_VIEW_REALSPACE_PARTICLE3DCONTAINER_H
17 
18 #include <QString>
19 #include <memory>
20 #include <vector>
21 
22 namespace GUI::RealSpace::Particles {
23 
24 class Particle;
25 
26 } // namespace GUI::RealSpace::Particles
27 
29 public:
32  {
33  }
34  Particle3DContainer(const Particle3DContainer& other); // copy constructor
35  Particle3DContainer& operator=(const Particle3DContainer& rhs); // copy assignment
37 
38  Particle3DContainer(Particle3DContainer&& other); // move constructor
39  Particle3DContainer& operator=(Particle3DContainer&& rhs); // move assignment
40 
41  void clearContainer();
42 
43  size_t containerSize() const { return m_containerParticles.size(); }
44  double cumulativeAbundance() const { return m_cumulativeAbundance; }
45  QString particleType() const { return m_containerType; }
46  bool particle3DBlend(const size_t& index) const { return m_containerParticlesBlend.at(index); }
47 
48  void addParticle(GUI::RealSpace::Particles::Particle* particle3D, bool blend);
50  void setParticleType(QString particleType);
51 
52  std::unique_ptr<GUI::RealSpace::Particles::Particle> createParticle(const size_t& index) const;
53 
54 private:
55  std::vector<GUI::RealSpace::Particles::Particle*> m_containerParticles;
56  // Contains the constituents of the 3D Particle (e.g. core and shell of a ParticleCoreShell)
58  QString m_containerType; // type of 3D Particle e.g. ParticleType, ParticleCompositionType etc.
59  std::vector<bool> m_containerParticlesBlend;
60 };
61 
62 #endif // BORNAGAIN_GUI_VIEW_REALSPACE_PARTICLE3DCONTAINER_H
@ other
The unit has no enum value defined in here (e.g. when defined as an explicit string)
QString particleType() const
std::unique_ptr< GUI::RealSpace::Particles::Particle > createParticle(const size_t &index) const
double cumulativeAbundance() const
void setCumulativeAbundance(double cumulativeAbundance)
void addParticle(GUI::RealSpace::Particles::Particle *particle3D, bool blend)
std::vector< GUI::RealSpace::Particles::Particle * > m_containerParticles
size_t containerSize() const
void setParticleType(QString particleType)
Particle3DContainer & operator=(const Particle3DContainer &rhs)
bool particle3DBlend(const size_t &index) const
std::vector< bool > m_containerParticlesBlend