BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
HemiEllipsoidItem Class Reference

Description

Definition at line 227 of file FormFactorItems.h.

Inheritance diagram for HemiEllipsoidItem:
[legend]
Collaboration diagram for HemiEllipsoidItem:
[legend]

Public Member Functions

 HemiEllipsoidItem ()
 
std::unique_ptr< IFormFactor > createFormFactor () const override
 
DoubleDescriptors geometryValues () const override
 
QVector< DoubleProperty * > serializationProperties () override
 
virtual void serialize (Streamer &s)
 

Constructor & Destructor Documentation

◆ HemiEllipsoidItem()

HemiEllipsoidItem::HemiEllipsoidItem ( )

Definition at line 195 of file FormFactorItems.cpp.

196 {
197  m_radiusX.init("Radius x", "Radius of the ellipse base in the x-direction", 10.0,
198  Unit::nanometer, "radiusX");
199  m_radiusY.init("Radius y", "Radius of the ellipse base in the y-direction", 6.0,
200  Unit::nanometer, "radiusY");
201  m_height.init("Height", "Height of the hemi ellipsoid", 8.0, Unit::nanometer, "height");
202 }
@ nanometer

References nanometer.

Member Function Documentation

◆ createFormFactor()

std::unique_ptr< IFormFactor > HemiEllipsoidItem::createFormFactor ( ) const
overridevirtual

Implements FormFactorItem.

Definition at line 204 of file FormFactorItems.cpp.

205 {
206  return std::make_unique<HemiEllipsoid>(radiusX(), radiusY(), height());
207 }

◆ geometryValues()

DoubleDescriptors HemiEllipsoidItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 236 of file FormFactorItems.h.

236 { return {radiusX(), radiusY(), height()}; }

◆ serializationProperties()

QVector<DoubleProperty*> HemiEllipsoidItem::serializationProperties ( )
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 237 of file FormFactorItems.h.

238  {
239  return {&m_radiusX, &m_radiusY, &m_height};
240  }

◆ serialize()

void FormFactorItem::serialize ( Streamer s)
virtualinherited

Definition at line 473 of file FormFactorItems.cpp.

474 {
475  s.assertVersion(0);
476  for (auto* p : serializationProperties())
477  Serialize::rwProperty(s, *p);
478 }
virtual QVector< DoubleProperty * > serializationProperties()=0
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Definition: Streamer.cpp:26
void rwProperty(Streamer &s, DoubleProperty &d)

References Streamer::assertVersion(), Serialize::rwProperty(), and FormFactorItem::serializationProperties().

Here is the call graph for this function:

The documentation for this class was generated from the following files: