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

#include <GIDI.hpp>

Inheritance diagram for GIDI::Map::BaseEntry:

Public Types

enum class  PathForm { entered , cumulative , real }

Public Member Functions

 BaseEntry (HAPI::Node const &a_node, std::string const &a_basePath, Map const *a_parent)
virtual ~BaseEntry ()=0
std::string const & name () const
Map const * parent () const
std::string path (PathForm a_form=PathForm::real) const
virtual EntryType entryType () const =0
void libraries (std::vector< std::string > &a_libraries) const
virtual ProtareBase const * findProtareEntry (std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library="", std::string const &a_evaluation="") const =0
virtual void findProtareEntries (FindProtareEntries &a_protareEntries, std::regex const &a_projectileID, std::regex const &a_targetID, std::regex const &a_library=std::regex(".*"), std::regex const &a_evaluation=std::regex(".*")) const =0
virtual void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const =0
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)
virtual std::string xlinkItemKey () const
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

This is the virtual base class inherited by all map entry classes.

Definition at line 5174 of file GIDI.hpp.

Member Enumeration Documentation

◆ PathForm

enum class GIDI::Map::BaseEntry::PathForm
strong
Enumerator
entered 
cumulative 
real 

Definition at line 5177 of file GIDI.hpp.

5177{ entered, cumulative, real };

Constructor & Destructor Documentation

◆ BaseEntry()

GIDI::Map::BaseEntry::BaseEntry ( HAPI::Node const & a_node,
std::string const & a_basePath,
Map const * a_parent )
Parameters
a_node[in] The HAPI::Node to be parsed.
a_basePath[in] A path prepended to this entry's path.
a_parent[in] Pointer to the Map containing this.

Definition at line 110 of file GIDI_map.cc.

110 :
111 GUPI::Ancestry( a_node.name( ) ),
112 m_name( a_node.name( ) ),
113 m_parent( a_parent ),
114 m_path( a_node.attribute_as_string( GIDI_pathChars ) ),
115 m_cumulativePath( GIDI_addPaths( a_basePath, m_path ) ) {
116
117}
#define GIDI_pathChars
Definition GIDI.hpp:450

Referenced by GIDI::Map::Import::Import(), and GIDI::Map::ProtareBase::ProtareBase().

◆ ~BaseEntry()

GIDI::Map::BaseEntry::~BaseEntry ( )
pure virtual

Definition at line 122 of file GIDI_map.cc.

122 {
123
124}

Member Function Documentation

◆ entryType()

virtual EntryType GIDI::Map::BaseEntry::entryType ( ) const
pure virtual

◆ findProtareEntries()

virtual void GIDI::Map::BaseEntry::findProtareEntries ( FindProtareEntries & a_protareEntries,
std::regex const & a_projectileID,
std::regex const & a_targetID,
std::regex const & a_library = std::regex(".*"),
std::regex const & a_evaluation = std::regex(".*") ) const
pure virtual

◆ findProtareEntry()

virtual ProtareBase const * GIDI::Map::BaseEntry::findProtareEntry ( std::string const & a_projectileID,
std::string const & a_targetID,
std::string const & a_library = "",
std::string const & a_evaluation = "" ) const
pure virtual

◆ libraries()

void GIDI::Map::BaseEntry::libraries ( std::vector< std::string > & a_libraries) const

Fills a_libraries with the name of all the libraries this is contained in. The first library in the list is the library this is defined in and the last is the starting library.

Parameters
a_libraries[out] The instances that is filled with the library names.

Definition at line 147 of file GIDI_map.cc.

147 {
148
149 parent( )->libraries( a_libraries );
150}
Map const * parent() const
Definition GIDI.hpp:5190
void libraries(std::vector< std::string > &a_libraries) const
Definition GIDI_map.cc:657

Referenced by GIDI::Map::TNSL::protare(), GIDI::Map::Protare::protareSingle(), and GIDI::Map::TNSL::protareSingle().

◆ name()

std::string const & GIDI::Map::BaseEntry::name ( ) const
inline

Returns the value of the m_name member.

Definition at line 5189 of file GIDI.hpp.

Referenced by BaseEntry(), and GIDI::Map::Map::walk().

◆ parent()

Map const * GIDI::Map::BaseEntry::parent ( ) const
inline

◆ path()

std::string GIDI::Map::BaseEntry::path ( PathForm a_form = PathForm::real) const

Returns either the entered, cumulative or realPath path for the entry.

Parameters
a_form[in] The type of path to return.
Returns
The requested path.

Definition at line 133 of file GIDI_map.cc.

133 {
134
135 if( a_form == PathForm::entered ) return( m_path );
136 if( a_form == PathForm::cumulative ) return( m_cumulativePath );
137 return( LUPI::FileInfo::realPath( m_cumulativePath ) );
138}
std::string realPath(std::string const &a_path)
Definition LUPI_file.cc:63

Referenced by GIDI::Map::Import::Import(), GIDI::Map::TNSL::protare(), GIDI::Map::Map::protareFilename(), GIDI::Map::Protare::protareSingle(), GIDI::Map::TNSL::protareSingle(), GIDI::Map::Import::toXMLList(), GIDI::Map::Protare::toXMLList(), GIDI::Map::TNSL::toXMLList(), and GIDI::Map::Map::walk().

◆ toXMLList()

virtual void GIDI::Map::BaseEntry::toXMLList ( GUPI::WriteInfo & a_writeInfo,
std::string const & a_indent = "" ) const
pure 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.

Implemented in GIDI::Map::Import, GIDI::Map::Protare, and GIDI::Map::TNSL.


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