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

Description

Definition at line 433 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ TruncatedSphereItem()

TruncatedSphereItem::TruncatedSphereItem ( )

Definition at line 383 of file FormFactorItems.cpp.

384 {
385  m_radius.init("Radius", "Radius of the truncated sphere", 5.0, Unit::nanometer, "radius");
386  m_height.init("Height", "Height of the truncated sphere", 7.0, Unit::nanometer, "height");
387  m_removedTop.init("Delta height", "Height of the removed top cap", 0.0, Unit::nanometer,
388  "removedTop");
389 }
@ nanometer

References nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 391 of file FormFactorItems.cpp.

392 {
393  return std::make_unique<TruncatedSphere>(radius(), height(), removedTop());
394 }

◆ geometryValues()

DoubleDescriptors TruncatedSphereItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 442 of file FormFactorItems.h.

442 { return {radius(), height(), removedTop()}; }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 443 of file FormFactorItems.h.

444  {
445  return {&m_radius, &m_height, &m_removedTop};
446  }

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