#include <PoPI.hpp>
Suite for storing the values in an physical quantity.
Definition at line 528 of file PoPI.hpp.
◆ PQ_suite()
| PoPI::PQ_suite::PQ_suite |
( |
HAPI::Node const & | a_node | ) |
|
- Parameters
-
Definition at line 22 of file PoPI_pq_suite.cc.
22 :
23 m_label( a_node.name( ) ) {
24
25 for( HAPI::Node child = a_node.first_child( ); !child.empty( ); child.to_next_sibling( ) ) {
26 std::string
name( child.name( ) );
27 PhysicalQuantity *quantity;
28
30 quantity = new PQ_double( child ); }
32 quantity = new PQ_integer( child ); }
34 quantity = new PQ_fraction( child ); }
36 quantity = new PQ_string( child ); }
38 quantity = new PQ_shell( child ); }
39 else {
40 continue;
41 }
42 push_back( quantity );
43 }
44}
#define PoPI_fractionChars
#define PoPI_integerChars
const char * name(G4int ptype)
◆ ~PQ_suite()
| PoPI::PQ_suite::~PQ_suite |
( |
| ) |
|
Definition at line 49 of file PoPI_pq_suite.cc.
49 {
50
51 std::string::size_type i1, __size = size( );
52
53 for( i1 = 0; i1 < __size; ++i1 ) delete (*this)[i1];
54}
Referenced by ~PQ_suite().
◆ label()
| std::string & PoPI::PQ_suite::label |
( |
void | | ) |
|
|
inline |
Definition at line 537 of file PoPI.hpp.
537{ return( m_label ); }
◆ toXMLList()
| void PoPI::PQ_suite::toXMLList |
( |
std::vector< std::string > & | a_XMLList, |
|
|
std::string const & | a_indent1 ) const |
Adds the contents of this to a_XMLList where each item in a_XMLList is one line (without linefeeds) to output as an XML representation of this.
- Parameters
-
| a_XMLList | [in] The list to add an XML output representation of this to. |
| a_indent1 | [in] The amount of indentation to added to each line added to a_XMLList. |
Definition at line 63 of file PoPI_pq_suite.cc.
63 {
64
65 std::string indent2 = a_indent1 + " ";
66
67 if( size( ) == 0 ) return;
68 std::string header = a_indent1 + "<" + m_label + ">";
69 a_XMLList.push_back( std::move( header ) );
70 for( std::vector<PhysicalQuantity *>::const_iterator iter = begin( ); iter != end( ); ++iter )
71 (*iter)->toXMLList( a_XMLList, indent2 );
73}
void appendXMLEnd(std::vector< std::string > &a_XMLList, std::string const &a_label)
Referenced by toXMLList().
The documentation for this class was generated from the following files: