Describes a post-load modification to a single volume.
More...
#include <gmodifier.h>
|
| | GModifier (const std::string &n, const std::string &s, const std::string &t, bool existence) |
| | Construct a modifier record.
|
| |
| | GModifier (const GModifier &other)=default |
| | Default copy constructor (value-object semantics).
|
| |
| std::string | getName () |
| | Returns the modifier target volume name.
|
| |
| std::string | getShift () |
| | Returns the configured shift expression.
|
| |
| std::string | getTilts () |
| | Returns the configured tilt expression.
|
| |
| bool | getExistence () const |
| | Returns whether the target volume should exist in the final world.
|
| |
|
| std::ostream & | operator<< (std::ostream &stream, const GModifier &gm) |
| | Stream operator for logging/debug printing.
|
| |
A GModifier is a small value-object that carries optional adjustments that will be applied to a target volume after it is loaded by a GSystemFactory and inserted into a GSystem.
Typical uses include:
- applying an additional translation ("shift") to a volume placement;
- applying an additional rotation ("tilts") to a volume placement;
- toggling the existence flag (remove a volume from the world).
- Note
- This class is intentionally minimal: it stores the modifier values and provides trivial getters. It does not apply the modifications itself.
Definition at line 23 of file gmodifier.h.
◆ GModifier() [1/2]
| GModifier::GModifier |
( |
const std::string & | n, |
|
|
const std::string & | s, |
|
|
const std::string & | t, |
|
|
bool | existence ) |
|
inline |
- Parameters
-
| n | The target volume name. This must match the key used to find the volume within the world (typically the volume name as stored in the geometry). |
| s | The shift expression to apply (e.g. "0*cm, 0*cm, 1*cm"), or GSYSTEMNOMODIFIER when not used. |
| t | The tilt expression to apply (e.g. "0*deg, 0*deg, -10*deg"), or GSYSTEMNOMODIFIER when not used. |
| existence | Existence toggle: true means the volume is present, false means it should be removed/disabled. |
Definition at line 38 of file gmodifier.h.
◆ GModifier() [2/2]
| GModifier::GModifier |
( |
const GModifier & | other | ) |
|
|
default |
◆ getExistence()
| bool GModifier::getExistence |
( |
| ) |
const |
|
inline |
◆ getName()
| std::string GModifier::getName |
( |
| ) |
|
|
inline |
◆ getShift()
| std::string GModifier::getShift |
( |
| ) |
|
|
inline |
◆ getTilts()
| std::string GModifier::getTilts |
( |
| ) |
|
|
inline |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | stream, |
|
|
const GModifier & | gm ) |
|
friend |
Prints a compact representation of the modifier so that callers can include it in logger output.
Definition at line 60 of file gmodifier.h.
The documentation for this class was generated from the following file: