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

Description

Definition at line 418 of file FormFactorItems.h.

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ TruncatedCubeItem()

TruncatedCubeItem::TruncatedCubeItem ( )

Definition at line 369 of file FormFactorItems.cpp.

370 {
371  m_length.init("Length", "Length of the full cube's edge", 15.0, Unit::nanometer, "length");
372  m_removedLength.init("Removed length", "Removed length from each corner of the cube", 6.0,
373  Unit::nanometer, "removedLength");
374 }
@ nanometer

References nanometer.

Member Function Documentation

◆ createFormFactor()

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

Implements FormFactorItem.

Definition at line 376 of file FormFactorItems.cpp.

377 {
378  return std::make_unique<TruncatedCube>(length(), removedLength());
379 }

◆ geometryValues()

DoubleDescriptors TruncatedCubeItem::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 426 of file FormFactorItems.h.

426 { return {length(), removedLength()}; }

◆ serializationProperties()

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

Implements FormFactorItem.

Definition at line 427 of file FormFactorItems.h.

428  {
429  return {&m_length, &m_removedLength};
430  }

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