MCPcopy Create free account
hub / github.com/chrxh/alien / findLocation

Method findLocation

source/Gui/LocationHelper.cpp:5–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "Base/Definitions.h"
4
5std::variant<SimulationParametersZone*, RadiationSource*> LocationHelper::findLocation(SimulationParameters& parameters, int locationIndex)
6{
7 for (int i = 0; i < parameters.numZones; ++i) {
8 if (parameters.zone[i].locationIndex == locationIndex) {
9 return &parameters.zone[i];
10 }
11 }
12 for (int i = 0; i < parameters.numRadiationSources; ++i) {
13 if (parameters.radiationSource[i].locationIndex == locationIndex) {
14 return &parameters.radiationSource[i];
15 }
16 }
17 THROW_NOT_IMPLEMENTED();
18}
19
20int LocationHelper::findLocationArrayIndex(SimulationParameters const& parameters, int locationIndex)
21{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected