Celeritas 0.6.0-110+develop.c7dc37d1
|
Visitor class that converts volume-related types to string representations. More...
#include <VolumeToString.hh>
Public Types | |
Type aliases | |
using | VariantLabel = std::variant< Label, VolumeId, VolumeInstanceId, std::string > |
Public Member Functions | |
VolumeToString (VolumeParams const ¶ms) | |
Construct with volume params reference. | |
std::string | operator() (Label const &label) const |
Convert Label to string. | |
std::string | operator() (VolumeId const &id) const |
Convert VolumeId to string. | |
std::string | operator() (VolumeInstanceId const &id) const |
Convert VolumeInstanceId to string. | |
Visitor class that converts volume-related types to string representations.
This class can be used with std::visit to convert variant types to strings. When constructed with VolumeParams reference, it will look up labels for IDs; otherwise it will print just the ID value or a null indicator.