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

Description

Definition at line 129 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ Pyramid6Item()

Pyramid6Item::Pyramid6Item ( )

Definition at line 93 of file FormFactorItems.cpp.

94 {
95  m_baseEdge.init("Base edge", "Edge of the regular hexagonal base", 10.0, Unit::nanometer,
96  "baseEdge");
97  m_height.init("Height", "Height of a truncated pyramid", 13.0, Unit::nanometer, "height");
98  m_alpha.init("Alpha", "Dihedral angle between base and facet", 60.0, Unit::degree, "alpha");
99 }
@ nanometer
@ degree

References degree, and nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 101 of file FormFactorItems.cpp.

102 {
103  return std::make_unique<Pyramid6>(baseEdge(), height(), alpha() * Units::deg);
104 }

◆ geometryValues()

DoubleDescriptors Pyramid6Item::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 138 of file FormFactorItems.h.

138 { return {baseEdge(), height(), alpha()}; }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 139 of file FormFactorItems.h.

140  {
141  return {&m_baseEdge, &m_height, &m_alpha};
142  }

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