Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI::Styles::Base Class Referenceabstract

#include <GIDI.hpp>

Inheritance diagram for GIDI::Styles::Base:

Public Member Functions

 Base (HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
 ~Base ()
std::string const & date () const
std::string const & label () const
std::string const & derivedStyle () const
bool hasDocumentation ()
GUPI::Documentationdocumentation ()
virtual PhysicalQuantity const & temperature () const =0
Base const * getDerivedStyle () const
Base const * getDerivedStyle (std::string const &a_moniker) const
std::vector< Base const * > chain () const
bool isStyleInDerivedForm (Base const *a_style) const
std::string baseXMLAttributes (GUPI::WriteInfo &a_writeInfo) const
Public Member Functions inherited from GIDI::Form
 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

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

This is the virtual base class inherited by all style classes. It handles the date and derivedFrom members.

Definition at line 3117 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Base()

GIDI::Styles::Base::Base ( HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
GIDI::Suite * a_parent )
Parameters
a_node[in] The HAPI::Node to be parsed.
a_setupInfo[in] Information create my the Protare constructor to help in parsing.
a_parent[in] The parent GIDI::Suite.

Definition at line 145 of file GIDI_styles.cc.

145 :
146 Form( a_node, a_setupInfo, FormType::style, a_parent ),
147 m_date( a_node.attribute_as_string( GIDI_dateChars ) ),
148 m_label( a_node.attribute_as_string( GIDI_labelChars ) ),
149 m_derivedStyle( a_node.attribute_as_string( GIDI_derivedFromChars ) ) {
150
151 if( a_node.child( GUPI_documentationChars ).empty( ) ) {
152 m_documentation = nullptr;
153 } else {
154 m_documentation = new GUPI::Documentation( a_node.child( GIDI_documentationChars ) );
155 }
156}
#define GIDI_dateChars
Definition GIDI.hpp:421
#define GIDI_derivedFromChars
Definition GIDI.hpp:422
#define GIDI_documentationChars
Definition GIDI.hpp:175
#define GIDI_labelChars
Definition GIDI.hpp:438
#define GUPI_documentationChars
Definition GUPI.hpp:27
Form(FormType a_type)
Definition GIDI_form.cc:25

Referenced by GIDI::Styles::AngularDistributionReconstructed::AngularDistributionReconstructed(), GIDI::Styles::AverageProductData::AverageProductData(), chain(), GIDI::Styles::CoulombPlusNuclearElasticMuCutoff::CoulombPlusNuclearElasticMuCutoff(), GIDI::Styles::CrossSectionReconstructed::CrossSectionReconstructed(), GIDI::Styles::Evaluated::Evaluated(), getDerivedStyle(), getDerivedStyle(), GIDI::Styles::GriddedCrossSection::GriddedCrossSection(), GIDI::Styles::Heated::Heated(), GIDI::Styles::HeatedMultiGroup::HeatedMultiGroup(), isStyleInDerivedForm(), GIDI::Styles::MonteCarlo_cdf::MonteCarlo_cdf(), GIDI::Styles::MultiGroup::MultiGroup(), GIDI::Styles::Realization::Realization(), GIDI::Styles::SnElasticUpScatter::SnElasticUpScatter(), GIDI::Styles::AngularDistributionReconstructed::temperature(), GIDI::Styles::AverageProductData::temperature(), temperature(), GIDI::Styles::CoulombPlusNuclearElasticMuCutoff::temperature(), GIDI::Styles::CrossSectionReconstructed::temperature(), GIDI::Styles::GriddedCrossSection::temperature(), GIDI::Styles::HeatedMultiGroup::temperature(), GIDI::Styles::MonteCarlo_cdf::temperature(), GIDI::Styles::MultiGroup::temperature(), GIDI::Styles::Realization::temperature(), GIDI::Styles::SnElasticUpScatter::temperature(), GIDI::Styles::URR_probabilityTables::temperature(), and GIDI::Styles::URR_probabilityTables::URR_probabilityTables().

◆ ~Base()

GIDI::Styles::Base::~Base ( )

Definition at line 158 of file GIDI_styles.cc.

158 {
159
160 delete m_documentation;
161
162}

Member Function Documentation

◆ baseXMLAttributes()

std::string GIDI::Styles::Base::baseXMLAttributes ( GUPI::WriteInfo & a_writeInfo) const

Returns the base attributes for this as a std::string instance.

Parameters
a_writeInfo[in/out] Instance containing incremental indentation and other information and stores the appended lines.
Returns
The base attributes as a XML attribute string.

Definition at line 241 of file GIDI_styles.cc.

241 {
242
243 std::string attributes( a_writeInfo.addAttribute( GIDI_labelChars, label( ) ) );
244
245 if( m_derivedStyle != "" ) attributes += a_writeInfo.addAttribute( GIDI_derivedFromChars, m_derivedStyle );
246 attributes += a_writeInfo.addAttribute( GIDI_dateChars, m_date );
247
248 return( attributes );
249}
std::string const & label() const
Definition GIDI.hpp:3130
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60

Referenced by temperature(), GIDI::Styles::AngularDistributionReconstructed::toXMLList(), GIDI::Styles::AverageProductData::toXMLList(), GIDI::Styles::CoulombPlusNuclearElasticMuCutoff::toXMLList(), GIDI::Styles::CrossSectionReconstructed::toXMLList(), GIDI::Styles::Evaluated::toXMLList(), GIDI::Styles::GriddedCrossSection::toXMLList(), GIDI::Styles::Heated::toXMLList(), GIDI::Styles::HeatedMultiGroup::toXMLList(), GIDI::Styles::MonteCarlo_cdf::toXMLList(), GIDI::Styles::MultiGroup::toXMLList(), GIDI::Styles::Realization::toXMLList(), GIDI::Styles::SnElasticUpScatter::toXMLList(), and GIDI::Styles::URR_probabilityTables::toXMLList().

◆ chain()

std::vector< Base const * > GIDI::Styles::Base::chain ( ) const

Thie method returns the list of self and all its derived from styles in reverse order (i.e, the first style in the list is this).

Returns
The list of derived styles of this (includng this) in reverse order.

Definition at line 200 of file GIDI_styles.cc.

200 {
201
202 std::vector<Base const *> chain1;
203
204 Base const *style = this;
205 while( style != nullptr ) {
206 chain1.push_back( style );
207 style = style->getDerivedStyle( );
208 }
209
210 return( chain1 );
211}
Base(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)

Referenced by GIDI::Styles::Suite::chains(), and temperature().

◆ date()

std::string const & GIDI::Styles::Base::date ( ) const
inline

Returns the value of the m_date member.

Definition at line 3129 of file GIDI.hpp.

◆ derivedStyle()

std::string const & GIDI::Styles::Base::derivedStyle ( ) const
inline

Returns the value of the m_derivedStyle member.

Definition at line 3131 of file GIDI.hpp.

◆ documentation()

GUPI::Documentation * GIDI::Styles::Base::documentation ( )
inline

Definition at line 3133 of file GIDI.hpp.

3133{ return ( m_documentation ); }

◆ getDerivedStyle() [1/2]

◆ getDerivedStyle() [2/2]

Base const * GIDI::Styles::Base::getDerivedStyle ( std::string const & a_moniker) const

Starting at this's derivedFrom style, and ascending as needed, returns the derivedFrom style whose moniker is a_moniker.

Parameters
a_moniker[in] The moniker to search for.
Returns
The style whose moniker is a_moniker.

Definition at line 184 of file GIDI_styles.cc.

184 {
185
186 Form const *_form( sibling( m_derivedStyle ) );
187 Base const *_style = dynamic_cast<Base const *>( _form );
188
189 if( _style == nullptr ) return( _style );
190 if( _style->moniker( ) != a_moniker ) _style = _style->getDerivedStyle( a_moniker );
191 return( _style );
192}

◆ hasDocumentation()

bool GIDI::Styles::Base::hasDocumentation ( )
inline

Definition at line 3132 of file GIDI.hpp.

3132{ return ( m_documentation != nullptr ); }

◆ isStyleInDerivedForm()

bool GIDI::Styles::Base::isStyleInDerivedForm ( Base const * a_style) const

This method returns true if a_style is in this derivedFrom list and false otherwise.

Parameters
a_style[in] The style to check for.
Returns
The list of derived styles of this (includng this) in reverse order.

Definition at line 221 of file GIDI_styles.cc.

221 {
222
223 Base const *style = getDerivedStyle( );
224
225 while( style != nullptr ) {
226 if( style == a_style ) return( true );
227 style = style->getDerivedStyle( );
228 }
229
230 return( false );
231}
Base const * getDerivedStyle() const

Referenced by temperature().

◆ label()

std::string const & GIDI::Styles::Base::label ( ) const
inline

◆ temperature()


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