Skip to content

Commit

Permalink
data_container: add protected access methods
Browse files Browse the repository at this point in the history
allows derived classes to modify the data
  • Loading branch information
bkueng committed Oct 12, 2023
1 parent 45b0b4a commit 8b6f3ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ulog_cpp/data_container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ class DataContainer : public DataHandlerInterface {
const std::unordered_map<uint16_t, Subscription>& subscriptions() const { return _subscriptions; }
const std::vector<Dropout>& dropouts() const { return _dropouts; }

protected:
std::map<std::string, MessageInfo>& messageInfoRef() { return _message_info; }
std::map<std::string, std::vector<std::vector<MessageInfo>>>& messageInfoMultiRef() { return _message_info_multi; }
std::map<std::string, Parameter>& initialParametersRef() { return _initial_parameters; }
std::map<std::string, ParameterDefault>& defaultParametersRef() { return _default_parameters; }
std::vector<Parameter>& changedParametersRef() { return _changed_parameters; }
std::vector<Logging>& loggingRef() { return _logging; }
std::vector<Dropout>& dropoutsRef() { return _dropouts; }

private:
const StorageConfig _storage_config;

Expand Down

0 comments on commit 8b6f3ee

Please sign in to comment.