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

#include <PoPI.hpp>

Inheritance diagram for PoPI::PQ_integer:

Public Member Functions

 PQ_integer (HAPI::Node const &a_node)
virtual ~PQ_integer ()
int value (void) const
int value (char const *a_unit) const
int value (std::string const &a_unit) const
virtual std::string valueToString (void) const
Public Member Functions inherited from PoPI::PhysicalQuantity
 PhysicalQuantity (HAPI::Node const &a_node, PQ_class a_class)
virtual ~PhysicalQuantity ()
PQ_class Class (void) const
std::string const & tag (void) const
std::string const & label (void) const
std::string const & valueString (void) const
std::string const & unit (void) const
void toXMLList (std::vector< std::string > &a_XMLList, std::string const &a_indent1) const

Detailed Description

The physical quantity class representing an integer.

Definition at line 456 of file PoPI.hpp.

Constructor & Destructor Documentation

◆ PQ_integer()

PoPI::PQ_integer::PQ_integer ( HAPI::Node const & a_node)
Parameters
a_node[in] The HAPI::Node node to be parsed.

Definition at line 145 of file PoPI_physicalQuantity.cc.

145 :
147 m_value( a_node.attribute( PoPI_valueChars ).as_int( ) ) {
148}
#define PoPI_valueChars
PhysicalQuantity(HAPI::Node const &a_node, PQ_class a_class)

◆ ~PQ_integer()

PoPI::PQ_integer::~PQ_integer ( )
virtual

Definition at line 153 of file PoPI_physicalQuantity.cc.

153 {
154
155}

Member Function Documentation

◆ value() [1/3]

int PoPI::PQ_integer::value ( char const * a_unit) const

◆ value() [2/3]

int PoPI::PQ_integer::value ( std::string const & a_unit) const
inline

Definition at line 467 of file PoPI.hpp.

467{ return( value( a_unit.c_str( ) ) ); }
int value(void) const
Definition PoPI.hpp:465

Referenced by value().

◆ value() [3/3]

int PoPI::PQ_integer::value ( void ) const
inline

Returns the value of the m_value member.

Definition at line 465 of file PoPI.hpp.

Referenced by PoPI::getPhysicalQuantityAsDouble().

◆ valueToString()

std::string PoPI::PQ_integer::valueToString ( void ) const
virtual

Convert the integer value of this to a string.

Returns
The string value of this.

Implements PoPI::PhysicalQuantity.

Definition at line 176 of file PoPI_physicalQuantity.cc.

176 {
177
178 return( LUPI::Misc::argumentsToString( "%d", m_value ) );
179}
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305

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