ATLAS Offline Software
Loading...
Searching...
No Matches
columnar::AccessorTemplate< CI, CT, CAM, CM > Class Template Reference

the raw column accessor template class More...

Collaboration diagram for columnar::AccessorTemplate< CI, CT, CAM, CM >:

Detailed Description

template<ContainerIdConcept CI, typename CT, ColumnAccessMode CAM, typename CM>
class columnar::AccessorTemplate< CI, CT, CAM, CM >

the raw column accessor template class

The idea is that various different kinds of accessors can specialize this template to provide support for the specific types and modes they support. The primary way in which users specify alternate accessors is by wrapping the column type, e.g. std::vector<float> for a column that contains a vector of floats per object.

Originally all accessor classes were separate and unique templates, but I switched to this overloaded approach for several reasons:

  • I actually need a lot fewer specializations than I had template classes before. Often instead of a full accessor class I can just define a trait class, or conversely make a specialization that covers what before where multiple classes.
  • There are some accessor configuration that are supported now and would have required a separate template class before, e.g. something like std::vector<RetypeColumn<...>> wasn't supported before, but now it is.
  • Overall I find it easier to ensure consistency across specializations with this approach, as well as making it easier to add some new behavior.
  • With a single template class for accessors I can use the same set of typedef/using statements for all accessors, which makes it a lot easier to maintain. Before I had a full set for the main accessor, but for the other accessors the list was fairly incomplete.
  • The way users instantiate "non-standard" accessors seems a little more clear with this approach.
CI the container id
CT the column type
CAM the column access mode
CM the columnar mode

Definition at line 81 of file ColumnAccessor.h.


The documentation for this class was generated from the following file: