Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI::Form Class Reference

#include <GIDI.hpp>

Inheritance diagram for GIDI::Form:

Public Member Functions

 Form (FormType a_type)
 Form (std::string const &a_moniker, FormType a_type, std::string const &a_label)
 Form (HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite=nullptr)
 Form (Form const &a_form)
virtual ~Form ()
Formoperator= (Form const &a_rhs)
Suiteparent () const
std::string const & label () const
void setLabel (std::string const &a_label)
virtual std::string actualMoniker () const
std::string const & keyName () const
void setKeyName (std::string const &a_keyName)
std::string const & keyValue () const
virtual void setKeyValue (std::string const &a_keyName) const
FormType type () const
Form const * sibling (std::string a_label) const
GUPI::AncestryfindInAncestry3 (LUPI_maybeUnused std::string const &a_item)
GUPI::Ancestry const * findInAncestry3 (LUPI_maybeUnused std::string const &a_item) const
std::string xlinkItemKey () const
Public Member Functions inherited from GUPI::Ancestry
 Ancestry (std::string const &a_moniker, std::string const &a_attribute="")
virtual ~Ancestry ()
Ancestryoperator= (Ancestry const &a_ancestry)
std::string const & moniker () const
void setMoniker (std::string const &a_moniker)
Ancestryancestor ()
Ancestry const * ancestor () const
void setAncestor (Ancestry *a_ancestor)
std::string attribute () const
Ancestryroot ()
Ancestry const * root () const
bool isChild (Ancestry *a_instance)
bool isParent (Ancestry *a_parent)
bool isRoot () const
AncestryfindInAncestry (std::string const &a_href)
Ancestry const * findInAncestry (std::string const &a_href) const
virtual AncestryfindInAncestry3 (std::string const &a_item)=0
virtual Ancestry const * findInAncestry3 (std::string const &a_item) const =0
virtual LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
std::string toXLink () const
virtual void toXMLList (WriteInfo &a_writeInfo, std::string const &a_indent="") const
void printXML () const

Friends

class Table::Column

Additional Inherited Members

Static Public Member Functions inherited from GUPI::Ancestry
static std::string buildXLinkItemKey (std::string const &a_name, std::string const &a_key)

Detailed Description

Base class inherited by most other GIDI classes. Mainly contains label and type members.

Definition at line 637 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Form() [1/4]

GIDI::Form::Form ( FormType a_type)
Parameters
a_type[in] The FormType the class represents.

Definition at line 25 of file GIDI_form.cc.

25 :
26 GUPI::Ancestry( "" ),
27 m_parent( nullptr ),
28 m_type( a_type ),
29 m_keyName( GIDI_labelChars ) {
30
31}
#define GIDI_labelChars
Definition GIDI.hpp:438

Referenced by GIDI::Array::Array::Array(), GIDI::Array3d::Array3d(), GIDI::Axes::Axes(), GIDI::Axes::Axes(), GIDI::Axes::Axes(), GIDI::Axis::Axis(), GIDI::Axis::Axis(), GIDI::Axis::Axis(), GIDI::AxisDomain::AxisDomain(), GIDI::AxisDomain::AxisDomain(), GIDI::DoubleDifferentialCrossSection::Base::Base(), GIDI::Styles::Base::Base(), GIDI::GRIN::CaptureLevelProbability::CaptureLevelProbability(), GIDI::Table::Column::Column(), GIDI::DoubleDifferentialCrossSection::n_ThermalNeutronScatteringLaw::DebyeWallerIntegral::DebyeWallerIntegral(), GIDI::DelayedNeutron::DelayedNeutron(), GIDI::Distributions::Distribution::Distribution(), GIDI::Distributions::Distribution::Distribution(), GIDI::ExternalFile::ExternalFile(), GIDI::FlattenedArrayData::FlattenedArrayData(), GIDI::Flux::Flux(), Form(), Form(), GIDI::Functions::FunctionForm::FunctionForm(), GIDI::Functions::FunctionForm::FunctionForm(), GIDI::Functions::FunctionForm::FunctionForm(), GIDI::Styles::Base::getDerivedStyle(), GIDI::Styles::Base::getDerivedStyle(), GIDI::Group::Group(), GIDI::ACE_URR::IncidentEnergy::IncidentEnergy(), GIDI::GRIN::InelasticIncidentEnergy::InelasticIncidentEnergy(), GIDI::Product::isCompleteParticle(), GIDI::LazyParsingHelperForm::LazyParsingHelperForm(), operator=(), GIDI::DoubleDifferentialCrossSection::n_ThermalNeutronScatteringLaw::Options::Options(), GIDI::LazyParsingHelperForm::parse(), GIDI::PhysicalQuantity::PhysicalQuantity(), GIDI::PhysicalQuantity::PhysicalQuantity(), GIDI::PhysicalQuantity::PhysicalQuantity(), GIDI::ACE_URR::ProbabilityTable::ProbabilityTable(), GIDI::Product::Product(), GIDI::Product::Product(), GIDI::Reaction::Reaction(), GIDI::Reaction::Reaction(), GIDI::DoubleDifferentialCrossSection::n_ThermalNeutronScatteringLaw::S_alpha_beta::S_alpha_beta(), GIDI::DoubleDifferentialCrossSection::n_ThermalNeutronScatteringLaw::S_table::S_table(), GIDI::DoubleDifferentialCrossSection::n_ThermalNeutronScatteringLaw::ScatteringAtom::ScatteringAtom(), sibling(), GIDI::Sums::Summands::Summands(), GIDI::DoubleDifferentialCrossSection::n_ThermalNeutronScatteringLaw::T_effective::T_effective(), GIDI::Table::Table::Table(), Table::Column, GIDI::Transportable::Transportable(), and GIDI::Transportable::Transportable().

◆ Form() [2/4]

GIDI::Form::Form ( std::string const & a_moniker,
FormType a_type,
std::string const & a_label )
Parameters
a_moniker[in] The moniker for this.
a_type[in] The FormType the class represents.
a_label[in] The label for this.

Definition at line 39 of file GIDI_form.cc.

39 :
40 GUPI::Ancestry( a_moniker ),
41 m_parent( nullptr ),
42 m_type( a_type ),
43 m_keyName( GIDI_labelChars ),
44 m_label( a_label ) {
45
46}

◆ Form() [3/4]

GIDI::Form::Form ( HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
FormType a_type,
Suite * a_suite = nullptr )

◆ Form() [4/4]

GIDI::Form::Form ( Form const & a_form)
Parameters
a_form[in] The Form to copy.

Definition at line 69 of file GIDI_form.cc.

69 :
70 GUPI::Ancestry( a_form.moniker( ), a_form.attribute( ) ),
71 m_parent( nullptr ),
72 m_type( a_form.type( ) ),
73 m_keyName( a_form.keyName( ) ),
74 m_keyValue( a_form.keyValue( ) ),
75 m_label( a_form.label( ) ) {
76
77}

◆ ~Form()

GIDI::Form::~Form ( )
virtual

Definition at line 82 of file GIDI_form.cc.

82 {
83
84}

Member Function Documentation

◆ actualMoniker()

virtual std::string GIDI::Form::actualMoniker ( ) const
inlinevirtual

Returns the value of the moniker.

Reimplemented in GIDI::LazyParsingHelperForm.

Definition at line 660 of file GIDI.hpp.

◆ findInAncestry3() [1/2]

GUPI::Ancestry * GIDI::Form::findInAncestry3 ( LUPI_maybeUnused std::string const & a_item)
inline

Definition at line 670 of file GIDI.hpp.

670{ return( nullptr ); }

◆ findInAncestry3() [2/2]

GUPI::Ancestry const * GIDI::Form::findInAncestry3 ( LUPI_maybeUnused std::string const & a_item) const
inline

Definition at line 671 of file GIDI.hpp.

671{ return( nullptr ); }

◆ keyName()

std::string const & GIDI::Form::keyName ( ) const

Returns a const reference to the m_keyName member.

Returns
The name of the key for this.

Definition at line 126 of file GIDI_form.cc.

126 {
127
128 return( m_keyName );
129}

Referenced by Form(), operator=(), and GIDI::Functions::Legendre1d::toXMLList_func().

◆ keyValue()

std::string const & GIDI::Form::keyValue ( ) const

Returns a const reference to the m_keyValue member.

Returns
The value of the key for this.

Definition at line 149 of file GIDI_form.cc.

149 {
150
151 if( m_keyValue == "" ) setKeyValue( m_keyName );
152 return( m_keyValue );
153}
virtual void setKeyValue(std::string const &a_keyName) const
Definition GIDI_form.cc:161

Referenced by GIDI::Suite::add(), GIDI::Styles::Suite::findLabelInLineage(), Form(), operator=(), and GIDI::Functions::Legendre1d::toXMLList_func().

◆ label()

std::string const & GIDI::Form::label ( ) const
inline

Returns the value of the m_label member.

Definition at line 658 of file GIDI.hpp.

Referenced by MCGIDI::convertACE_URR_probabilityTablesFromGIDI(), GIDI::FlattenedArrayData::FlattenedArrayData(), Form(), GIDI::gridded1d2GIDI_Ys1d(), operator=(), GIDI::Transportable::pid(), GIDI::Transporting::Particle::process(), GIDI::Reaction::Reaction(), GIDI::settingsFluxesFromFunction3d(), GIDI::ACE_URR::ProbabilityTable::toXMLList(), GIDI::Axis::toXMLList(), GIDI::DelayedNeutron::toXMLList(), GIDI::Distributions::CoulombPlusNuclearElastic::toXMLList(), GIDI::Distributions::LLNLLegendre::toXMLList(), GIDI::Distributions::Reference3d::toXMLList(), GIDI::ExternalFile::toXMLList(), GIDI::Flux::toXMLList(), GIDI::Functions::FissionEnergyRelease::toXMLList(), GIDI::Functions::Reference1d::toXMLList(), GIDI::Grid::toXMLList(), GIDI::Group::toXMLList(), GIDI::Product::toXMLList(), GIDI::Reaction::toXMLList(), GIDI::Sums::CrossSectionSum::toXMLList(), GIDI::Sums::MultiplicitySum::toXMLList(), GIDI::Transportable::toXMLList(), GIDI::Functions::Constant1d::toXMLList_func(), GIDI::Functions::Gridded1d::toXMLList_func(), GIDI::Functions::Polynomial1d::toXMLList_func(), GIDI::Functions::Regions1d::toXMLList_func(), GIDI::Functions::Regions2d::toXMLList_func(), GIDI::Functions::Unspecified1d::toXMLList_func(), GIDI::Functions::URR_probabilityTables1d::toXMLList_func(), GIDI::Functions::Xs_pdf_cdf1d::toXMLList_func(), GIDI::Functions::XYs1d::toXMLList_func(), GIDI::Functions::XYs2d::toXMLList_func(), GIDI::Functions::XYs3d::toXMLList_func(), GIDI::Functions::Ys1d::toXMLList_func(), GIDI::Distributions::Distribution::toXMLNodeStarter(), and GIDI::Reaction::xlinkItemKey().

◆ operator=()

Form & GIDI::Form::operator= ( Form const & a_rhs)

The assignment operator. This method sets the members of this to those of a_rhs except for the member m_parent which is set to nullptr and those not set by base classes.

Parameters
a_rhs[in] Instance whose member are used to set the members of this.

Definition at line 93 of file GIDI_form.cc.

93 {
94
95 if( this != &a_rhs ) {
97
98 m_parent = nullptr;
99 m_type = a_rhs.type( );
100 m_keyName = a_rhs.keyName( );
101 m_keyValue = a_rhs.keyValue( );
102 m_label = a_rhs.label( );
103 }
104
105 return( *this );
106}
Ancestry & operator=(Ancestry const &a_ancestry)

Referenced by GIDI::Axes::operator=(), GIDI::Functions::FunctionForm::operator=(), and GIDI::PhysicalQuantity::operator=().

◆ parent()

Suite * GIDI::Form::parent ( ) const
inline

Returns the value of the m_parent member.

Definition at line 656 of file GIDI.hpp.

Referenced by GIDI::LazyParsingHelperForm::parse(), and sibling().

◆ setKeyName()

void GIDI::Form::setKeyName ( std::string const & a_keyName)

Set the m_keyName member to a_keyName and calls setKeyValue.

Parameters
a_keyName[in] The value of the key name.

Definition at line 137 of file GIDI_form.cc.

137 {
138
139 m_keyName = a_keyName;
140 setKeyValue( m_keyName );
141}

◆ setKeyValue()

void GIDI::Form::setKeyValue ( std::string const & a_keyName) const
virtual

Set the m_keyValue per the a_keyName name. This method assumes that a_keyName is "label". Otherwise, it executes a throw.

Parameters
a_keyName[in] The name of the key whose value is set.

Reimplemented in GIDI::Table::Column.

Definition at line 161 of file GIDI_form.cc.

161 {
162
163 if( a_keyName != GIDI_labelChars ) throw Exception( "Form::setKeyValue: unsupported keyname \"" + a_keyName + "\"." );
164
165 m_keyValue = m_label;
166}

Referenced by keyValue(), setKeyName(), and setLabel().

◆ setLabel()

void GIDI::Form::setLabel ( std::string const & a_label)

Set the m_label member per a_label. Also, if m_keyName is "label", calls setKeyValue.

Parameters
a_label[in] The value of the label.

Definition at line 114 of file GIDI_form.cc.

114 {
115
116 m_label = a_label;
117 if( m_keyName == GIDI_labelChars ) setKeyValue( GIDI_labelChars );
118}

Referenced by GIDI::Transporting::Fluxes_from_bdfls::get3dViaFID(), GIDI::Product::Product(), and GIDI::Functions::Recoil2d::Recoil2d().

◆ sibling()

Form const * GIDI::Form::sibling ( std::string a_label) const

Returns the sibling of this with label a_label.

Parameters
a_label[in] The label of the sibling to find.
Returns
The sibling with label a_label.

Definition at line 175 of file GIDI_form.cc.

175 {
176
177 Form *_form;
178
179 try {
180 _form = ((*parent( )).get<Form>( a_label ) ); }
181 catch (...) {
182 return( nullptr );
183 }
184 return( _form );
185}
Form(FormType a_type)
Definition GIDI_form.cc:25
Suite * parent() const
Definition GIDI.hpp:656

Referenced by GIDI::Styles::Base::getDerivedStyle(), and GIDI::Styles::Base::getDerivedStyle().

◆ type()

◆ xlinkItemKey()

std::string GIDI::Form::xlinkItemKey ( ) const
inlinevirtual

Returns the value of this's key.

Reimplemented from GUPI::Ancestry.

Reimplemented in GIDI::Reaction.

Definition at line 672 of file GIDI.hpp.

◆ Table::Column

friend class Table::Column
friend

Definition at line 639 of file GIDI.hpp.


The documentation for this class was generated from the following files: