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

Description

Definition at line 278 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ Pyramid4Item()

Pyramid4Item::Pyramid4Item ( )

Definition at line 249 of file FormFactorItems.cpp.

250 {
251  m_baseEdge.init("Base edge", "Length of the square base", 18.0, Unit::nanometer, "baseEdge");
252  m_height.init("Height", "Height of the pyramid", 13.0, Unit::nanometer, "height");
253  m_alpha.init("Alpha", "Dihedral angle between the base and a side face", 60.0, Unit::degree,
254  "alpha");
255 }
@ nanometer
@ degree

References degree, and nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 257 of file FormFactorItems.cpp.

258 {
259  return std::make_unique<Pyramid4>(baseEdge(), height(), alpha() * Units::deg);
260 }

◆ geometryValues()

DoubleDescriptors Pyramid4Item::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 287 of file FormFactorItems.h.

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

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 288 of file FormFactorItems.h.

289  {
290  return {&m_baseEdge, &m_height, &m_alpha};
291  }

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