Closed program-- closed 2 months ago
I think is_property_sum_over_time_step
should also be const
Re noexcept
:
DataProvider
methods. They may call into BMI routines that might fail for whatever reason. We want that exception to get thrown and potentially handled at whatever level, and not just immediately call terminate
when they hit this layer of the call stack.So, my take is that we should go ahead with adding const
, and hold off on noexcept
for now.
Re
noexcept
:...
Yeah I agree. I forgot the extent of the DataProvider hierarchy (thankfully CI reminded me 😄), but I'm happy with only const
being added.
This all looks good, but I'm sick enough that I'm not going to press "merge" on anything myself today.
This PR adds
const
specifiers as applicable to classes associated withDataProvider<...>
.The primary reason for this change is to ensure const-correctness within the DataProvider class hierarchy, as there's no reason not to (at least no reasons that I can think of immediately).
Changes
const
qualifies the following:
+ `get_available_variable_names` + `get_data_start_time` + `get_data_stop_time` + `record_duration` + `get_ts_index_for_time` + `is_property_sum_over_time_step`data_access::DataProvider
+ `get_formulation_type` + `get_required_parameters`realization::Formulation
+ `get_output_header_line`realization::Catchment_Formulation
+ `convert_model_time` + `get_bmi_input_variables` + `get_bmi_model_start_time_forcing_offset_s` + `get_bmi_output_variables` + `get_config_mapped_variable_name` + `get_model_current_time` + `get_model_end_time` + `get_model_type_name` + `is_bmi_input_variable` + `is_bmi_model_time_step_fixed` + `is_bmi_output_variable` + `is_model_initialized`realization::Bmi_Formulation
Checklist