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

Description

Definition at line 449 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ TruncatedSpheroidItem()

TruncatedSpheroidItem::TruncatedSpheroidItem ( )

Definition at line 398 of file FormFactorItems.cpp.

399 {
400  m_radius.init("Radius", "Radius of the truncated spheroid", 7.5, Unit::nanometer, "radius");
401  m_height.init("Height", "Height of the truncated spheroid", 9.0, Unit::nanometer, "height");
402  m_heightFlattening.init(
403  "Height flattening",
404  "Ratio of the height of the corresponding full spheroid to its diameter", 1.2,
405  Unit::unitless, "heightFlattening");
406 
407  m_removedTop.init("Delta height", "Height of the removed top cap", 0.0, Unit::nanometer,
408  "removedTop");
409 }
@ unitless
@ nanometer

References nanometer, and unitless.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 411 of file FormFactorItems.cpp.

412 {
413  return std::make_unique<TruncatedSpheroid>(radius(), height(), heightFlattening(),
414  removedTop());
415 }

◆ geometryValues()

DoubleDescriptors TruncatedSpheroidItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 459 of file FormFactorItems.h.

460  {
461  return {radius(), height(), heightFlattening(), removedTop()};
462  }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 463 of file FormFactorItems.h.

464  {
465  return {&m_radius, &m_height, &m_heightFlattening, &m_removedTop};
466  }

◆ 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: