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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Table::Table:

Public Member Functions

 Table (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo)
 ~Table ()
std::size_t rows () const
std::size_t columns () const
std::string const & storageOrder () const
Suite const & columnHeaders () const
Data const & data () 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
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
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 table node.

Definition at line 2835 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Table()

GIDI::Table::Table::Table ( Construction::Settings const & a_construction,
HAPI::Node const & a_node,
SetupInfo & a_setupInfo )
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.

Definition at line 26 of file GIDI_table.cc.

26 :
27 Form( a_node, a_setupInfo, FormType::table ),
28 m_rows( static_cast<std::size_t>( a_node.attribute_as_int( GIDI_rowsChars ) ) ),
29 m_columns( static_cast<std::size_t>( a_node.attribute_as_int( GIDI_columnsChars ) ) ),
30 m_storageOrder( a_node.attribute_as_string( GIDI_storageOrderChars ) ),
31 m_columnHeaders( a_construction, GIDI_columnHeadersChars, GIDI_indexChars, a_node, a_setupInfo, PoPI::Database( ), PoPI::Database( ), parseColumnHeaders, nullptr ),
32 m_data( a_construction, a_node.child( GIDI_dataChars ), a_setupInfo ) {
33
34 if( m_storageOrder == "" ) m_storageOrder = GIDI_rowMajorChars;
35
36 m_columnHeaders.setAncestor( this );
37 m_data.setAncestor( this );
38}
#define GIDI_columnHeadersChars
Definition GIDI.hpp:193
#define GIDI_rowsChars
Definition GIDI.hpp:191
#define GIDI_storageOrderChars
Definition GIDI.hpp:279
#define GIDI_columnsChars
Definition GIDI.hpp:192
#define GIDI_indexChars
Definition GIDI.hpp:437
#define GIDI_dataChars
Definition GIDI.hpp:197
#define GIDI_rowMajorChars
Definition GIDI.hpp:280
Form(FormType a_type)
Definition GIDI_form.cc:25
Form * parseColumnHeaders(Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles)

◆ ~Table()

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

Definition at line 43 of file GIDI_table.cc.

43 {
44
45}

Member Function Documentation

◆ columnHeaders()

Suite const & GIDI::Table::Table::columnHeaders ( ) const
inline

Returns the value of the m_columnHeaders member.

Definition at line 2851 of file GIDI.hpp.

◆ columns()

std::size_t GIDI::Table::Table::columns ( ) const
inline

Returns the value of the m_columns member.

Definition at line 2849 of file GIDI.hpp.

◆ data()

Data const & GIDI::Table::Table::data ( ) const
inline

Returns the value of the m_data member.

Definition at line 2852 of file GIDI.hpp.

Referenced by MCGIDI::GRIN_levelsAndProbabilities::GRIN_levelsAndProbabilities().

◆ rows()

std::size_t GIDI::Table::Table::rows ( ) const
inline

Returns the value of the m_rows member.

Definition at line 2848 of file GIDI.hpp.

Referenced by MCGIDI::GRIN_levelsAndProbabilities::GRIN_levelsAndProbabilities().

◆ storageOrder()

std::string const & GIDI::Table::Table::storageOrder ( ) const
inline

Returns the value of the m_storageOrder member.

Definition at line 2850 of file GIDI.hpp.

◆ toXMLList()

void GIDI::Table::Table::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 54 of file GIDI_table.cc.

54 {
55
56 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
57
58 std::string attributes;
59 attributes += a_writeInfo.addAttribute( GIDI_rowsChars, intToString( static_cast<int>( m_rows ) ) );
60 attributes += a_writeInfo.addAttribute( GIDI_columnsChars, intToString( static_cast<int>( m_columns ) ) );
61 if( m_storageOrder != GIDI_rowMajorChars ) attributes += a_writeInfo.addAttribute( GIDI_storageOrderChars, m_storageOrder );
62 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
63
64 m_columnHeaders.toXMLList( a_writeInfo, indent2 );
65 m_data.toXMLList( a_writeInfo, indent2 );
66
67 a_writeInfo.addNodeEnder( moniker( ) );
68}
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60
std::string intToString(int a_value)
Definition GIDI_misc.cc:415

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