preprocessor now filters debug output
This commit is contained in:
@@ -7,7 +7,9 @@ std::shared_ptr<Geometry> buildGeometry(Parameter& parameter,
|
||||
const json_path& path_to_geometry) {
|
||||
if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_geometry, {"Cylinder"}))) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating geometry: cylinder.");
|
||||
#endif
|
||||
double radius =
|
||||
json_read_length(parameter.jsonObjectFromBase(json_path_append(
|
||||
path_to_geometry, {"Cylinder", "Radius"})),
|
||||
@@ -16,8 +18,10 @@ std::shared_ptr<Geometry> buildGeometry(Parameter& parameter,
|
||||
json_read_length(parameter.jsonObjectFromBase(json_path_append(
|
||||
path_to_geometry, {"Cylinder", "Height"})),
|
||||
"m");
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("with radius: " + std::to_string(radius) + " m");
|
||||
DEBUG_LEVEL_3("with height: " + std::to_string(height) + " m");
|
||||
#endif
|
||||
return std::shared_ptr<Geometry>(new Cylinder(radius, height));
|
||||
} else {
|
||||
ERROR("This geometry is not implemented.");
|
||||
@@ -29,14 +33,18 @@ std::shared_ptr<Geometry> buildGeometryIncludingRedirection(
|
||||
Parameter& parameter, const json_path& path_to_geometry) {
|
||||
if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_geometry, {"CreateSameAs"}))) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating geometry: CreateSameAs.");
|
||||
#endif
|
||||
json_path path_to_same = json_path_get(parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_geometry, {"CreateSameAs"})));
|
||||
std::stringstream path;
|
||||
for (auto& p : path_to_same) {
|
||||
path << p << " ";
|
||||
}
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("From path: " + path.str());
|
||||
#endif
|
||||
return buildGeometryIncludingRedirection(parameter, path_to_same);
|
||||
} else {
|
||||
return buildGeometry(parameter, path_to_geometry);
|
||||
|
||||
Reference in New Issue
Block a user