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

Description

Definition at line 45 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ Pyramid2Item()

Pyramid2Item::Pyramid2Item ( )

Definition at line 21 of file FormFactorItems.cpp.

22 {
23  m_length.init("Length", "Length of the rectangular base", 20.0, Unit::nanometer, "length");
24  m_width.init("Width", "Width of the rectangular base", 16.0, Unit::nanometer, "width");
25  m_height.init("Height", "Height of pyramid", 13.0, Unit::nanometer, "height");
26  m_alpha.init("Alpha", "Dihedral angle between base and facet", 60.0, Unit::degree, "alpha");
27 }
@ nanometer
@ degree

References degree, and nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 29 of file FormFactorItems.cpp.

30 {
31  return std::make_unique<Pyramid2>(length(), width(), height(), alpha() * Units::deg);
32 }

◆ geometryValues()

DoubleDescriptors Pyramid2Item::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 55 of file FormFactorItems.h.

56  {
57  return {length(), width(), height(), alpha()};
58  }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 59 of file FormFactorItems.h.

60  {
61  return {&m_length, &m_width, &m_height, &m_alpha};
62  }

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