Skip to content

Step 1 — Replace SharedPrimitive scalar fields with plain C++ types across all interface classes #1646

Description

@Andrea-Havron-NOAA

Labels: refactor, C++

Parent: #1644

Note: PopulationInterface has already been migrated as a reference implementation (see PR #N). This issue covers the remaining interface classes.

In every interface class, replace SharedInt, SharedBoolean, SharedReal, and SharedString fields that hold scalar configuration values with their plain C++ equivalents (int, bool, double, std::string). This is only safe to do in conjunction with Step 3 (removal of constructor copies), because without the copy there is no synchronization problem to solve.

Files to update

  • rcpp_fleet.hpp — SharedInt data ID fields, SharedString name, SharedString observed_units
  • rcpp_recruitment.hpp — SharedInt n_years, SharedInt process_id, SharedReal estimated values
  • rcpp_growth.hpp — SharedInt n_years
  • rcpp_data.hpp — SharedInt amax, SharedInt ymax in data interface classes
  • rcpp_distribution.hpp — SharedString input_type_m, SharedString use_mean_m, SharedInt interface_observed_data_id_m, SharedString notes
  • For each class: remove SharedPrimitive field declarations, add plain-type equivalents with sensible defaults, update all .get() / .set() call sites, and update add_to_fims_tmb_internal() accordingly.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions