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

Description

Definition at line 254 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ Prism3Item()

Prism3Item::Prism3Item ( )

Definition at line 223 of file FormFactorItems.cpp.

224 {
225  m_baseEdge.init("Base edge", "Length of the base edge", 10.0, Unit::nanometer, "baseEdge");
226  m_height.init("Height", "Height", 13.0, Unit::nanometer, "height");
227 }
@ nanometer

References nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 229 of file FormFactorItems.cpp.

230 {
231  return std::make_unique<Prism3>(baseEdge(), height());
232 }

◆ geometryValues()

DoubleDescriptors Prism3Item::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 262 of file FormFactorItems.h.

262 { return {baseEdge(), height()}; }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 263 of file FormFactorItems.h.

263 { return {&m_baseEdge, &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: