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

Description

Definition at line 484 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ HorizontalCylinderItem()

HorizontalCylinderItem::HorizontalCylinderItem ( )

Definition at line 433 of file FormFactorItems.cpp.

434 {
435  m_radius.init("Radius", "Radius of the horizontal cylinder", 7.5, Unit::nanometer, "radius");
436  m_length.init("Length", "Length of the horizontal cylinder", 9.0, Unit::nanometer, "length");
437  m_sliceBottom.init("Bottom boundary", "Position of the lower boundary relative to the center",
438  -4.1, Unit::nanometer, "sliceBottom");
439  m_sliceTop.init("Top boundary", "Position of the upper boundary relative to the center", +5.2,
440  Unit::nanometer, "sliceTop");
441 }
@ nanometer

References nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 443 of file FormFactorItems.cpp.

444 {
445  return std::make_unique<HorizontalCylinder>(radius(), length(), sliceBottom(), sliceTop());
446 }

◆ geometryValues()

DoubleDescriptors HorizontalCylinderItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 494 of file FormFactorItems.h.

495  {
496  return {radius(), length(), sliceBottom(), sliceTop()};
497  }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 498 of file FormFactorItems.h.

499  {
500  return {&m_radius, &m_length, &m_sliceBottom, &m_sliceTop};
501  }

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