Skip to content

Commit

Permalink
Update Metadata.h
Browse files Browse the repository at this point in the history
  • Loading branch information
geier1993 authored Jan 14, 2025
1 parent 65e2b82 commit 1999fe2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/multio/message/Metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ class Metadata : public BaseMetadata {
using Iterator = typename MapType::iterator;
using ConstIterator = typename MapType::const_iterator;

// Onlything we need to change to support lookups in parametrization
// The single place we need to change to support lookups in parametrization.
// Important: The non-const version will copy values from the global parametrization dictionary
// to the local one - It will always return an iterator to the local dictionary.
// This allows values to be modified in the local object directly.
//
// The const version will return either an iterator to the local object or the
// global parametrization dictionary.
// If keys are assumed to hold nested objects or large arrays which won't be modified anyway -
// it is reasonable to explicitly const-cast the object to select the const lookup version.
Iterator find(const KeyType& k) override;
ConstIterator find(const KeyType& k) const override;

Expand Down

0 comments on commit 1999fe2

Please sign in to comment.