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

Description

Definition at line 165 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ CylinderItem()

CylinderItem::CylinderItem ( )

Definition at line 128 of file FormFactorItems.cpp.

129 {
130  m_radius.init("Radius", "Radius of the circular base", 8.0, Unit::nanometer, "radius");
131  m_height.init("Height", "Height of the cylinder", 16.0, Unit::nanometer, "height");
132 }
@ nanometer

References nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 134 of file FormFactorItems.cpp.

135 {
136  return std::make_unique<Cylinder>(radius(), height());
137 }

◆ geometryValues()

DoubleDescriptors CylinderItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 173 of file FormFactorItems.h.

173 { return {radius(), height()}; }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 174 of file FormFactorItems.h.

174 { return {&m_radius, &m_height}; }

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