File indexing completed on 2025-01-18 10:05:55
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include <vector>
0011
0012 #include "corecel/Macros.hh"
0013 #include "corecel/data/Collection.hh"
0014 #include "corecel/data/CollectionBuilder.hh"
0015 #include "corecel/data/DedupeCollectionBuilder.hh"
0016
0017 #include "../OrangeData.hh"
0018 #include "../surf/VariantSurface.hh"
0019
0020 namespace celeritas
0021 {
0022 namespace detail
0023 {
0024
0025
0026
0027
0028
0029
0030 class SurfacesRecordBuilder
0031 {
0032 public:
0033
0034
0035 template<class T>
0036 using Items = Collection<T, Ownership::value, MemSpace::host>;
0037 using RealId = OpaqueId<real_type>;
0038 using VecSurface = std::vector<VariantSurface>;
0039 using result_type = SurfacesRecord;
0040
0041
0042 public:
0043
0044 SurfacesRecordBuilder(Items<SurfaceType>* types,
0045 Items<RealId>* real_ids,
0046 Items<real_type>* reals);
0047
0048
0049 result_type operator()(VecSurface const& surfaces);
0050
0051 private:
0052 CollectionBuilder<SurfaceType> types_;
0053 CollectionBuilder<RealId> real_ids_;
0054 DedupeCollectionBuilder<real_type> reals_;
0055 };
0056
0057
0058 }
0059 }