Skip to content

Commit

Permalink
add mutable_type typedef for collections and user collection
Browse files Browse the repository at this point in the history
  • Loading branch information
m-fila committed Dec 19, 2024
1 parent ec61a51 commit a013f1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/podio/UserDataCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class UserDataCollection : public CollectionBase {

public:
using value_type = typename std::vector<BasicType>::value_type;
using mutable_type = value_type;
using const_iterator = typename std::vector<BasicType>::const_iterator;
using iterator = typename std::vector<BasicType>::iterator;
using difference_type = typename std::vector<BasicType>::difference_type;
Expand Down
1 change: 1 addition & 0 deletions python/templates/Collection.h.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ A Collection is identified by an ID.
class {{ class.bare_type }}Collection : public podio::CollectionBase {
public:
using value_type = {{ class.bare_type }};
using mutable_type = Mutable{{ class.bare_type }};
using const_iterator = {{ class.bare_type }}CollectionIterator;
using iterator = {{ class.bare_type }}MutableCollectionIterator;
using difference_type = ptrdiff_t;
Expand Down

0 comments on commit a013f1b

Please sign in to comment.