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

#include <GUPI.hpp>

Inheritance diagram for GUPI::Entry:

Public Member Functions

 Entry (std::string const &a_moniker, std::string const &a_keyName, std::string const &a_keyValue)
 Entry (HAPI::Node const &a_node, std::string const &a_keyName)
 ~Entry ()
std::string const & keyName () const
std::string const & keyValue () const
AncestryfindInAncestry3 (LUPI_maybeUnused std::string const &a_item)
Ancestry const * findInAncestry3 (LUPI_maybeUnused std::string const &a_item) const
LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
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
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 a base class inherit by other classes that are enties in a Suite.

Definition at line 140 of file GUPI.hpp.

Constructor & Destructor Documentation

◆ Entry() [1/2]

GUPI::Entry::Entry ( std::string const & a_moniker,
std::string const & a_keyName,
std::string const & a_keyValue )
Parameters
a_moniker[in] The GNDS node's name (i.e., moniker).
a_attribute[in] Currently not used.

Definition at line 25 of file GUPI_entry.cc.

25 :
26 Ancestry( a_moniker ),
27 m_keyName( a_keyName ),
28 m_keyValue( a_keyValue ) {
29
30}
Ancestry(std::string const &a_moniker, std::string const &a_attribute="")

Referenced by GIDI::TargetInfo::ChemicalElement::ChemicalElement(), and GIDI::TargetInfo::Nuclide::Nuclide().

◆ Entry() [2/2]

GUPI::Entry::Entry ( HAPI::Node const & a_node,
std::string const & a_keyName )
Parameters
a_moniker[in] The GNDS node's name (i.e., moniker).
a_attribute[in] Currently not used.

Definition at line 37 of file GUPI_entry.cc.

37 :
38 Ancestry( a_node.name( ) ),
39 m_keyName( a_keyName ),
40 m_keyValue( a_node.attribute_as_string( a_keyName.c_str( ) ) ) {
41
42}

◆ ~Entry()

GUPI::Entry::~Entry ( )

Definition at line 47 of file GUPI_entry.cc.

47 {
48
49}

Member Function Documentation

◆ findInAncestry3() [1/2]

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

Definition at line 154 of file GUPI.hpp.

154{ return( nullptr ); }

◆ findInAncestry3() [2/2]

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

Definition at line 155 of file GUPI.hpp.

155{ return( nullptr ); }

◆ keyName()

std::string const & GUPI::Entry::keyName ( ) const
inline

Returns a const reference to the m_keyName member.

Definition at line 151 of file GUPI.hpp.

◆ keyValue()

std::string const & GUPI::Entry::keyValue ( ) const
inline

Returns a const reference to the m_keyValue member.

Definition at line 152 of file GUPI.hpp.

Referenced by GUPI::Suite::add(), GIDI::TargetInfo::Nuclide::pid(), and GIDI::TargetInfo::ChemicalElement::symbol().

◆ serialize()

LUPI_HOST void GUPI::Entry::serialize ( LUPI::DataBuffer & a_buffer,
LUPI::DataBuffer::Mode a_mode )
virtual

This method serializes this for broadcasting as needed for MPI and GPUs. The method can count the number of required bytes, pack this or unpack this depending on a_mode.

Parameters
a_buffer[in] The buffer to read or write data to depending on a_mode.
a_mode[in] Specifies the action of this method.

Reimplemented from GUPI::Ancestry.

Definition at line 59 of file GUPI_entry.cc.

59 {
60
61 Ancestry::serialize( a_buffer, a_mode );
62 DATA_MEMBER_STD_STRING( m_keyName, a_buffer, a_mode );
63 DATA_MEMBER_STD_STRING( m_keyValue, a_buffer, a_mode );
64}
#define DATA_MEMBER_STD_STRING(member, buf, mode)
virtual LUPI_HOST void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

◆ xlinkItemKey()

std::string GUPI::Entry::xlinkItemKey ( ) const
inlinevirtual

Returns the value of this's key.

Reimplemented from GUPI::Ancestry.

Definition at line 157 of file GUPI.hpp.

157 {
158
159 if( m_keyValue == "" ) return( "" );
160 return( buildXLinkItemKey( m_keyName, m_keyValue ) );
161 }
static std::string buildXLinkItemKey(std::string const &a_name, std::string const &a_key)
Definition GUPI.hpp:83

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