31 #ifndef G4CONVERSIONUTILS_HH
32 #define G4CONVERSIONUTILS_HH
39 namespace G4ConversionUtils
44 template <
typename Value>
48 input = input.
strip();
50 std::istringstream is(input);
53 return ((is >> output) && !is.get(tester));
61 input = input.
strip();
66 std::istringstream is(input);
69 if (!(is >> value >> unit) || is.get(tester))
return false;
80 input = input.strip();
85 std::istringstream is(input);
88 if (!(is >> value1 >> value2 >> value3 >>unit) || is.get(tester))
return false;
98 input = input.
strip();
102 std::istringstream is(input);
105 if (!(is >> value1 >> value2 >> value3) || is.get(tester))
return false;
118 input = input.
strip();
120 std::istringstream is(input);
123 return ((is >> value1 >> value2) && (!is.get(tester)));
131 input = input.
strip();
136 std::istringstream is(input);
139 if (!(is >> valueMin >> unitsMin >> valueMax >> unitsMax) || is.get(tester))
return false;;
151 input = input.strip();
153 G4double valueMinX, valueMinY, valueMinZ;
154 G4double valueMaxX, valueMaxY, valueMaxZ;
157 std::istringstream is(input);
160 if (!(is >> valueMinX >> valueMinY >> valueMinZ >> unitMin >> valueMaxX >> valueMaxY >> valueMaxZ >> unitMax)
161 || is.get(tester))
return false;
173 input = input.
strip();
175 G4double valueMinX, valueMinY, valueMinZ;
176 G4double valueMaxX, valueMaxY, valueMaxZ;
178 std::istringstream is(input);
181 if (!(is >> valueMinX >> valueMinY >> valueMinZ >> valueMaxX >> valueMaxY >> valueMaxZ)
182 || is.get(tester))
return false;