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

Description

Definition at line 113 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ ConeItem()

ConeItem::ConeItem ( )

Definition at line 78 of file FormFactorItems.cpp.

79 {
80  m_radius.init("Radius", "Radius of the base", 10.0, Unit::nanometer, "radius");
81  m_height.init("Height", "Height of the cone", 13.0, Unit::nanometer, "height");
82  m_alpha.init("Alpha", "Angle between the base and the side surface", 60.0, Unit::degree,
83  "alpha");
84 }
@ nanometer
@ degree

References degree, and nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 86 of file FormFactorItems.cpp.

87 {
88  return std::make_unique<Cone>(radius(), height(), alpha() * Units::deg);
89 }

◆ geometryValues()

DoubleDescriptors ConeItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 122 of file FormFactorItems.h.

122 { return {radius(), height(), alpha()}; }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 123 of file FormFactorItems.h.

124  {
125  return {&m_radius, &m_height, &m_alpha};
126  }

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