Go to the source code of this file.
| #define THERMOCLINE_GETTER |
( |
|
number, |
|
|
|
Accessor, |
|
|
|
Setter |
|
) |
| |
Value:const double thermoclineLayer##number####Setter() const override \
{ \
const unsigned indexToUse = number - 1; \
DtVrfSubsurfaceLayer dummy; \
thermoclineLayer(indexToUse, dummy); \
return dummy.Accessor(); \
};
Generates a const getter for a thermocline layer property at the given 1-based layer number.
- Parameters
-
| number | The 1-based thermocline layer index. |
| Accessor | The unqualified property accessor method name (e.g., depth). |
| Setter | The capitalized property name used in the generated method name (e.g., Depth). |
| #define THERMOCLINE_SETTER |
( |
|
number, |
|
|
|
Accessor, |
|
|
|
Setter |
|
) |
| |
Value:void setThermoclineLayer##number####Setter( const double& Accessor ) override \
{ \
const unsigned indexToUse = number - 1; \
DtVrfSubsurfaceLayer dummy; \
thermoclineLayer(indexToUse, dummy); \
if (dummy.Accessor() != Accessor) \
{ \
dummy.set##Setter(Accessor); \
markModified(); \
setThermoclineLayerByIndex(dummy, indexToUse); \
} \
};
Generates a setter for a thermocline layer property at the given 1-based layer number. Only updates the layer if the value has changed, and marks the component as modified.
- Parameters
-
| number | The 1-based thermocline layer index. |
| Accessor | The unqualified property accessor method name (e.g., depth). |
| Setter | The capitalized property name used in the generated method name (e.g., Depth). |
| #define THERMOCLINE_SETTER_GETTER |
( |
|
number, |
|
|
|
Accessor, |
|
|
|
Setter |
|
) |
| |
Value:
#define THERMOCLINE_SETTER(number, Accessor, Setter)
Generates a setter for a thermocline layer property at the given 1-based layer number. Only updates the layer if the value has changed, and marks the component as modified.
Definition: subsurfaceStateComponent.h:205
#define THERMOCLINE_GETTER(number, Accessor, Setter)
Generates a const getter for a thermocline layer property at the given 1-based layer number...
Definition: subsurfaceStateComponent.h:191
Convenience macro that generates both a getter and a setter for a thermocline layer property.
- Parameters
-
| number | The 1-based thermocline layer index. |
| Accessor | The unqualified property accessor method name (e.g., depth). |
| Setter | The capitalized property name used in generated method names (e.g., Depth). |
| #define NEXTFRAME_ACCESSOR_MUTATOR_ |
( |
|
MemberType, |
|
|
|
Accessor, |
|
|
|
MutatorAndMember |
|
) |
| |
Value:public: \
const MemberType Accessor() const override { return frameState().Accessor(); }; \
void set##MutatorAndMember(const MemberType& v) override { if (frameState().Accessor() != v) { markModified(); frameState().set##MutatorAndMember(v); } };
Generates a value-type accessor and mutator for use in next-frame state component classes. The mutator only propagates the new value and marks the component modified when the value changes.
- Parameters
-
| MemberType | The type of the member. |
| Accessor | The accessor method name. |
| MutatorAndMember | The capitalized name used for the setter method. |