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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Table::Column:

Public Member Functions

 Column (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
 ~Column ()
std::string const & index () const
std::string const & name () const
std::string const & unit () const
std::string const & types () const
void setKeyValue (std::string const &a_keyName) const
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") 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
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
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

Class for the GNDS column node that is a child of the columnHeaders node.

Definition at line 2782 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Column()

GIDI::Table::Column::Column ( Construction::Settings const & a_construction,
HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
Suite * a_parent )
Parameters
a_construction[in] Used to pass user options to the constructor.
a_node[in] The HAPI::Node to be parsed and used to construct the XYs2d.
a_setupInfo[in] Information create my the Protare constructor to help in parsing.
a_parent[in] The parent GIDI::Suite.

Definition at line 81 of file GIDI_table.cc.

81 :
82 Form( a_node, a_setupInfo, FormType::column, a_parent ),
83 m_index( a_node.attribute_as_string( GIDI_indexChars ) ),
84 m_name( a_node.attribute_as_string( GIDI_nameChars ) ),
85 m_unit( a_node.attribute_as_string( GIDI_unitChars ) ),
86 m_types( a_node.attribute_as_string( GIDI_typesChars ) ) {
87
88}
#define GIDI_unitChars
Definition GIDI.hpp:439
#define GIDI_indexChars
Definition GIDI.hpp:437
#define GIDI_typesChars
Definition GIDI.hpp:196
#define GIDI_nameChars
Definition GIDI.hpp:195
Form(FormType a_type)
Definition GIDI_form.cc:25

◆ ~Column()

GIDI::Table::Column::~Column ( )

Definition at line 93 of file GIDI_table.cc.

93 {
94
95}

Member Function Documentation

◆ index()

std::string const & GIDI::Table::Column::index ( ) const
inline

Returns a const reference of the m_index member.

Definition at line 2794 of file GIDI.hpp.

◆ name()

std::string const & GIDI::Table::Column::name ( ) const
inline

Returns a const reference of the m_name member.

Definition at line 2795 of file GIDI.hpp.

Referenced by MCGIDI::convertACE_URR_probabilityTablesFromGIDI().

◆ setKeyValue()

void GIDI::Table::Column::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 from GIDI::Form.

Definition at line 103 of file GIDI_table.cc.

103 {
104
105 if( a_keyName != GIDI_indexChars ) throw Exception( "Form::setKeyValue: unsupported keyname \"" + a_keyName + "\"." );
106
107 m_keyValue = m_index;
108}

◆ toXMLList()

void GIDI::Table::Column::toXMLList ( GUPI::WriteInfo & a_writeInfo,
std::string const & a_indent = "" ) const
virtual

Fills the argument a_writeInfo with the XML lines that represent this. Recursively enters each sub-node.

Parameters
a_writeInfo[in/out] Instance containing incremental indentation and other information and stores the appended lines.
a_indent[in] The amount to indent this node.

Reimplemented from GUPI::Ancestry.

Definition at line 117 of file GIDI_table.cc.

117 {
118
119 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
120
121 std::string attributes;
122 attributes += a_writeInfo.addAttribute( GIDI_indexChars, m_index );
123 attributes += a_writeInfo.addAttribute( GIDI_nameChars, m_name );
124 if( m_unit != "" ) attributes += a_writeInfo.addAttribute( GIDI_unitChars, m_unit );
125 if( m_types != "" ) attributes += a_writeInfo.addAttribute( GIDI_typesChars, m_types );
126 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), attributes );
127}
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeStarterEnder(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:57
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60

◆ types()

std::string const & GIDI::Table::Column::types ( ) const
inline

Returns a const reference of the m_types member.

Definition at line 2797 of file GIDI.hpp.

◆ unit()

std::string const & GIDI::Table::Column::unit ( ) const
inline

Returns a const reference of the m_unit member.

Definition at line 2796 of file GIDI.hpp.


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