MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
VolumeQuantityContainer Class Reference

Class which represents a container for volume quantities. More...

#include <volume_quantity_container.h>

Collaboration diagram for VolumeQuantityContainer:

Public Member Functions

void addVectorQuantity (const VectorVolumeQuantity &quantity)
 Adds a vector quantity to the container.
 
void addCountQuantity (const CountVolumeQuantity &quantity)
 Adds a count quantity to the container.
 
void measureAll (TempVolumeTallyData &temp_tally_data)
 Measures all quantities in the container for a TempVolumeTallyData object.
 
VolumeQuantityContainer operator+ (VolumeQuantityContainer &other) const
 Overloads the + operator for VolumeQuantityContainer.
 
void clear ()
 Clears the container of all quantities.
 
std::unordered_map< VectorVolumeQuantityType, VectorVolumeQuantity > & getVectorQuantities ()
 Gets the map of vector quantities in the container.
 
std::unordered_map< CountVolumeQuantityType, CountVolumeQuantity > & getCountQuantities ()
 Gets the map of count quantities in the container.
 
void setVolume (double volume)
 Sets the volume of the volume tally.
 
double getVolume () const
 Gets the volume of the volume tally.
 

Private Attributes

std::unordered_map< VectorVolumeQuantityType, VectorVolumeQuantityvector_quantities_
 
std::unordered_map< CountVolumeQuantityType, CountVolumeQuantitycount_quantities_
 
double volume_
 

Detailed Description

Class which represents a container for volume quantities.

Essentially a wrapper around a map of VolumeQuantityType to their respective VolumeQuantity objects. Allows users to specify which quantities they want to measure for a volume tally.

Definition at line 15 of file volume_quantity_container.h.

Member Function Documentation

◆ addCountQuantity()

void VolumeQuantityContainer::addCountQuantity ( const CountVolumeQuantity & quantity)

Adds a count quantity to the container.

Parameters
quantityThe count quantity to add to the container.

◆ addVectorQuantity()

void VolumeQuantityContainer::addVectorQuantity ( const VectorVolumeQuantity & quantity)

Adds a vector quantity to the container.

Parameters
quantityThe vector quantity to add to the container.

◆ getCountQuantities()

std::unordered_map< CountVolumeQuantityType, CountVolumeQuantity > & VolumeQuantityContainer::getCountQuantities ( )

Gets the map of count quantities in the container.

Returns
The map of count quantities in the container.

◆ getVectorQuantities()

std::unordered_map< VectorVolumeQuantityType, VectorVolumeQuantity > & VolumeQuantityContainer::getVectorQuantities ( )

Gets the map of vector quantities in the container.

Returns
The map of vector quantities in the container.

◆ getVolume()

double VolumeQuantityContainer::getVolume ( ) const

Gets the volume of the volume tally.

Returns
The volume of the volume tally.

◆ measureAll()

void VolumeQuantityContainer::measureAll ( TempVolumeTallyData & temp_tally_data)

Measures all quantities in the container for a TempVolumeTallyData object.

Parameters
temp_tally_dataThe TempVolumeTallyData object to measure the quantities for.

◆ operator+()

VolumeQuantityContainer VolumeQuantityContainer::operator+ ( VolumeQuantityContainer & other) const

Overloads the + operator for VolumeQuantityContainer.

Parameters
otherThe VolumeQuantityContainer to add to this VolumeQuantityContainer.
Returns
The sum of the two VolumeQuantityContainer objects.

◆ setVolume()

void VolumeQuantityContainer::setVolume ( double volume)

Sets the volume of the volume tally.

Parameters
volumeThe volume of the volume tally.

Member Data Documentation

◆ count_quantities_

std::unordered_map<CountVolumeQuantityType, CountVolumeQuantity> VolumeQuantityContainer::count_quantities_
private

Definition at line 81 of file volume_quantity_container.h.

◆ vector_quantities_

std::unordered_map<VectorVolumeQuantityType, VectorVolumeQuantity> VolumeQuantityContainer::vector_quantities_
private

Definition at line 80 of file volume_quantity_container.h.

◆ volume_

double VolumeQuantityContainer::volume_
private

Definition at line 82 of file volume_quantity_container.h.


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