gsystem
Loading...
Searching...
No Matches
gmodifier.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
24{
25public:
38 GModifier(const std::string& n, const std::string& s, const std::string& t, bool existence) :
39 name(n),
40 shift(s),
41 tilts(t),
42 isPresent(existence) {
43 }
44
46 GModifier(const GModifier& other) = default;
47
48private:
49 std::string name;
50 std::string shift;
51 std::string tilts;
52 bool isPresent;
53
60 friend std::ostream& operator<<(std::ostream& stream, const GModifier& gm) {
61 stream << "GModifier: " << gm.name << " shift: " << gm.shift << " tilts: " << gm.tilts << " isPresent: "
62 << gm.isPresent;
63 return stream;
64 }
65
66public:
68 std::string getName() { return name; }
69
71 std::string getShift() { return shift; }
72
74 std::string getTilts() { return tilts; }
75
77 [[nodiscard]] bool getExistence() const { return isPresent; }
78};
Describes a post-load modification to a single volume.
Definition gmodifier.h:24
std::string getShift()
Returns the configured shift expression.
Definition gmodifier.h:71
std::string getName()
Returns the modifier target volume name.
Definition gmodifier.h:68
std::string getTilts()
Returns the configured tilt expression.
Definition gmodifier.h:74
GModifier(const GModifier &other)=default
Default copy constructor (value-object semantics).
bool getExistence() const
Returns whether the target volume should exist in the final world.
Definition gmodifier.h:77
GModifier(const std::string &n, const std::string &s, const std::string &t, bool existence)
Construct a modifier record.
Definition gmodifier.h:38
friend std::ostream & operator<<(std::ostream &stream, const GModifier &gm)
Stream operator for logging/debug printing.
Definition gmodifier.h:60