diff --git a/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/buffer.hpp b/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/buffer.hpp index 97c49aba6..c4f9cd7ca 100644 --- a/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/buffer.hpp +++ b/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/buffer.hpp @@ -28,8 +28,8 @@ class Buffer { void set_nan(Idx buffer_offset) { set_nan(*this, buffer_offset, 1); } void set_nan(Idx buffer_offset, Idx size) { set_nan(*this, buffer_offset, size); } - static void set_value(MetaAttribute const* attribute, Buffer& buffer, RawDataConstPtr src_ptr, Idx buffer_offset, - Idx size, Idx src_stride) { // NOSONAR: no reference-to-const + static void set_value(MetaAttribute const* attribute, Buffer& buffer, // NOSONAR: no reference-to-const + RawDataConstPtr src_ptr, Idx buffer_offset, Idx size, Idx src_stride) { buffer.handle_.call_with(PGM_buffer_set_value, attribute, buffer.buffer_.get(), src_ptr, buffer_offset, size, src_stride); } diff --git a/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/dataset.hpp b/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/dataset.hpp index 2074cd50f..039860304 100644 --- a/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/dataset.hpp +++ b/power_grid_model_c/power_grid_model_cpp/include/power_grid_model_cpp/dataset.hpp @@ -80,16 +80,16 @@ class DatasetWritable { static DatasetInfo const& get_info(DatasetWritable const& dataset) { return dataset.info_; } DatasetInfo const& get_info() const { return get_info(*this); } - static void set_buffer(DatasetWritable& dataset, std::string const& component, Idx* indptr, - RawDataPtr data) { // NOSONAR: no reference-to-const + static void set_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const + std::string const& component, Idx* indptr, RawDataPtr data) { dataset.handle_.call_with(PGM_dataset_writable_set_buffer, dataset.dataset_, component.c_str(), indptr, data); } void set_buffer(std::string const& component, Idx* indptr, RawDataPtr data) { set_buffer(*this, component, indptr, data); } - static void set_buffer(DatasetWritable& dataset, std::string const& component, Idx* indptr, - Buffer const& data) { // NOSONAR: no reference-to-const + static void set_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const + std::string const& component, Idx* indptr, Buffer const& data) { dataset.handle_.call_with(PGM_dataset_writable_set_buffer, dataset.dataset_, component.c_str(), indptr, data.get()); } @@ -97,8 +97,8 @@ class DatasetWritable { set_buffer(*this, component, indptr, data); } - static void set_attribute_buffer(DatasetWritable& dataset, std::string const& component, - std::string const& attribute, RawDataPtr data) { // NOSONAR: no reference-to-const + static void set_attribute_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const + std::string const& component, std::string const& attribute, RawDataPtr data) { dataset.handle_.call_with(PGM_dataset_writable_set_attribute_buffer, dataset.dataset_, component.c_str(), attribute.c_str(), data); } @@ -106,9 +106,8 @@ class DatasetWritable { set_attribute_buffer(*this, component, attribute, data); } - static void set_attribute_buffer(DatasetWritable& dataset, std::string const& component, - std::string const& attribute, - Buffer const& data) { // NOSONAR: no reference-to-const + static void set_attribute_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const + std::string const& component, std::string const& attribute, Buffer const& data) { dataset.handle_.call_with(PGM_dataset_writable_set_attribute_buffer, dataset.dataset_, component.c_str(), attribute.c_str(), data.get()); } @@ -130,8 +129,9 @@ class DatasetMutable { RawMutableDataset* get() const { return dataset_.get(); } - static void add_buffer(DatasetMutable& dataset, std::string const& component, Idx elements_per_scenario, - Idx total_elements, Idx const* indptr, RawDataPtr data) { // NOSONAR: no reference-to-const + static void add_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const + std::string const& component, Idx elements_per_scenario, Idx total_elements, + Idx const* indptr, RawDataPtr data) { dataset.handle_.call_with(PGM_dataset_mutable_add_buffer, dataset.dataset_.get(), component.c_str(), elements_per_scenario, total_elements, indptr, data); } @@ -140,9 +140,9 @@ class DatasetMutable { add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data); } - static void add_buffer(DatasetMutable& dataset, std::string const& component, Idx elements_per_scenario, - Idx total_elements, Idx const* indptr, - Buffer const& data) { // NOSONAR: no reference-to-const + static void add_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const + std::string const& component, Idx elements_per_scenario, Idx total_elements, + Idx const* indptr, Buffer const& data) { dataset.handle_.call_with(PGM_dataset_mutable_add_buffer, dataset.dataset_.get(), component.c_str(), elements_per_scenario, total_elements, indptr, data.get()); } @@ -151,8 +151,8 @@ class DatasetMutable { add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data); } - static void add_attribute_buffer(DatasetMutable& dataset, std::string const& component, - std::string const& attribute, RawDataPtr data) { // NOSONAR: no reference-to-const + static void add_attribute_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const + std::string const& component, std::string const& attribute, RawDataPtr data) { dataset.handle_.call_with(PGM_dataset_mutable_add_attribute_buffer, dataset.dataset_.get(), component.c_str(), attribute.c_str(), data); } @@ -160,9 +160,8 @@ class DatasetMutable { add_attribute_buffer(*this, component, attribute, data); } - static void add_attribute_buffer(DatasetMutable& dataset, std::string const& component, - std::string const& attribute, - Buffer const& data) { // NOSONAR: no reference-to-const + static void add_attribute_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const + std::string const& component, std::string const& attribute, Buffer const& data) { dataset.handle_.call_with(PGM_dataset_mutable_add_attribute_buffer, dataset.dataset_.get(), component.c_str(), attribute.c_str(), data.get()); } @@ -193,9 +192,9 @@ class DatasetConst { RawConstDataset* get() const { return dataset_.get(); } - static void add_buffer(DatasetConst& dataset, std::string const& component, Idx elements_per_scenario, - Idx total_elements, Idx const* indptr, - RawDataConstPtr data) { // NOSONAR: no reference-to-const + static void add_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const + std::string const& component, Idx elements_per_scenario, Idx total_elements, + Idx const* indptr, RawDataConstPtr data) { dataset.handle_.call_with(PGM_dataset_const_add_buffer, dataset.dataset_.get(), component.c_str(), elements_per_scenario, total_elements, indptr, data); } @@ -204,9 +203,9 @@ class DatasetConst { add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data); } - static void add_buffer(DatasetConst& dataset, std::string const& component, Idx elements_per_scenario, - Idx total_elements, Idx const* indptr, - Buffer const& data) { // NOSONAR: no reference-to-const + static void add_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const + std::string const& component, Idx elements_per_scenario, Idx total_elements, + Idx const* indptr, Buffer const& data) { dataset.handle_.call_with(PGM_dataset_const_add_buffer, dataset.dataset_.get(), component.c_str(), elements_per_scenario, total_elements, indptr, data.get()); } @@ -215,8 +214,8 @@ class DatasetConst { add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data); } - static void add_attribute_buffer(DatasetConst& dataset, std::string const& component, std::string const& attribute, - RawDataConstPtr data) { // NOSONAR: no reference-to-const + static void add_attribute_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const + std::string const& component, std::string const& attribute, RawDataConstPtr data) { dataset.handle_.call_with(PGM_dataset_const_add_attribute_buffer, dataset.dataset_.get(), component.c_str(), attribute.c_str(), data); } @@ -224,8 +223,8 @@ class DatasetConst { add_attribute_buffer(*this, component, attribute, data); } - static void add_attribute_buffer(DatasetConst& dataset, std::string const& component, std::string const& attribute, - Buffer const& data) { // NOSONAR: no reference-to-const + static void add_attribute_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const + std::string const& component, std::string const& attribute, Buffer const& data) { dataset.handle_.call_with(PGM_dataset_const_add_attribute_buffer, dataset.dataset_.get(), component.c_str(), attribute.c_str(), data.get()); }