From d8697496dc3963d5fbd4e3c2ed3f007e5af2d71d Mon Sep 17 00:00:00 2001 From: BenPinet Date: Tue, 4 Aug 2026 15:52:45 +0200 Subject: [PATCH] feat(Passkey): add explicit to passkey constructor --- include/geode/basic/identifier.hpp | 3 +- include/geode/basic/passkey.hpp | 2 +- .../geode/mesh/builder/vertex_set_builder.hpp | 2 +- .../coordinate_reference_system_manager.hpp | 4 +- .../coordinate_reference_system_managers.hpp | 5 +- .../mesh/core/geode/geode_edged_curve.hpp | 4 +- include/geode/mesh/core/geode/geode_graph.hpp | 4 +- .../mesh/core/geode/geode_hybrid_solid.hpp | 4 +- .../geode/mesh/core/geode/geode_point_set.hpp | 2 +- .../core/geode/geode_polygonal_surface.hpp | 4 +- .../core/geode/geode_polyhedral_solid.hpp | 4 +- .../core/geode/geode_regular_grid_solid.hpp | 2 +- .../core/geode/geode_regular_grid_surface.hpp | 2 +- .../core/geode/geode_tetrahedral_solid.hpp | 4 +- .../core/geode/geode_triangulated_surface.hpp | 4 +- include/geode/mesh/core/graph.hpp | 2 +- include/geode/mesh/core/grid.hpp | 2 +- include/geode/mesh/core/solid_edges.hpp | 2 +- include/geode/mesh/core/solid_facets.hpp | 2 +- include/geode/mesh/core/solid_mesh.hpp | 2 +- include/geode/mesh/core/surface_edges.hpp | 2 +- include/geode/mesh/core/surface_mesh.hpp | 2 +- include/geode/mesh/core/texture_storage.hpp | 2 +- .../model/mixin/builder/blocks_builder.hpp | 8 ++- .../model/mixin/builder/surfaces_builder.hpp | 8 ++- .../builder/vertex_identifier_builder.hpp | 9 ++- include/geode/model/mixin/core/block.hpp | 4 +- .../model/mixin/core/block_collection.hpp | 6 +- .../model/mixin/core/block_collections.hpp | 4 +- include/geode/model/mixin/core/blocks.hpp | 2 +- .../model/mixin/core/component_registry.hpp | 3 +- include/geode/model/mixin/core/corner.hpp | 4 +- .../model/mixin/core/corner_collection.hpp | 6 +- .../model/mixin/core/corner_collections.hpp | 4 +- include/geode/model/mixin/core/corners.hpp | 2 +- include/geode/model/mixin/core/line.hpp | 4 +- .../model/mixin/core/line_collection.hpp | 6 +- .../model/mixin/core/line_collections.hpp | 4 +- include/geode/model/mixin/core/lines.hpp | 2 +- .../model/mixin/core/model_boundaries.hpp | 4 +- .../geode/model/mixin/core/model_boundary.hpp | 6 +- .../geode/model/mixin/core/relationships.hpp | 1 + include/geode/model/mixin/core/surface.hpp | 4 +- .../model/mixin/core/surface_collection.hpp | 6 +- .../model/mixin/core/surface_collections.hpp | 4 +- include/geode/model/mixin/core/surfaces.hpp | 2 +- .../model/mixin/core/vertex_identifier.hpp | 3 +- src/geode/basic/attribute_manager.cpp | 37 ++++++++----- src/geode/basic/identifier_builder.cpp | 8 +-- ...inate_reference_system_manager_builder.cpp | 22 ++++++-- ...nate_reference_system_managers_builder.cpp | 20 +++++-- .../geode/geode_edged_curve_builder.cpp | 3 +- .../builder/geode/geode_graph_builder.cpp | 3 +- .../geode/geode_hybrid_solid_builder.cpp | 33 ++++++----- .../geode/geode_polygonal_surface_builder.cpp | 31 +++++++---- .../geode/geode_polyhedral_solid_builder.cpp | 33 +++++++---- .../geode_regular_grid_solid_builder.cpp | 5 +- .../geode_regular_grid_surface_builder.cpp | 5 +- .../geode/geode_tetrahedral_solid_builder.cpp | 22 +++++--- .../geode_triangulated_surface_builder.cpp | 21 ++++--- src/geode/mesh/builder/graph_builder.cpp | 9 ++- src/geode/mesh/builder/grid_builder.cpp | 11 ++-- .../mesh/builder/solid_edges_builder.cpp | 23 +++++--- .../mesh/builder/solid_facets_builder.cpp | 23 +++++--- src/geode/mesh/builder/solid_mesh_builder.cpp | 23 +++++--- .../mesh/builder/surface_edges_builder.cpp | 23 +++++--- .../mesh/builder/surface_mesh_builder.cpp | 17 +++--- src/geode/mesh/core/texture_manager.cpp | 21 ++++--- src/geode/mesh/core/vertex_set.cpp | 2 +- .../builder/block_collections_builder.cpp | 34 +++++++++--- .../model/mixin/builder/blocks_builder.cpp | 46 +++++++++++----- .../builder/component_registry_builder.cpp | 12 ++-- .../builder/corner_collections_builder.cpp | 34 +++++++++--- .../model/mixin/builder/corners_builder.cpp | 55 +++++++++++++------ .../builder/line_collections_builder.cpp | 34 +++++++++--- .../model/mixin/builder/lines_builder.cpp | 54 ++++++++++++------ .../builder/model_boundaries_builder.cpp | 35 +++++++++--- .../mixin/builder/relationships_builder.cpp | 22 +++++--- .../builder/surface_collections_builder.cpp | 34 +++++++++--- .../model/mixin/builder/surfaces_builder.cpp | 50 ++++++++++++----- .../builder/vertex_identifier_builder.cpp | 23 +++++--- src/geode/model/mixin/core/blocks.cpp | 10 ++-- src/geode/model/mixin/core/corners.cpp | 7 ++- src/geode/model/mixin/core/lines.cpp | 7 ++- src/geode/model/mixin/core/surfaces.cpp | 7 ++- 85 files changed, 677 insertions(+), 354 deletions(-) diff --git a/include/geode/basic/identifier.hpp b/include/geode/basic/identifier.hpp index 1524f1ffa..7346175cf 100644 --- a/include/geode/basic/identifier.hpp +++ b/include/geode/basic/identifier.hpp @@ -44,10 +44,11 @@ namespace geode { class opengeode_basic_api Identifier { - PASSKEY( IdentifierBuilder, IdentifierKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( IdentifierBuilder, IdentifierKey /*key*/ ); + Identifier( Identifier&& other ) noexcept; ~Identifier(); diff --git a/include/geode/basic/passkey.hpp b/include/geode/basic/passkey.hpp index 7f6912f35..b39c63364 100644 --- a/include/geode/basic/passkey.hpp +++ b/include/geode/basic/passkey.hpp @@ -57,7 +57,7 @@ namespace geode friend T; private: - PassKey() = default; + explicit PassKey() = default; }; #define PASSKEY( Friend, Key /*key*/ ) using Key = geode::PassKey< Friend > diff --git a/include/geode/mesh/builder/vertex_set_builder.hpp b/include/geode/mesh/builder/vertex_set_builder.hpp index 045e47d3f..ca14aae59 100644 --- a/include/geode/mesh/builder/vertex_set_builder.hpp +++ b/include/geode/mesh/builder/vertex_set_builder.hpp @@ -47,9 +47,9 @@ namespace geode class opengeode_mesh_api VertexSetBuilder : public IdentifierBuilder { OPENGEODE_DISABLE_COPY( VertexSetBuilder ); - PASSKEY( VertexSet, VertexSetKey /*key*/ ); public: + PASSKEY( VertexSet, VertexSetKey /*key*/ ); VertexSetBuilder( VertexSetBuilder&& ) noexcept = default; virtual ~VertexSetBuilder() = default; diff --git a/include/geode/mesh/core/coordinate_reference_system_manager.hpp b/include/geode/mesh/core/coordinate_reference_system_manager.hpp index 4185cf208..ee5f043bd 100644 --- a/include/geode/mesh/core/coordinate_reference_system_manager.hpp +++ b/include/geode/mesh/core/coordinate_reference_system_manager.hpp @@ -47,11 +47,11 @@ namespace geode template < index_t dimension > class CoordinateReferenceSystemManager { - PASSKEY( CoordinateReferenceSystemManagerBuilder< dimension >, - CRSManagerKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( CoordinateReferenceSystemManagerBuilder< dimension >, + CRSManagerKey /*key*/ ); CoordinateReferenceSystemManager(); CoordinateReferenceSystemManager( CoordinateReferenceSystemManager&& other ) noexcept; diff --git a/include/geode/mesh/core/coordinate_reference_system_managers.hpp b/include/geode/mesh/core/coordinate_reference_system_managers.hpp index 3885b5572..8059965ee 100644 --- a/include/geode/mesh/core/coordinate_reference_system_managers.hpp +++ b/include/geode/mesh/core/coordinate_reference_system_managers.hpp @@ -47,11 +47,12 @@ namespace geode template < index_t dimension > class CoordinateReferenceSystemManagers { - PASSKEY( CoordinateReferenceSystemManagersBuilder< dimension >, - CRSManagersKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( CoordinateReferenceSystemManagersBuilder< dimension >, + CRSManagersKey /*key*/ ); + ~CoordinateReferenceSystemManagers(); [[nodiscard]] const CoordinateReferenceSystemManager1D& diff --git a/include/geode/mesh/core/geode/geode_edged_curve.hpp b/include/geode/mesh/core/geode/geode_edged_curve.hpp index 4514eec26..b4b1b81e4 100644 --- a/include/geode/mesh/core/geode/geode_edged_curve.hpp +++ b/include/geode/mesh/core/geode/geode_edged_curve.hpp @@ -42,10 +42,10 @@ namespace geode class OpenGeodeEdgedCurve : public EdgedCurve< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodeEdgedCurve ); - PASSKEY( - OpenGeodeEdgedCurveBuilder< dimension >, OGEdgedCurveKey /*key*/ ); public: + PASSKEY( + OpenGeodeEdgedCurveBuilder< dimension >, OGEdgedCurveKey /*key*/ ); using Builder = OpenGeodeEdgedCurveBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/geode/geode_graph.hpp b/include/geode/mesh/core/geode/geode_graph.hpp index 406ae3b97..a24bea0c3 100644 --- a/include/geode/mesh/core/geode/geode_graph.hpp +++ b/include/geode/mesh/core/geode/geode_graph.hpp @@ -39,11 +39,9 @@ namespace geode { class opengeode_mesh_api OpenGeodeGraph : public Graph { - PASSKEY( OpenGeodeGraphBuilder, OGGraphKey /*key*/ ); - public: using Builder = OpenGeodeGraphBuilder; - + PASSKEY( OpenGeodeGraphBuilder, OGGraphKey /*key*/ ); OpenGeodeGraph(); OpenGeodeGraph( BITSERY ); OpenGeodeGraph( OpenGeodeGraph&& other ) noexcept; diff --git a/include/geode/mesh/core/geode/geode_hybrid_solid.hpp b/include/geode/mesh/core/geode/geode_hybrid_solid.hpp index 4e1997eae..2a44f33a3 100644 --- a/include/geode/mesh/core/geode/geode_hybrid_solid.hpp +++ b/include/geode/mesh/core/geode/geode_hybrid_solid.hpp @@ -44,10 +44,10 @@ namespace geode class OpenGeodeHybridSolid : public HybridSolid< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodeHybridSolid ); - PASSKEY( OpenGeodeHybridSolidBuilder< dimension >, - OGHybridSolidKey /*key*/ ); public: + PASSKEY( OpenGeodeHybridSolidBuilder< dimension >, + OGHybridSolidKey /*key*/ ); using Builder = OpenGeodeHybridSolidBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/geode/geode_point_set.hpp b/include/geode/mesh/core/geode/geode_point_set.hpp index 9ef33a5a9..40cfe401d 100644 --- a/include/geode/mesh/core/geode/geode_point_set.hpp +++ b/include/geode/mesh/core/geode/geode_point_set.hpp @@ -44,9 +44,9 @@ namespace geode class OpenGeodePointSet : public PointSet< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodePointSet ); - PASSKEY( OpenGeodePointSetBuilder< dimension >, OGPointSetKey /*key*/ ); public: + PASSKEY( OpenGeodePointSetBuilder< dimension >, OGPointSetKey /*key*/ ); using Builder = OpenGeodePointSetBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/geode/geode_polygonal_surface.hpp b/include/geode/mesh/core/geode/geode_polygonal_surface.hpp index 1ca923754..14126fa24 100644 --- a/include/geode/mesh/core/geode/geode_polygonal_surface.hpp +++ b/include/geode/mesh/core/geode/geode_polygonal_surface.hpp @@ -42,10 +42,10 @@ namespace geode class OpenGeodePolygonalSurface : public PolygonalSurface< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodePolygonalSurface ); - PASSKEY( OpenGeodePolygonalSurfaceBuilder< dimension >, - OGPolygonalSurfaceKey /*key*/ ); public: + PASSKEY( OpenGeodePolygonalSurfaceBuilder< dimension >, + OGPolygonalSurfaceKey /*key*/ ); using Builder = OpenGeodePolygonalSurfaceBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/geode/geode_polyhedral_solid.hpp b/include/geode/mesh/core/geode/geode_polyhedral_solid.hpp index bae5f00c9..547db5e44 100644 --- a/include/geode/mesh/core/geode/geode_polyhedral_solid.hpp +++ b/include/geode/mesh/core/geode/geode_polyhedral_solid.hpp @@ -42,10 +42,10 @@ namespace geode class OpenGeodePolyhedralSolid : public PolyhedralSolid< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodePolyhedralSolid ); - PASSKEY( OpenGeodePolyhedralSolidBuilder< dimension >, - OGPolyhedralSolidKey /*key*/ ); public: + PASSKEY( OpenGeodePolyhedralSolidBuilder< dimension >, + OGPolyhedralSolidKey /*key*/ ); using Builder = OpenGeodePolyhedralSolidBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/geode/geode_regular_grid_solid.hpp b/include/geode/mesh/core/geode/geode_regular_grid_solid.hpp index c9dd2dd5c..c2cbab82d 100644 --- a/include/geode/mesh/core/geode/geode_regular_grid_solid.hpp +++ b/include/geode/mesh/core/geode/geode_regular_grid_solid.hpp @@ -46,9 +46,9 @@ namespace geode class opengeode_mesh_api OpenGeodeRegularGrid< 3 > : public RegularGrid< 3 > { OPENGEODE_DISABLE_COPY( OpenGeodeRegularGrid ); - PASSKEY( OpenGeodeRegularGridBuilder< 3 >, OGRegularGridKey /*key*/ ); public: + PASSKEY( OpenGeodeRegularGridBuilder< 3 >, OGRegularGridKey /*key*/ ); using Builder = OpenGeodeRegularGridBuilder< 3 >; static constexpr index_t dim{ 3 }; diff --git a/include/geode/mesh/core/geode/geode_regular_grid_surface.hpp b/include/geode/mesh/core/geode/geode_regular_grid_surface.hpp index 467f5bd3a..c99c8db2c 100644 --- a/include/geode/mesh/core/geode/geode_regular_grid_surface.hpp +++ b/include/geode/mesh/core/geode/geode_regular_grid_surface.hpp @@ -46,9 +46,9 @@ namespace geode class opengeode_mesh_api OpenGeodeRegularGrid< 2 > : public RegularGrid< 2 > { OPENGEODE_DISABLE_COPY( OpenGeodeRegularGrid ); - PASSKEY( OpenGeodeRegularGridBuilder< 2 >, OGRegularGridKey /*key*/ ); public: + PASSKEY( OpenGeodeRegularGridBuilder< 2 >, OGRegularGridKey /*key*/ ); using Builder = OpenGeodeRegularGridBuilder< 2 >; static constexpr index_t dim{ 2 }; diff --git a/include/geode/mesh/core/geode/geode_tetrahedral_solid.hpp b/include/geode/mesh/core/geode/geode_tetrahedral_solid.hpp index f59af0f21..375b38697 100644 --- a/include/geode/mesh/core/geode/geode_tetrahedral_solid.hpp +++ b/include/geode/mesh/core/geode/geode_tetrahedral_solid.hpp @@ -44,10 +44,10 @@ namespace geode class OpenGeodeTetrahedralSolid : public TetrahedralSolid< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodeTetrahedralSolid ); - PASSKEY( OpenGeodeTetrahedralSolidBuilder< dimension >, - OGTetrahedralSolidKey /*key*/ ); public: + PASSKEY( OpenGeodeTetrahedralSolidBuilder< dimension >, + OGTetrahedralSolidKey /*key*/ ); using Builder = OpenGeodeTetrahedralSolidBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/geode/geode_triangulated_surface.hpp b/include/geode/mesh/core/geode/geode_triangulated_surface.hpp index 97dc1b625..9b3f81a6b 100644 --- a/include/geode/mesh/core/geode/geode_triangulated_surface.hpp +++ b/include/geode/mesh/core/geode/geode_triangulated_surface.hpp @@ -44,10 +44,10 @@ namespace geode class OpenGeodeTriangulatedSurface : public TriangulatedSurface< dimension > { OPENGEODE_DISABLE_COPY( OpenGeodeTriangulatedSurface ); - PASSKEY( OpenGeodeTriangulatedSurfaceBuilder< dimension >, - OGTriangulatedSurfaceKey /*key*/ ); public: + PASSKEY( OpenGeodeTriangulatedSurfaceBuilder< dimension >, + OGTriangulatedSurfaceKey /*key*/ ); using Builder = OpenGeodeTriangulatedSurfaceBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/graph.hpp b/include/geode/mesh/core/graph.hpp index 2d00c9c04..b90933e78 100644 --- a/include/geode/mesh/core/graph.hpp +++ b/include/geode/mesh/core/graph.hpp @@ -107,9 +107,9 @@ namespace geode */ class opengeode_mesh_api Graph : public VertexSet { + public: PASSKEY( GraphBuilder, GraphKey /*key*/ ); - public: using Builder = GraphBuilder; Graph( BITSERY ); diff --git a/include/geode/mesh/core/grid.hpp b/include/geode/mesh/core/grid.hpp index ffef49bdc..1c53c4be6 100644 --- a/include/geode/mesh/core/grid.hpp +++ b/include/geode/mesh/core/grid.hpp @@ -52,10 +52,10 @@ namespace geode class Grid : public CellArray< dimension > { OPENGEODE_DISABLE_COPY( Grid ); - PASSKEY( GridBuilder< dimension >, GridKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( GridBuilder< dimension >, GridKey /*key*/ ); using Builder = GridBuilder< dimension >; static constexpr auto dim = dimension; using CellIndices = typename CellArray< dimension >::CellIndices; diff --git a/include/geode/mesh/core/solid_edges.hpp b/include/geode/mesh/core/solid_edges.hpp index 83e97ce23..531853cb7 100644 --- a/include/geode/mesh/core/solid_edges.hpp +++ b/include/geode/mesh/core/solid_edges.hpp @@ -49,9 +49,9 @@ namespace geode { OPENGEODE_DISABLE_COPY( SolidEdges ); OPENGEODE_TEMPLATE_ASSERT_3D( dimension ); - PASSKEY( SolidEdgesBuilder< dimension >, SolidEdgesKey /*key*/ ); public: + PASSKEY( SolidEdgesBuilder< dimension >, SolidEdgesKey /*key*/ ); using Builder = SolidEdgesBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/solid_facets.hpp b/include/geode/mesh/core/solid_facets.hpp index 7447e9334..9cc5c5bed 100644 --- a/include/geode/mesh/core/solid_facets.hpp +++ b/include/geode/mesh/core/solid_facets.hpp @@ -42,9 +42,9 @@ namespace geode { OPENGEODE_DISABLE_COPY( SolidFacets ); OPENGEODE_TEMPLATE_ASSERT_3D( dimension ); - PASSKEY( SolidFacetsBuilder< dimension >, SolidFacetsKey /*key*/ ); public: + PASSKEY( SolidFacetsBuilder< dimension >, SolidFacetsKey /*key*/ ); using Builder = SolidFacetsBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/solid_mesh.hpp b/include/geode/mesh/core/solid_mesh.hpp index e9ddfe3a3..b6e8c0c29 100644 --- a/include/geode/mesh/core/solid_mesh.hpp +++ b/include/geode/mesh/core/solid_mesh.hpp @@ -271,9 +271,9 @@ namespace geode { OPENGEODE_DISABLE_COPY( SolidMesh ); OPENGEODE_TEMPLATE_ASSERT_3D( dimension ); - PASSKEY( SolidMeshBuilder< dimension >, SolidMeshKey /*key*/ ); public: + PASSKEY( SolidMeshBuilder< dimension >, SolidMeshKey /*key*/ ); using Builder = SolidMeshBuilder< dimension >; static constexpr auto dim = dimension; using VerticesAroundVertex = absl::InlinedVector< index_t, 20 >; diff --git a/include/geode/mesh/core/surface_edges.hpp b/include/geode/mesh/core/surface_edges.hpp index a5317dce3..3f246c278 100644 --- a/include/geode/mesh/core/surface_edges.hpp +++ b/include/geode/mesh/core/surface_edges.hpp @@ -48,9 +48,9 @@ namespace geode class opengeode_mesh_api SurfaceEdges { OPENGEODE_DISABLE_COPY( SurfaceEdges ); - PASSKEY( SurfaceEdgesBuilder< dimension >, SurfaceEdgesKey /*key*/ ); public: + PASSKEY( SurfaceEdgesBuilder< dimension >, SurfaceEdgesKey /*key*/ ); using Builder = SurfaceEdgesBuilder< dimension >; static constexpr auto dim = dimension; diff --git a/include/geode/mesh/core/surface_mesh.hpp b/include/geode/mesh/core/surface_mesh.hpp index 71197c118..07dc489a1 100644 --- a/include/geode/mesh/core/surface_mesh.hpp +++ b/include/geode/mesh/core/surface_mesh.hpp @@ -164,9 +164,9 @@ namespace geode public CoordinateReferenceSystemManagers< dimension > { OPENGEODE_DISABLE_COPY( SurfaceMesh ); - PASSKEY( SurfaceMeshBuilder< dimension >, SurfaceMeshKey /*key*/ ); public: + PASSKEY( SurfaceMeshBuilder< dimension >, SurfaceMeshKey /*key*/ ); using Builder = SurfaceMeshBuilder< dimension >; static constexpr auto dim = dimension; using VerticesAroundVertex = absl::InlinedVector< index_t, 10 >; diff --git a/include/geode/mesh/core/texture_storage.hpp b/include/geode/mesh/core/texture_storage.hpp index 9d871b33e..dca915014 100644 --- a/include/geode/mesh/core/texture_storage.hpp +++ b/include/geode/mesh/core/texture_storage.hpp @@ -48,9 +48,9 @@ namespace geode class TextureStorage { friend class bitsery::Access; - PASSKEY( TextureManager< dimension >, TextureManagerKey /*key*/ ); public: + PASSKEY( TextureManager< dimension >, TextureManagerKey /*key*/ ); TextureStorage(); TextureStorage( TextureStorage&& other ) noexcept; ~TextureStorage(); diff --git a/include/geode/model/mixin/builder/blocks_builder.hpp b/include/geode/model/mixin/builder/blocks_builder.hpp index ee70a2448..7e9bbd5fb 100644 --- a/include/geode/model/mixin/builder/blocks_builder.hpp +++ b/include/geode/model/mixin/builder/blocks_builder.hpp @@ -56,8 +56,12 @@ namespace geode [[nodiscard]] std::unique_ptr< typename Mesh::Builder > block_mesh_builder( const uuid& id ) { - auto& mesh = blocks_.modifiable_block( id, {} ).modifiable_mesh( - typename Block< dimension >::BlocksBuilderKey{} ); + auto& mesh = + blocks_ + .modifiable_block( + id, typename Block< dimension >::BlocksBuilderKey{} ) + .modifiable_mesh( + typename Block< dimension >::BlocksBuilderKey{} ); return MeshBuilderFactory::create_mesh_builder< typename Mesh::Builder >( dynamic_cast< Mesh& >( mesh ) ); } diff --git a/include/geode/model/mixin/builder/surfaces_builder.hpp b/include/geode/model/mixin/builder/surfaces_builder.hpp index 3a0bf5b16..2f063fed1 100644 --- a/include/geode/model/mixin/builder/surfaces_builder.hpp +++ b/include/geode/model/mixin/builder/surfaces_builder.hpp @@ -56,8 +56,12 @@ namespace geode [[nodiscard]] std::unique_ptr< typename Mesh::Builder > surface_mesh_builder( const uuid& id ) { - auto& mesh = surfaces_.modifiable_surface( id, {} ).modifiable_mesh( - typename Surface< dimension >::SurfacesBuilderKey{} ); + auto& mesh = + surfaces_ + .modifiable_surface( id, + typename Surface< dimension >::SurfacesBuilderKey{} ) + .modifiable_mesh( + typename Surface< dimension >::SurfacesBuilderKey{} ); return MeshBuilderFactory::create_mesh_builder< typename Mesh::Builder >( dynamic_cast< Mesh& >( mesh ) ); } diff --git a/include/geode/model/mixin/builder/vertex_identifier_builder.hpp b/include/geode/model/mixin/builder/vertex_identifier_builder.hpp index 9ca87c805..9c3f6ff89 100644 --- a/include/geode/model/mixin/builder/vertex_identifier_builder.hpp +++ b/include/geode/model/mixin/builder/vertex_identifier_builder.hpp @@ -44,13 +44,15 @@ namespace geode template < typename MeshComponent > void register_mesh_component( const MeshComponent& component ) { - vertex_identifier_.register_mesh_component( component, {} ); + vertex_identifier_.register_mesh_component( + component, VertexIdentifier::BuilderKey{} ); } template < typename MeshComponent > void load_mesh_component( const MeshComponent& component ) { - vertex_identifier_.load_mesh_component( component, {} ); + vertex_identifier_.load_mesh_component( + component, VertexIdentifier::BuilderKey{} ); } /*! @@ -60,7 +62,8 @@ namespace geode template < typename MeshComponent > void unregister_mesh_component( const MeshComponent& component ) { - vertex_identifier_.unregister_mesh_component( component, {} ); + vertex_identifier_.unregister_mesh_component( + component, VertexIdentifier::BuilderKey{} ); } /*! diff --git a/include/geode/model/mixin/core/block.hpp b/include/geode/model/mixin/core/block.hpp index ad3b76c39..e7f7c491c 100644 --- a/include/geode/model/mixin/core/block.hpp +++ b/include/geode/model/mixin/core/block.hpp @@ -52,11 +52,11 @@ namespace geode { OPENGEODE_DISABLE_COPY( Block ); OPENGEODE_TEMPLATE_ASSERT_3D( dimension ); - PASSKEY( Blocks< dimension >, BlocksKey /*key*/ ); - PASSKEY( BlocksBuilder< dimension >, BlocksBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( Blocks< dimension >, BlocksKey /*key*/ ); + PASSKEY( BlocksBuilder< dimension >, BlocksBuilderKey /*key*/ ); using Mesh = SolidMesh< dimension >; Block( Block&& other ) noexcept; diff --git a/include/geode/model/mixin/core/block_collection.hpp b/include/geode/model/mixin/core/block_collection.hpp index bb1f052d8..a5ffc4892 100644 --- a/include/geode/model/mixin/core/block_collection.hpp +++ b/include/geode/model/mixin/core/block_collection.hpp @@ -44,12 +44,12 @@ namespace geode class BlockCollection : public Component< dimension > { OPENGEODE_DISABLE_COPY( BlockCollection ); - PASSKEY( BlockCollections< dimension >, BlockCollectionsKey /*key*/ ); - PASSKEY( BlockCollectionsBuilder< dimension >, - BlockCollectionsBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( BlockCollections< dimension >, BlockCollectionsKey /*key*/ ); + PASSKEY( BlockCollectionsBuilder< dimension >, + BlockCollectionsBuilderKey /*key*/ ); BlockCollection( BlockCollection&& other ) noexcept = default; ~BlockCollection() = default; diff --git a/include/geode/model/mixin/core/block_collections.hpp b/include/geode/model/mixin/core/block_collections.hpp index 7456043db..526189d73 100644 --- a/include/geode/model/mixin/core/block_collections.hpp +++ b/include/geode/model/mixin/core/block_collections.hpp @@ -42,10 +42,10 @@ namespace geode class BlockCollections { OPENGEODE_DISABLE_COPY( BlockCollections ); - PASSKEY( BlockCollectionsBuilder< dimension >, - BlockCollectionsBuilderKey /*key*/ ); public: + PASSKEY( BlockCollectionsBuilder< dimension >, + BlockCollectionsBuilderKey /*key*/ ); using Builder = BlockCollectionsBuilder< dimension >; using Type = BlockCollection< dimension >; diff --git a/include/geode/model/mixin/core/blocks.hpp b/include/geode/model/mixin/core/blocks.hpp index b4e707c99..886508908 100644 --- a/include/geode/model/mixin/core/blocks.hpp +++ b/include/geode/model/mixin/core/blocks.hpp @@ -48,9 +48,9 @@ namespace geode { OPENGEODE_DISABLE_COPY( Blocks ); OPENGEODE_TEMPLATE_ASSERT_3D( dimension ); - PASSKEY( BlocksBuilder< dimension >, BlocksBuilderKey /*key*/ ); public: + PASSKEY( BlocksBuilder< dimension >, BlocksBuilderKey /*key*/ ); using Builder = BlocksBuilder< dimension >; using Type = Block< dimension >; diff --git a/include/geode/model/mixin/core/component_registry.hpp b/include/geode/model/mixin/core/component_registry.hpp index e52892f51..aace9b8c8 100644 --- a/include/geode/model/mixin/core/component_registry.hpp +++ b/include/geode/model/mixin/core/component_registry.hpp @@ -43,9 +43,8 @@ namespace geode { class opengeode_model_api ComponentRegistry { - PASSKEY( ComponentRegistryBuilder, RegistryBuilder ); - public: + PASSKEY( ComponentRegistryBuilder, RegistryBuilder ); using Registry = absl::flat_hash_map< ComponentType, std::vector< uuid > >; diff --git a/include/geode/model/mixin/core/corner.hpp b/include/geode/model/mixin/core/corner.hpp index 4433e1b8e..717cac1fd 100644 --- a/include/geode/model/mixin/core/corner.hpp +++ b/include/geode/model/mixin/core/corner.hpp @@ -52,11 +52,11 @@ namespace geode class Corner final : public Component< dimension > { OPENGEODE_DISABLE_COPY( Corner ); - PASSKEY( Corners< dimension >, CornersKey /*key*/ ); - PASSKEY( CornersBuilder< dimension >, CornersBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( Corners< dimension >, CornersKey /*key*/ ); + PASSKEY( CornersBuilder< dimension >, CornersBuilderKey /*key*/ ); using Mesh = PointSet< dimension >; Corner( Corner&& other ) noexcept; diff --git a/include/geode/model/mixin/core/corner_collection.hpp b/include/geode/model/mixin/core/corner_collection.hpp index 4295c02e8..76427dd71 100644 --- a/include/geode/model/mixin/core/corner_collection.hpp +++ b/include/geode/model/mixin/core/corner_collection.hpp @@ -44,12 +44,12 @@ namespace geode class CornerCollection : public Component< dimension > { OPENGEODE_DISABLE_COPY( CornerCollection ); - PASSKEY( CornerCollections< dimension >, CornerCollectionsKey /*key*/ ); - PASSKEY( CornerCollectionsBuilder< dimension >, - CornerCollectionsBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( CornerCollections< dimension >, CornerCollectionsKey /*key*/ ); + PASSKEY( CornerCollectionsBuilder< dimension >, + CornerCollectionsBuilderKey /*key*/ ); CornerCollection( CornerCollection&& other ) noexcept = default; ~CornerCollection() = default; diff --git a/include/geode/model/mixin/core/corner_collections.hpp b/include/geode/model/mixin/core/corner_collections.hpp index 9792cacb5..4f3b4710b 100644 --- a/include/geode/model/mixin/core/corner_collections.hpp +++ b/include/geode/model/mixin/core/corner_collections.hpp @@ -44,10 +44,10 @@ namespace geode class CornerCollections { OPENGEODE_DISABLE_COPY( CornerCollections ); - PASSKEY( CornerCollectionsBuilder< dimension >, - CornerCollectionsBuilderKey /*key*/ ); public: + PASSKEY( CornerCollectionsBuilder< dimension >, + CornerCollectionsBuilderKey /*key*/ ); using Builder = CornerCollectionsBuilder< dimension >; using Type = CornerCollection< dimension >; diff --git a/include/geode/model/mixin/core/corners.hpp b/include/geode/model/mixin/core/corners.hpp index 60a6f7e5b..8cc95b4d7 100644 --- a/include/geode/model/mixin/core/corners.hpp +++ b/include/geode/model/mixin/core/corners.hpp @@ -47,9 +47,9 @@ namespace geode class opengeode_model_api Corners { OPENGEODE_DISABLE_COPY( Corners ); - PASSKEY( CornersBuilder< dimension >, CornersBuilderKey /*key*/ ); public: + PASSKEY( CornersBuilder< dimension >, CornersBuilderKey /*key*/ ); using Builder = CornersBuilder< dimension >; using Type = Corner< dimension >; diff --git a/include/geode/model/mixin/core/line.hpp b/include/geode/model/mixin/core/line.hpp index 036626dcb..0bdd5c91c 100644 --- a/include/geode/model/mixin/core/line.hpp +++ b/include/geode/model/mixin/core/line.hpp @@ -51,11 +51,11 @@ namespace geode class Line final : public Component< dimension > { OPENGEODE_DISABLE_COPY( Line ); - PASSKEY( Lines< dimension >, LinesKey /*key*/ ); - PASSKEY( LinesBuilder< dimension >, LinesBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( Lines< dimension >, LinesKey /*key*/ ); + PASSKEY( LinesBuilder< dimension >, LinesBuilderKey /*key*/ ); using Mesh = EdgedCurve< dimension >; Line( Line&& other ) noexcept; diff --git a/include/geode/model/mixin/core/line_collection.hpp b/include/geode/model/mixin/core/line_collection.hpp index 2c614ccc3..edc0e7f75 100644 --- a/include/geode/model/mixin/core/line_collection.hpp +++ b/include/geode/model/mixin/core/line_collection.hpp @@ -44,12 +44,12 @@ namespace geode class LineCollection : public Component< dimension > { OPENGEODE_DISABLE_COPY( LineCollection ); - PASSKEY( LineCollections< dimension >, LineCollectionsKey /*key*/ ); - PASSKEY( LineCollectionsBuilder< dimension >, - LineCollectionsBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( LineCollections< dimension >, LineCollectionsKey /*key*/ ); + PASSKEY( LineCollectionsBuilder< dimension >, + LineCollectionsBuilderKey /*key*/ ); LineCollection( LineCollection&& other ) noexcept = default; ~LineCollection() = default; diff --git a/include/geode/model/mixin/core/line_collections.hpp b/include/geode/model/mixin/core/line_collections.hpp index dea12d6df..0016fd1eb 100644 --- a/include/geode/model/mixin/core/line_collections.hpp +++ b/include/geode/model/mixin/core/line_collections.hpp @@ -44,10 +44,10 @@ namespace geode class LineCollections { OPENGEODE_DISABLE_COPY( LineCollections ); - PASSKEY( LineCollectionsBuilder< dimension >, - LineCollectionsBuilderKey /*key*/ ); public: + PASSKEY( LineCollectionsBuilder< dimension >, + LineCollectionsBuilderKey /*key*/ ); using Builder = LineCollectionsBuilder< dimension >; using Type = LineCollection< dimension >; diff --git a/include/geode/model/mixin/core/lines.hpp b/include/geode/model/mixin/core/lines.hpp index ba10e27a4..2addfc2c8 100644 --- a/include/geode/model/mixin/core/lines.hpp +++ b/include/geode/model/mixin/core/lines.hpp @@ -44,9 +44,9 @@ namespace geode class opengeode_model_api Lines { OPENGEODE_DISABLE_COPY( Lines ); - PASSKEY( LinesBuilder< dimension >, LinesBuilderKey /*key*/ ); public: + PASSKEY( LinesBuilder< dimension >, LinesBuilderKey /*key*/ ); using Builder = LinesBuilder< dimension >; using Type = Line< dimension >; diff --git a/include/geode/model/mixin/core/model_boundaries.hpp b/include/geode/model/mixin/core/model_boundaries.hpp index e9a2663ab..53f6b96aa 100644 --- a/include/geode/model/mixin/core/model_boundaries.hpp +++ b/include/geode/model/mixin/core/model_boundaries.hpp @@ -44,10 +44,10 @@ namespace geode class ModelBoundaries { OPENGEODE_DISABLE_COPY( ModelBoundaries ); - PASSKEY( ModelBoundariesBuilder< dimension >, - ModelBoundariesBuilderKey /*key*/ ); public: + PASSKEY( ModelBoundariesBuilder< dimension >, + ModelBoundariesBuilderKey /*key*/ ); using Builder = ModelBoundariesBuilder< dimension >; using Type = ModelBoundary< dimension >; diff --git a/include/geode/model/mixin/core/model_boundary.hpp b/include/geode/model/mixin/core/model_boundary.hpp index f1b0a32c6..86a7ee42c 100644 --- a/include/geode/model/mixin/core/model_boundary.hpp +++ b/include/geode/model/mixin/core/model_boundary.hpp @@ -44,12 +44,12 @@ namespace geode class ModelBoundary : public Component< dimension > { OPENGEODE_DISABLE_COPY( ModelBoundary ); - PASSKEY( ModelBoundaries< dimension >, ModelBoundariesKey /*key*/ ); - PASSKEY( ModelBoundariesBuilder< dimension >, - ModelBoundariesBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( ModelBoundaries< dimension >, ModelBoundariesKey /*key*/ ); + PASSKEY( ModelBoundariesBuilder< dimension >, + ModelBoundariesBuilderKey /*key*/ ); ModelBoundary( ModelBoundary&& other ) noexcept = default; ~ModelBoundary() = default; diff --git a/include/geode/model/mixin/core/relationships.hpp b/include/geode/model/mixin/core/relationships.hpp index f968c4f14..64a9b1b44 100644 --- a/include/geode/model/mixin/core/relationships.hpp +++ b/include/geode/model/mixin/core/relationships.hpp @@ -51,6 +51,7 @@ namespace geode */ class opengeode_model_api Relationships { + public: PASSKEY( RelationshipsBuilder, RelationshipsBuilderKey /*key*/ ); public: diff --git a/include/geode/model/mixin/core/surface.hpp b/include/geode/model/mixin/core/surface.hpp index 39af02aa4..1099629c0 100644 --- a/include/geode/model/mixin/core/surface.hpp +++ b/include/geode/model/mixin/core/surface.hpp @@ -51,11 +51,11 @@ namespace geode class Surface final : public Component< dimension > { OPENGEODE_DISABLE_COPY( Surface ); - PASSKEY( Surfaces< dimension >, SurfacesKey /*key*/ ); - PASSKEY( SurfacesBuilder< dimension >, SurfacesBuilderKey /*key*/ ); friend class bitsery::Access; public: + PASSKEY( Surfaces< dimension >, SurfacesKey /*key*/ ); + PASSKEY( SurfacesBuilder< dimension >, SurfacesBuilderKey /*key*/ ); using Mesh = SurfaceMesh< dimension >; Surface( Surface&& other ) noexcept; diff --git a/include/geode/model/mixin/core/surface_collection.hpp b/include/geode/model/mixin/core/surface_collection.hpp index 5f9341cc1..47f79eba0 100644 --- a/include/geode/model/mixin/core/surface_collection.hpp +++ b/include/geode/model/mixin/core/surface_collection.hpp @@ -44,13 +44,13 @@ namespace geode class SurfaceCollection : public Component< dimension > { OPENGEODE_DISABLE_COPY( SurfaceCollection ); + friend class bitsery::Access; + + public: PASSKEY( SurfaceCollections< dimension >, SurfaceCollectionsKey /*key*/ ); PASSKEY( SurfaceCollectionsBuilder< dimension >, SurfaceCollectionsBuilderKey /*key*/ ); - friend class bitsery::Access; - - public: SurfaceCollection( SurfaceCollection&& other ) noexcept = default; ~SurfaceCollection() = default; diff --git a/include/geode/model/mixin/core/surface_collections.hpp b/include/geode/model/mixin/core/surface_collections.hpp index 98c6b885e..e7e438915 100644 --- a/include/geode/model/mixin/core/surface_collections.hpp +++ b/include/geode/model/mixin/core/surface_collections.hpp @@ -44,10 +44,10 @@ namespace geode class SurfaceCollections { OPENGEODE_DISABLE_COPY( SurfaceCollections ); - PASSKEY( SurfaceCollectionsBuilder< dimension >, - SurfaceCollectionsBuilderKey /*key*/ ); public: + PASSKEY( SurfaceCollectionsBuilder< dimension >, + SurfaceCollectionsBuilderKey /*key*/ ); using Builder = SurfaceCollectionsBuilder< dimension >; using Type = SurfaceCollection< dimension >; diff --git a/include/geode/model/mixin/core/surfaces.hpp b/include/geode/model/mixin/core/surfaces.hpp index 53cc028d8..985754b7e 100644 --- a/include/geode/model/mixin/core/surfaces.hpp +++ b/include/geode/model/mixin/core/surfaces.hpp @@ -44,9 +44,9 @@ namespace geode class opengeode_model_api Surfaces { OPENGEODE_DISABLE_COPY( Surfaces ); - PASSKEY( SurfacesBuilder< dimension >, SurfacesBuilderKey /*key*/ ); public: + PASSKEY( SurfacesBuilder< dimension >, SurfacesBuilderKey /*key*/ ); using Builder = SurfacesBuilder< dimension >; using Type = Surface< dimension >; diff --git a/include/geode/model/mixin/core/vertex_identifier.hpp b/include/geode/model/mixin/core/vertex_identifier.hpp index df64563ee..ee6e2cc99 100644 --- a/include/geode/model/mixin/core/vertex_identifier.hpp +++ b/include/geode/model/mixin/core/vertex_identifier.hpp @@ -90,9 +90,8 @@ namespace geode */ class opengeode_model_api VertexIdentifier { - PASSKEY( VertexIdentifierBuilder, BuilderKey /*key*/ ); - public: + PASSKEY( VertexIdentifierBuilder, BuilderKey /*key*/ ); VertexIdentifier(); VertexIdentifier( BITSERY ); ~VertexIdentifier(); diff --git a/src/geode/basic/attribute_manager.cpp b/src/geode/basic/attribute_manager.cpp index 6f4c5de27..f6f607ede 100644 --- a/src/geode/basic/attribute_manager.cpp +++ b/src/geode/basic/attribute_manager.cpp @@ -457,17 +457,18 @@ namespace geode std::shared_ptr< AttributeBase > attribute, const geode::uuid &attribute_id ) { - return impl_->register_attribute( attribute, attribute_id, {} ); + return impl_->register_attribute( + attribute, attribute_id, AttributeBase::AttributeKey{} ); } void AttributeManager::resize( index_t size ) { - impl_->resize( size, {} ); + impl_->resize( size, AttributeBase::AttributeKey{} ); } void AttributeManager::reserve( index_t capacity ) { - impl_->reserve( capacity, {} ); + impl_->reserve( capacity, AttributeBase::AttributeKey{} ); } bool AttributeManager::has_assignable_attributes() const @@ -483,19 +484,22 @@ namespace geode void AttributeManager::assign_attribute_value( index_t from_element, index_t to_element ) { - impl_->assign_attribute_value( from_element, to_element, {} ); + impl_->assign_attribute_value( + from_element, to_element, AttributeBase::AttributeKey{} ); } void AttributeManager::copy_attribute_value( index_t from_element, index_t to_element ) { - impl_->copy_attribute_value( from_element, to_element, {} ); + impl_->copy_attribute_value( + from_element, to_element, AttributeBase::AttributeKey{} ); } void AttributeManager::interpolate_attribute_value( const AttributeLinearInterpolation &interpolation, index_t to_element ) { - impl_->interpolate_attribute_value( interpolation, to_element, {} ); + impl_->interpolate_attribute_value( + interpolation, to_element, AttributeBase::AttributeKey{} ); } absl::FixedArray< geode::uuid > AttributeManager::attribute_ids() const @@ -527,7 +531,7 @@ namespace geode void AttributeManager::clear_attributes() { - impl_->clear_attributes( {} ); + impl_->clear_attributes( AttributeBase::AttributeKey{} ); } void AttributeManager::delete_elements( @@ -539,14 +543,14 @@ namespace geode to_delete.size() == nb_elements(), "[AttributeManager::delete_elements] Vector to_delete should " "have the same size as the number of elements" ); - impl_->delete_elements( to_delete, {} ); + impl_->delete_elements( to_delete, AttributeBase::AttributeKey{} ); } } void AttributeManager::permute_elements( absl::Span< const index_t > permutation ) { - impl_->permute_elements( permutation, {} ); + impl_->permute_elements( permutation, AttributeBase::AttributeKey{} ); } index_t AttributeManager::nb_elements() const @@ -556,7 +560,7 @@ namespace geode void AttributeManager::copy( const AttributeManager &attribute_manager ) { - impl_->copy( *attribute_manager.impl_, {} ); + impl_->copy( *attribute_manager.impl_, AttributeBase::AttributeKey{} ); } std::optional< std::vector< geode::uuid > > @@ -569,28 +573,31 @@ namespace geode void AttributeManager::import( const AttributeManager &attribute_manager, absl::Span< const index_t > old2new ) { - impl_->import( *attribute_manager.impl_, old2new, {} ); + impl_->import( + *attribute_manager.impl_, old2new, AttributeBase::AttributeKey{} ); } void AttributeManager::import( const AttributeManager &attribute_manager, absl::Span< const index_t > old2new, const geode::uuid &attribute_id ) { - impl_->import( *attribute_manager.impl_, old2new, attribute_id, {} ); + impl_->import( *attribute_manager.impl_, old2new, attribute_id, + AttributeBase::AttributeKey{} ); } void AttributeManager::import( const AttributeManager &attribute_manager, const GenericMapping< index_t > &old2new_mapping ) { - impl_->import( *attribute_manager.impl_, old2new_mapping, {} ); + impl_->import( *attribute_manager.impl_, old2new_mapping, + AttributeBase::AttributeKey{} ); } void AttributeManager::import( const AttributeManager &attribute_manager, const GenericMapping< index_t > &old2new_mapping, const geode::uuid &attribute_id ) { - impl_->import( - *attribute_manager.impl_, old2new_mapping, attribute_id, {} ); + impl_->import( *attribute_manager.impl_, old2new_mapping, attribute_id, + AttributeBase::AttributeKey{} ); } void AttributeManager::set_attribute_properties( diff --git a/src/geode/basic/identifier_builder.cpp b/src/geode/basic/identifier_builder.cpp index db5abd5b1..ced7ee485 100644 --- a/src/geode/basic/identifier_builder.cpp +++ b/src/geode/basic/identifier_builder.cpp @@ -35,22 +35,22 @@ namespace geode void IdentifierBuilder::set_id( const uuid& unique_id ) { - identifier_.set_id( unique_id, {} ); + identifier_.set_id( unique_id, Identifier::IdentifierKey{} ); } void IdentifierBuilder::set_name( std::string_view name ) { - identifier_.set_name( name, {} ); + identifier_.set_name( name, Identifier::IdentifierKey{} ); } void IdentifierBuilder::copy_identifier( const Identifier& other ) { - identifier_.copy_identifier( other, {} ); + identifier_.copy_identifier( other, Identifier::IdentifierKey{} ); } void IdentifierBuilder::load_identifier( std::string_view directory ) { - identifier_.load_identifier( directory, {} ); + identifier_.load_identifier( directory, Identifier::IdentifierKey{} ); } } // namespace geode diff --git a/src/geode/mesh/builder/coordinate_reference_system_manager_builder.cpp b/src/geode/mesh/builder/coordinate_reference_system_manager_builder.cpp index 97daa23b9..2120e6f13 100644 --- a/src/geode/mesh/builder/coordinate_reference_system_manager_builder.cpp +++ b/src/geode/mesh/builder/coordinate_reference_system_manager_builder.cpp @@ -32,22 +32,28 @@ namespace geode register_coordinate_reference_system( std::string_view name, std::shared_ptr< CoordinateReferenceSystem< dimension > >&& crs ) { - crs_manager_.register_coordinate_reference_system( - name, std::move( crs ), {} ); + crs_manager_.register_coordinate_reference_system( name, + std::move( crs ), + typename CoordinateReferenceSystemManager< + dimension >::CRSManagerKey{} ); } template < index_t dimension > void CoordinateReferenceSystemManagerBuilder< dimension >::delete_coordinate_reference_system( std::string_view name ) { - crs_manager_.delete_coordinate_reference_system( name, {} ); + crs_manager_.delete_coordinate_reference_system( + name, typename CoordinateReferenceSystemManager< + dimension >::CRSManagerKey{} ); } template < index_t dimension > void CoordinateReferenceSystemManagerBuilder< dimension >:: set_active_coordinate_reference_system( std::string_view name ) { - crs_manager_.set_active_coordinate_reference_system( name, {} ); + crs_manager_.set_active_coordinate_reference_system( + name, typename CoordinateReferenceSystemManager< + dimension >::CRSManagerKey{} ); } template < index_t dimension > @@ -55,7 +61,9 @@ namespace geode CoordinateReferenceSystemManagerBuilder< dimension >::active_coordinate_reference_system() { - return crs_manager_.modifiable_active_coordinate_reference_system( {} ); + return crs_manager_.modifiable_active_coordinate_reference_system( + typename CoordinateReferenceSystemManager< + dimension >::CRSManagerKey{} ); } template < index_t dimension > @@ -63,7 +71,9 @@ namespace geode CoordinateReferenceSystemManagerBuilder< dimension >::coordinate_reference_system( std::string_view name ) { - return crs_manager_.modifiable_coordinate_reference_system( name, {} ); + return crs_manager_.modifiable_coordinate_reference_system( + name, typename CoordinateReferenceSystemManager< + dimension >::CRSManagerKey{} ); } template class opengeode_mesh_api diff --git a/src/geode/mesh/builder/coordinate_reference_system_managers_builder.cpp b/src/geode/mesh/builder/coordinate_reference_system_managers_builder.cpp index 6e219465e..58259b04d 100644 --- a/src/geode/mesh/builder/coordinate_reference_system_managers_builder.cpp +++ b/src/geode/mesh/builder/coordinate_reference_system_managers_builder.cpp @@ -36,7 +36,9 @@ namespace geode dimension >::coordinate_reference_system_manager_builder1D() { return CoordinateReferenceSystemManagerBuilder1D{ - crs_managers_.coordinate_reference_system_manager1D( {} ) + crs_managers_.coordinate_reference_system_manager1D( + typename CoordinateReferenceSystemManagers< + dimension >::CRSManagersKey{} ) }; } @@ -46,7 +48,9 @@ namespace geode dimension >::coordinate_reference_system_manager_builder2D() { return CoordinateReferenceSystemManagerBuilder2D{ - crs_managers_.coordinate_reference_system_manager2D( {} ) + crs_managers_.coordinate_reference_system_manager2D( + typename CoordinateReferenceSystemManagers< + dimension >::CRSManagersKey{} ) }; } @@ -56,7 +60,9 @@ namespace geode dimension >::coordinate_reference_system_manager_builder3D() { return CoordinateReferenceSystemManagerBuilder3D{ - crs_managers_.coordinate_reference_system_manager3D( {} ) + crs_managers_.coordinate_reference_system_manager3D( + typename CoordinateReferenceSystemManagers< + dimension >::CRSManagersKey{} ) }; } @@ -66,7 +72,9 @@ namespace geode dimension >::main_coordinate_reference_system_manager_builder() { return CoordinateReferenceSystemManagerBuilder< dimension >{ - crs_managers_.main_coordinate_reference_system_manager( {} ) + crs_managers_.main_coordinate_reference_system_manager( + typename CoordinateReferenceSystemManagers< + dimension >::CRSManagersKey{} ) }; } @@ -74,7 +82,9 @@ namespace geode void CoordinateReferenceSystemManagersBuilder< dimension >::set_point( index_t vertex, Point< dimension > point ) { - crs_managers_.set_point( vertex, std::move( point ), {} ); + crs_managers_.set_point( vertex, std::move( point ), + typename CoordinateReferenceSystemManagers< + dimension >::CRSManagersKey{} ); } template class opengeode_mesh_api diff --git a/src/geode/mesh/builder/geode/geode_edged_curve_builder.cpp b/src/geode/mesh/builder/geode/geode_edged_curve_builder.cpp index fa7fc4c86..b8cfebad0 100644 --- a/src/geode/mesh/builder/geode/geode_edged_curve_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_edged_curve_builder.cpp @@ -82,7 +82,8 @@ namespace geode void OpenGeodeEdgedCurveBuilder< dimension >::do_set_edge_vertex( const EdgeVertex& edge_vertex, index_t vertex_id ) { - geode_edged_curve_.set_edge_vertex( edge_vertex, vertex_id, {} ); + geode_edged_curve_.set_edge_vertex( edge_vertex, vertex_id, + typename OpenGeodeEdgedCurve< dimension >::OGEdgedCurveKey() ); } template < index_t dimension > diff --git a/src/geode/mesh/builder/geode/geode_graph_builder.cpp b/src/geode/mesh/builder/geode/geode_graph_builder.cpp index a041282ff..7607a6db1 100644 --- a/src/geode/mesh/builder/geode/geode_graph_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_graph_builder.cpp @@ -69,7 +69,8 @@ namespace geode void OpenGeodeGraphBuilder::do_set_edge_vertex( const EdgeVertex& edge_vertex, index_t vertex_id ) { - geode_graph_.set_edge_vertex( edge_vertex, vertex_id, {} ); + geode_graph_.set_edge_vertex( + edge_vertex, vertex_id, OpenGeodeGraph::OGGraphKey() ); } void OpenGeodeGraphBuilder::do_create_edge() diff --git a/src/geode/mesh/builder/geode/geode_hybrid_solid_builder.cpp b/src/geode/mesh/builder/geode/geode_hybrid_solid_builder.cpp index 783064ce1..be9c02e2e 100644 --- a/src/geode/mesh/builder/geode/geode_hybrid_solid_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_hybrid_solid_builder.cpp @@ -82,52 +82,57 @@ namespace geode void OpenGeodeHybridSolidBuilder< dimension >::do_set_polyhedron_vertex( const PolyhedronVertex& polyhedron_vertex, index_t vertex_id ) { - geode_hybrid_solid_.set_polyhedron_vertex( - polyhedron_vertex, vertex_id, {} ); + geode_hybrid_solid_.set_polyhedron_vertex( polyhedron_vertex, vertex_id, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > void OpenGeodeHybridSolidBuilder< dimension >::do_create_tetrahedron( const std::array< index_t, 4 >& vertices ) { - geode_hybrid_solid_.add_tetrahedron( vertices, {} ); + geode_hybrid_solid_.add_tetrahedron( vertices, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > void OpenGeodeHybridSolidBuilder< dimension >::do_create_hexahedron( const std::array< index_t, 8 >& vertices ) { - geode_hybrid_solid_.add_hexahedron( vertices, {} ); + geode_hybrid_solid_.add_hexahedron( vertices, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > void OpenGeodeHybridSolidBuilder< dimension >::do_create_prism( const std::array< index_t, 6 >& vertices ) { - geode_hybrid_solid_.add_prism( vertices, {} ); + geode_hybrid_solid_.add_prism( vertices, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > void OpenGeodeHybridSolidBuilder< dimension >::do_create_pyramid( const std::array< index_t, 5 >& vertices ) { - geode_hybrid_solid_.add_pyramid( vertices, {} ); + geode_hybrid_solid_.add_pyramid( vertices, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > void OpenGeodeHybridSolidBuilder< dimension >::do_set_polyhedron_adjacent( const PolyhedronFacet& polyhedron_facet, index_t adjacent_id ) { - geode_hybrid_solid_.set_polyhedron_adjacent( - polyhedron_facet, adjacent_id, {} ); + geode_hybrid_solid_.set_polyhedron_adjacent( polyhedron_facet, + adjacent_id, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > void OpenGeodeHybridSolidBuilder< dimension >::do_unset_polyhedron_adjacent( const PolyhedronFacet& polyhedron_facet ) { - geode_hybrid_solid_.set_polyhedron_adjacent( - polyhedron_facet, NO_ID, {} ); + geode_hybrid_solid_.set_polyhedron_adjacent( polyhedron_facet, NO_ID, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > @@ -135,7 +140,8 @@ namespace geode const std::vector< bool >& to_delete, absl::Span< const index_t > /*unused*/ ) { - geode_hybrid_solid_.remove_polyhedra( to_delete, {} ); + geode_hybrid_solid_.remove_polyhedra( to_delete, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > @@ -143,7 +149,8 @@ namespace geode absl::Span< const index_t > permutation, absl::Span< const index_t > /*unused*/ ) { - geode_hybrid_solid_.permute_polyhedra( permutation, {} ); + geode_hybrid_solid_.permute_polyhedra( permutation, + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template < index_t dimension > @@ -160,7 +167,7 @@ namespace geode geode_hybrid_solid_.copy_polyhedra( dynamic_cast< const OpenGeodeHybridSolid< dimension >& >( solid_mesh ), - {} ); + typename OpenGeodeHybridSolid< dimension >::OGHybridSolidKey() ); } template class opengeode_mesh_api OpenGeodeHybridSolidBuilder< 3 >; diff --git a/src/geode/mesh/builder/geode/geode_polygonal_surface_builder.cpp b/src/geode/mesh/builder/geode/geode_polygonal_surface_builder.cpp index fcb985e1e..d46a0f0c9 100644 --- a/src/geode/mesh/builder/geode/geode_polygonal_surface_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_polygonal_surface_builder.cpp @@ -87,31 +87,37 @@ namespace geode void OpenGeodePolygonalSurfaceBuilder< dimension >::do_set_polygon_vertex( const PolygonVertex& polygon_vertex, index_t vertex_id ) { - geode_polygonal_surface_.set_polygon_vertex( - polygon_vertex, vertex_id, {} ); + geode_polygonal_surface_.set_polygon_vertex( polygon_vertex, vertex_id, + typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template < index_t dimension > void OpenGeodePolygonalSurfaceBuilder< dimension >::do_create_polygon( absl::Span< const index_t > vertices ) { - geode_polygonal_surface_.add_polygon( vertices, {} ); + geode_polygonal_surface_.add_polygon( + vertices, typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template < index_t dimension > void OpenGeodePolygonalSurfaceBuilder< dimension >::do_set_polygon_adjacent( const PolygonEdge& polygon_edge, index_t adjacent_id ) { - geode_polygonal_surface_.set_polygon_adjacent( - polygon_edge, adjacent_id, {} ); + geode_polygonal_surface_.set_polygon_adjacent( polygon_edge, + adjacent_id, + typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template < index_t dimension > void OpenGeodePolygonalSurfaceBuilder< dimension >:: do_unset_polygon_adjacent( const PolygonEdge& polygon_edge ) { - geode_polygonal_surface_.set_polygon_adjacent( - polygon_edge, NO_ID, {} ); + geode_polygonal_surface_.set_polygon_adjacent( polygon_edge, NO_ID, + typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template < index_t dimension > @@ -119,7 +125,9 @@ namespace geode const std::vector< bool >& to_delete, absl::Span< const index_t > /*unused*/ ) { - geode_polygonal_surface_.remove_polygons( to_delete, {} ); + geode_polygonal_surface_.remove_polygons( + to_delete, typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template < index_t dimension > @@ -127,7 +135,9 @@ namespace geode absl::Span< const index_t > permutation, absl::Span< const index_t > /*unused*/ ) { - geode_polygonal_surface_.permute_polygons( permutation, {} ); + geode_polygonal_surface_.permute_polygons( + permutation, typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template < index_t dimension > @@ -144,7 +154,8 @@ namespace geode geode_polygonal_surface_.copy_polygons( dynamic_cast< const OpenGeodePolygonalSurface< dimension >& >( surface_mesh ), - {} ); + typename OpenGeodePolygonalSurface< + dimension >::OGPolygonalSurfaceKey{} ); } template class opengeode_mesh_api OpenGeodePolygonalSurfaceBuilder< 2 >; diff --git a/src/geode/mesh/builder/geode/geode_polyhedral_solid_builder.cpp b/src/geode/mesh/builder/geode/geode_polyhedral_solid_builder.cpp index bd9c27d17..d59d8013f 100644 --- a/src/geode/mesh/builder/geode/geode_polyhedral_solid_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_polyhedral_solid_builder.cpp @@ -88,8 +88,10 @@ namespace geode void OpenGeodePolyhedralSolidBuilder< dimension >::do_set_polyhedron_vertex( const PolyhedronVertex& polyhedron_vertex, index_t vertex_id ) { - geode_polyhedral_solid_.set_polyhedron_vertex( - polyhedron_vertex, vertex_id, {} ); + geode_polyhedral_solid_.set_polyhedron_vertex( polyhedron_vertex, + vertex_id, + typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template < index_t dimension > @@ -97,7 +99,9 @@ namespace geode absl::Span< const index_t > vertices, absl::Span< const std::vector< local_index_t > > facets ) { - geode_polyhedral_solid_.add_polyhedron( vertices, facets, {} ); + geode_polyhedral_solid_.add_polyhedron( vertices, facets, + typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template < index_t dimension > @@ -105,16 +109,20 @@ namespace geode do_set_polyhedron_adjacent( const PolyhedronFacet& polyhedron_facet, index_t adjacent_id ) { - geode_polyhedral_solid_.set_polyhedron_adjacent( - polyhedron_facet, adjacent_id, {} ); + geode_polyhedral_solid_.set_polyhedron_adjacent( polyhedron_facet, + adjacent_id, + typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template < index_t dimension > void OpenGeodePolyhedralSolidBuilder< dimension >:: do_unset_polyhedron_adjacent( const PolyhedronFacet& polyhedron_facet ) { - geode_polyhedral_solid_.set_polyhedron_adjacent( - polyhedron_facet, NO_ID, {} ); + geode_polyhedral_solid_.set_polyhedron_adjacent( polyhedron_facet, + NO_ID, + typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template < index_t dimension > @@ -122,7 +130,9 @@ namespace geode const std::vector< bool >& to_delete, absl::Span< const index_t > /*unused*/ ) { - geode_polyhedral_solid_.remove_polyhedra( to_delete, {} ); + geode_polyhedral_solid_.remove_polyhedra( + to_delete, typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template < index_t dimension > @@ -130,7 +140,9 @@ namespace geode absl::Span< const index_t > permutation, absl::Span< const index_t > /*unused*/ ) { - geode_polyhedral_solid_.permute_polyhedra( permutation, {} ); + geode_polyhedral_solid_.permute_polyhedra( + permutation, typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template < index_t dimension > @@ -147,7 +159,8 @@ namespace geode geode_polyhedral_solid_.copy_polyhedra( dynamic_cast< const OpenGeodePolyhedralSolid< dimension >& >( solid_mesh ), - {} ); + typename OpenGeodePolyhedralSolid< + dimension >::OGPolyhedralSolidKey() ); } template class opengeode_mesh_api OpenGeodePolyhedralSolidBuilder< 3 >; diff --git a/src/geode/mesh/builder/geode/geode_regular_grid_solid_builder.cpp b/src/geode/mesh/builder/geode/geode_regular_grid_solid_builder.cpp index 9c38afcb1..0e29d4b7e 100644 --- a/src/geode/mesh/builder/geode/geode_regular_grid_solid_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_regular_grid_solid_builder.cpp @@ -49,7 +49,8 @@ namespace geode void OpenGeodeRegularGridBuilder< 3 >::update_origin( const Point3D& origin ) { - geode_regular_grid_.update_origin( origin, {} ); + geode_regular_grid_.update_origin( + origin, OpenGeodeRegularGrid< 3 >::OGRegularGridKey{} ); this->set_grid_origin( origin ); } @@ -57,7 +58,7 @@ namespace geode Point3D origin, std::array< Vector3D, 3 > directions ) { geode_regular_grid_.update_origin_and_directions( - origin, directions, {} ); + origin, directions, OpenGeodeRegularGrid< 3 >::OGRegularGridKey{} ); this->set_grid_origin( std::move( origin ) ); this->set_grid_directions( std::move( directions ) ); } diff --git a/src/geode/mesh/builder/geode/geode_regular_grid_surface_builder.cpp b/src/geode/mesh/builder/geode/geode_regular_grid_surface_builder.cpp index 899377a95..b5348b8cb 100644 --- a/src/geode/mesh/builder/geode/geode_regular_grid_surface_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_regular_grid_surface_builder.cpp @@ -49,7 +49,8 @@ namespace geode void OpenGeodeRegularGridBuilder< 2 >::update_origin( const Point2D& origin ) { - geode_regular_grid_.update_origin( origin, {} ); + geode_regular_grid_.update_origin( + origin, OpenGeodeRegularGrid< 2 >::OGRegularGridKey{} ); this->set_grid_origin( origin ); } @@ -57,7 +58,7 @@ namespace geode Point2D origin, std::array< Vector2D, 2 > directions ) { geode_regular_grid_.update_origin_and_directions( - origin, directions, {} ); + origin, directions, OpenGeodeRegularGrid< 2 >::OGRegularGridKey{} ); this->set_grid_origin( std::move( origin ) ); this->set_grid_directions( std::move( directions ) ); } diff --git a/src/geode/mesh/builder/geode/geode_tetrahedral_solid_builder.cpp b/src/geode/mesh/builder/geode/geode_tetrahedral_solid_builder.cpp index 34c7fa4b8..dbf65b73e 100644 --- a/src/geode/mesh/builder/geode/geode_tetrahedral_solid_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_tetrahedral_solid_builder.cpp @@ -89,15 +89,19 @@ namespace geode OpenGeodeTetrahedralSolidBuilder< dimension >::do_set_polyhedron_vertex( const PolyhedronVertex& polyhedron_vertex, index_t vertex_id ) { - geode_tetrahedral_solid_.set_polyhedron_vertex( - polyhedron_vertex, vertex_id, {} ); + geode_tetrahedral_solid_.set_polyhedron_vertex( polyhedron_vertex, + vertex_id, + typename OpenGeodeTetrahedralSolid< + dimension >::OGTetrahedralSolidKey() ); } template < index_t dimension > void OpenGeodeTetrahedralSolidBuilder< dimension >::do_create_tetrahedron( const std::array< index_t, 4 >& vertices ) { - geode_tetrahedral_solid_.add_tetrahedron( vertices, {} ); + geode_tetrahedral_solid_.add_tetrahedron( + vertices, typename OpenGeodeTetrahedralSolid< + dimension >::OGTetrahedralSolidKey() ); } template < index_t dimension > @@ -112,16 +116,20 @@ namespace geode do_set_polyhedron_adjacent( const PolyhedronFacet& polyhedron_facet, index_t adjacent_id ) { - geode_tetrahedral_solid_.set_polyhedron_adjacent( - polyhedron_facet, adjacent_id, {} ); + geode_tetrahedral_solid_.set_polyhedron_adjacent( polyhedron_facet, + adjacent_id, + typename OpenGeodeTetrahedralSolid< + dimension >::OGTetrahedralSolidKey() ); } template < index_t dimension > void OpenGeodeTetrahedralSolidBuilder< dimension >:: do_unset_polyhedron_adjacent( const PolyhedronFacet& polyhedron_facet ) { - geode_tetrahedral_solid_.set_polyhedron_adjacent( - polyhedron_facet, NO_ID, {} ); + geode_tetrahedral_solid_.set_polyhedron_adjacent( polyhedron_facet, + NO_ID, + typename OpenGeodeTetrahedralSolid< + dimension >::OGTetrahedralSolidKey() ); } template < index_t dimension > diff --git a/src/geode/mesh/builder/geode/geode_triangulated_surface_builder.cpp b/src/geode/mesh/builder/geode/geode_triangulated_surface_builder.cpp index c860b2e06..060a9d2bb 100644 --- a/src/geode/mesh/builder/geode/geode_triangulated_surface_builder.cpp +++ b/src/geode/mesh/builder/geode/geode_triangulated_surface_builder.cpp @@ -88,15 +88,19 @@ namespace geode OpenGeodeTriangulatedSurfaceBuilder< dimension >::do_set_polygon_vertex( const PolygonVertex& polygon_vertex, index_t vertex_id ) { - geode_triangulated_surface_.set_polygon_vertex( - polygon_vertex, vertex_id, {} ); + geode_triangulated_surface_.set_polygon_vertex( polygon_vertex, + vertex_id, + typename OpenGeodeTriangulatedSurface< + dimension >::OGTriangulatedSurfaceKey{} ); } template < index_t dimension > void OpenGeodeTriangulatedSurfaceBuilder< dimension >::do_create_triangle( const std::array< index_t, 3 >& vertices ) { - geode_triangulated_surface_.add_triangle( vertices, {} ); + geode_triangulated_surface_.add_triangle( + vertices, typename OpenGeodeTriangulatedSurface< + dimension >::OGTriangulatedSurfaceKey{} ); } template < index_t dimension > @@ -111,16 +115,19 @@ namespace geode dimension >::do_set_polygon_adjacent( const PolygonEdge& polygon_edge, index_t adjacent_id ) { - geode_triangulated_surface_.set_polygon_adjacent( - polygon_edge, adjacent_id, {} ); + geode_triangulated_surface_.set_polygon_adjacent( polygon_edge, + adjacent_id, + typename OpenGeodeTriangulatedSurface< + dimension >::OGTriangulatedSurfaceKey{} ); } template < index_t dimension > void OpenGeodeTriangulatedSurfaceBuilder< dimension >:: do_unset_polygon_adjacent( const PolygonEdge& polygon_edge ) { - geode_triangulated_surface_.set_polygon_adjacent( - polygon_edge, NO_ID, {} ); + geode_triangulated_surface_.set_polygon_adjacent( polygon_edge, NO_ID, + typename OpenGeodeTriangulatedSurface< + dimension >::OGTriangulatedSurfaceKey{} ); } template < index_t dimension > diff --git a/src/geode/mesh/builder/graph_builder.cpp b/src/geode/mesh/builder/graph_builder.cpp index 7c5413209..d89cc9566 100644 --- a/src/geode/mesh/builder/graph_builder.cpp +++ b/src/geode/mesh/builder/graph_builder.cpp @@ -114,13 +114,15 @@ namespace geode void GraphBuilder::associate_edge_vertex_to_vertex( const EdgeVertex& edge_vertex, index_t vertex_id ) { - graph_.associate_edge_vertex_to_vertex( edge_vertex, vertex_id, {} ); + graph_.associate_edge_vertex_to_vertex( + edge_vertex, vertex_id, Graph::GraphKey{} ); } void GraphBuilder::disassociate_edge_vertex_to_vertex( const EdgeVertex& edge_vertex ) { - graph_.disassociate_edge_vertex_to_vertex( edge_vertex, {} ); + graph_.disassociate_edge_vertex_to_vertex( + edge_vertex, Graph::GraphKey{} ); } index_t GraphBuilder::create_edge() @@ -166,7 +168,8 @@ namespace geode void GraphBuilder::set_edges_around_vertex( index_t vertex_id, EdgesAroundVertex edges ) { - graph_.set_edges_around_vertex( vertex_id, std::move( edges ), {} ); + graph_.set_edges_around_vertex( + vertex_id, std::move( edges ), Graph::GraphKey{} ); } std::vector< index_t > GraphBuilder::delete_edges( diff --git a/src/geode/mesh/builder/grid_builder.cpp b/src/geode/mesh/builder/grid_builder.cpp index 7badac1b3..598d40e14 100644 --- a/src/geode/mesh/builder/grid_builder.cpp +++ b/src/geode/mesh/builder/grid_builder.cpp @@ -39,7 +39,7 @@ namespace geode template < index_t dimension > void GridBuilder< dimension >::set_grid_origin( Point< dimension > origin ) { - grid_.set_grid_origin( origin, {} ); + grid_.set_grid_origin( origin, typename Grid< dimension >::GridKey{} ); } template < index_t dimension > @@ -47,21 +47,22 @@ namespace geode std::array< index_t, dimension > cells_number, std::array< double, dimension > cells_length ) { - grid_.set_grid_dimensions( - std::move( cells_number ), std::move( cells_length ), {} ); + grid_.set_grid_dimensions( std::move( cells_number ), + std::move( cells_length ), typename Grid< dimension >::GridKey{} ); } template < index_t dimension > void GridBuilder< dimension >::set_grid_directions( std::array< Vector< dimension >, dimension > directions ) { - grid_.set_grid_directions( std::move( directions ), {} ); + grid_.set_grid_directions( + std::move( directions ), typename Grid< dimension >::GridKey{} ); } template < index_t dimension > void GridBuilder< dimension >::copy( const Grid< dimension >& grid ) { - grid_.copy( grid, {} ); + grid_.copy( grid, typename Grid< dimension >::GridKey{} ); } template class opengeode_mesh_api GridBuilder< 2 >; diff --git a/src/geode/mesh/builder/solid_edges_builder.cpp b/src/geode/mesh/builder/solid_edges_builder.cpp index 9c519357f..29976e6ba 100644 --- a/src/geode/mesh/builder/solid_edges_builder.cpp +++ b/src/geode/mesh/builder/solid_edges_builder.cpp @@ -44,21 +44,24 @@ namespace geode index_t SolidEdgesBuilder< dimension >::find_or_create_edge( std::array< index_t, 2 > edge_vertices ) { - return edges_->find_or_create_edge( std::move( edge_vertices ), {} ); + return edges_->find_or_create_edge( std::move( edge_vertices ), + typename SolidEdges< dimension >::SolidEdgesKey() ); } template < index_t dimension > void SolidEdgesBuilder< dimension >::remove_edge( std::array< index_t, 2 > edge_vertices ) { - edges_->remove_edge( std::move( edge_vertices ), {} ); + edges_->remove_edge( std::move( edge_vertices ), + typename SolidEdges< dimension >::SolidEdgesKey() ); } template < index_t dimension > std::vector< index_t > SolidEdgesBuilder< dimension >::delete_isolated_edges() { - return edges_->remove_isolated_edges( {} ); + return edges_->remove_isolated_edges( + typename SolidEdges< dimension >::SolidEdgesKey() ); } template < index_t dimension > @@ -68,15 +71,17 @@ namespace geode index_t edge_vertex_id, index_t new_vertex_id ) { - return edges_->update_edge_vertex( - std::move( edge_vertices ), edge_vertex_id, new_vertex_id, {} ); + return edges_->update_edge_vertex( std::move( edge_vertices ), + edge_vertex_id, new_vertex_id, + typename SolidEdges< dimension >::SolidEdgesKey() ); } template < index_t dimension > void SolidEdgesBuilder< dimension >::update_edge_vertices( absl::Span< const index_t > old2new ) { - edges_->update_edge_vertices( old2new, {} ); + edges_->update_edge_vertices( + old2new, typename SolidEdges< dimension >::SolidEdgesKey() ); } template < index_t dimension > @@ -87,14 +92,16 @@ namespace geode nullptr, OpenGeodeException::TYPE::data, "[SolidEdgesBuilder::copy] Cannot copy a mesh into an already " "initialized mesh." ); - edges_->overwrite_edges( edges, {} ); + edges_->overwrite_edges( + edges, typename SolidEdges< dimension >::SolidEdgesKey() ); } template < index_t dimension > std::vector< index_t > SolidEdgesBuilder< dimension >::delete_edges( const std::vector< bool >& to_delete ) { - return edges_->delete_edges( to_delete, {} ); + return edges_->delete_edges( + to_delete, typename SolidEdges< dimension >::SolidEdgesKey() ); } template class opengeode_mesh_api SolidEdgesBuilder< 3 >; diff --git a/src/geode/mesh/builder/solid_facets_builder.cpp b/src/geode/mesh/builder/solid_facets_builder.cpp index 3db2dc463..cd12be9be 100644 --- a/src/geode/mesh/builder/solid_facets_builder.cpp +++ b/src/geode/mesh/builder/solid_facets_builder.cpp @@ -42,14 +42,16 @@ namespace geode index_t SolidFacetsBuilder< dimension >::find_or_create_facet( PolyhedronFacetVertices facet_vertices ) { - return facets_->find_or_create_facet( std::move( facet_vertices ), {} ); + return facets_->find_or_create_facet( std::move( facet_vertices ), + typename SolidFacets< dimension >::SolidFacetsKey() ); } template < index_t dimension > std::vector< index_t > SolidFacetsBuilder< dimension >::delete_isolated_facets() { - return facets_->remove_isolated_facets( {} ); + return facets_->remove_isolated_facets( + typename SolidFacets< dimension >::SolidFacetsKey() ); } template < index_t dimension > @@ -57,7 +59,8 @@ namespace geode SolidFacetsBuilder< dimension >::update_facet_vertices( absl::Span< const index_t > old2new ) { - return facets_->update_facet_vertices( old2new, {} ); + return facets_->update_facet_vertices( + old2new, typename SolidFacets< dimension >::SolidFacetsKey() ); } template < index_t dimension > @@ -71,22 +74,25 @@ namespace geode facet_vertex_id < facet_vertices.size(), "[SolidFacetsBuilder::update_facet_vertex] " "Accessing an invalid vertex in facet" ); - return facets_->update_facet_vertex( - std::move( facet_vertices ), facet_vertex_id, new_vertex_id, {} ); + return facets_->update_facet_vertex( std::move( facet_vertices ), + facet_vertex_id, new_vertex_id, + typename SolidFacets< dimension >::SolidFacetsKey() ); } template < index_t dimension > void SolidFacetsBuilder< dimension >::remove_facet( PolyhedronFacetVertices facet_vertices ) { - facets_->remove_facet( std::move( facet_vertices ), {} ); + facets_->remove_facet( std::move( facet_vertices ), + typename SolidFacets< dimension >::SolidFacetsKey() ); } template < index_t dimension > std::vector< index_t > SolidFacetsBuilder< dimension >::delete_facets( const std::vector< bool >& to_delete ) { - return facets_->delete_facets( to_delete, {} ); + return facets_->delete_facets( + to_delete, typename SolidFacets< dimension >::SolidFacetsKey() ); } template < index_t dimension > @@ -97,7 +103,8 @@ namespace geode nullptr, OpenGeodeException::TYPE::data, "[SolidFacetsBuilder::copy] Cannot copy a mesh into an already " "initialized mesh." ); - facets_->overwrite_facets( facets, {} ); + facets_->overwrite_facets( + facets, typename SolidFacets< dimension >::SolidFacetsKey() ); } template class opengeode_mesh_api SolidFacetsBuilder< 3 >; diff --git a/src/geode/mesh/builder/solid_mesh_builder.cpp b/src/geode/mesh/builder/solid_mesh_builder.cpp index a7ed1aa0b..d95341e6e 100644 --- a/src/geode/mesh/builder/solid_mesh_builder.cpp +++ b/src/geode/mesh/builder/solid_mesh_builder.cpp @@ -647,7 +647,8 @@ namespace geode void SolidMeshBuilder< dimension >::reset_polyhedra_around_vertex( index_t vertex_id ) { - solid_mesh_.reset_polyhedra_around_vertex( vertex_id, {} ); + solid_mesh_.reset_polyhedra_around_vertex( + vertex_id, typename SolidMesh< dimension >::SolidMeshKey{} ); } template < index_t dimension > @@ -662,8 +663,8 @@ namespace geode polyhedron_vertex.vertex_id != NO_ID, "[SolidMeshBuilder::associate_polyhedron_vertex_to_vertex] " "PolyhedronVertex invalid" ); - solid_mesh_.associate_polyhedron_vertex_to_vertex( - polyhedron_vertex, vertex_id, {} ); + solid_mesh_.associate_polyhedron_vertex_to_vertex( polyhedron_vertex, + vertex_id, typename SolidMesh< dimension >::SolidMeshKey{} ); } template < index_t dimension > @@ -671,8 +672,8 @@ namespace geode SolidMeshBuilder< dimension >::disassociate_polyhedron_vertex_to_vertex( index_t vertex_id ) { - solid_mesh_.associate_polyhedron_vertex_to_vertex( - PolyhedronVertex{}, vertex_id, {} ); + solid_mesh_.associate_polyhedron_vertex_to_vertex( PolyhedronVertex{}, + vertex_id, typename SolidMesh< dimension >::SolidMeshKey{} ); } template < index_t dimension > @@ -798,7 +799,8 @@ namespace geode SolidEdgesBuilder< dimension > SolidMeshBuilder< dimension >::edges_builder() { - return SolidEdgesBuilder< dimension >{ solid_mesh_.edges( {} ) }; + return SolidEdgesBuilder< dimension >{ solid_mesh_.edges( + typename SolidMesh< dimension >::SolidMeshKey{} ) }; } template < index_t dimension > @@ -862,7 +864,8 @@ namespace geode SolidFacetsBuilder< dimension > SolidMeshBuilder< dimension >::facets_builder() { - return SolidFacetsBuilder< dimension >{ solid_mesh_.facets( {} ) }; + return SolidFacetsBuilder< dimension >{ solid_mesh_.facets( + typename SolidMesh< dimension >::SolidMeshKey{} ) }; } template < index_t dimension > @@ -986,11 +989,13 @@ namespace geode solid_mesh.polyhedron_attribute_manager() ); if( solid_mesh.are_edges_enabled() ) { - solid_mesh_.copy_edges( solid_mesh, {} ); + solid_mesh_.copy_edges( + solid_mesh, typename SolidMesh< dimension >::SolidMeshKey{} ); } if( solid_mesh.are_facets_enabled() ) { - solid_mesh_.copy_facets( solid_mesh, {} ); + solid_mesh_.copy_facets( + solid_mesh, typename SolidMesh< dimension >::SolidMeshKey{} ); } } diff --git a/src/geode/mesh/builder/surface_edges_builder.cpp b/src/geode/mesh/builder/surface_edges_builder.cpp index 046f1cd81..2483fd6c5 100644 --- a/src/geode/mesh/builder/surface_edges_builder.cpp +++ b/src/geode/mesh/builder/surface_edges_builder.cpp @@ -38,14 +38,16 @@ namespace geode std::vector< index_t > SurfaceEdgesBuilder< dimension >::delete_isolated_edges() { - return edges_->remove_isolated_edges( {} ); + return edges_->remove_isolated_edges( + typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template < index_t dimension > void SurfaceEdgesBuilder< dimension >::update_edge_vertices( absl::Span< const index_t > old2new ) { - edges_->update_edge_vertices( old2new, {} ); + edges_->update_edge_vertices( + old2new, typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template < index_t dimension > @@ -58,15 +60,17 @@ namespace geode OpenGeodeMeshException::check_assertion( edge_vertex_id < 2, "[SurfaceEdgesBuilder::update_edge_vertex] " "Accessing an invalid vertex in edge" ); - return edges_->update_edge_vertex( - std::move( edge_vertices ), edge_vertex_id, new_vertex_id, {} ); + return edges_->update_edge_vertex( std::move( edge_vertices ), + edge_vertex_id, new_vertex_id, + typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template < index_t dimension > std::vector< index_t > SurfaceEdgesBuilder< dimension >::delete_edges( const std::vector< bool >& to_delete ) { - return edges_->delete_edges( to_delete, {} ); + return edges_->delete_edges( + to_delete, typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template < index_t dimension > @@ -77,21 +81,24 @@ namespace geode nullptr, OpenGeodeException::TYPE::data, "[SurfaceEdgesBuilder::copy] Cannot copy a mesh into an already " "initialized mesh." ); - edges_->overwrite_edges( edges, {} ); + edges_->overwrite_edges( + edges, typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template < index_t dimension > void SurfaceEdgesBuilder< dimension >::remove_edge( std::array< index_t, 2 > edge_vertices ) { - edges_->remove_edge( std::move( edge_vertices ), {} ); + edges_->remove_edge( std::move( edge_vertices ), + typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template < index_t dimension > index_t SurfaceEdgesBuilder< dimension >::find_or_create_edge( std::array< index_t, 2 > edge_vertices ) { - return edges_->find_or_create_edge( std::move( edge_vertices ), {} ); + return edges_->find_or_create_edge( std::move( edge_vertices ), + typename SurfaceEdges< dimension >::SurfaceEdgesKey() ); } template class opengeode_mesh_api SurfaceEdgesBuilder< 2 >; diff --git a/src/geode/mesh/builder/surface_mesh_builder.cpp b/src/geode/mesh/builder/surface_mesh_builder.cpp index cbc59fe5e..eb752820b 100644 --- a/src/geode/mesh/builder/surface_mesh_builder.cpp +++ b/src/geode/mesh/builder/surface_mesh_builder.cpp @@ -397,7 +397,8 @@ namespace geode void SurfaceMeshBuilder< dimension >::reset_polygons_around_vertex( index_t vertex_id ) { - surface_mesh_.reset_polygons_around_vertex( vertex_id, {} ); + surface_mesh_.reset_polygons_around_vertex( + vertex_id, typename SurfaceMesh< dimension >::SurfaceMeshKey{} ); } template < index_t dimension > @@ -412,16 +413,16 @@ namespace geode polygon_vertex.vertex_id != NO_LID, "[SurfaceMeshBuilder::associate_polygon_vertex_to_vertex] " "PolygonVertex invalid" ); - surface_mesh_.associate_polygon_vertex_to_vertex( - polygon_vertex, vertex_id, {} ); + surface_mesh_.associate_polygon_vertex_to_vertex( polygon_vertex, + vertex_id, typename SurfaceMesh< dimension >::SurfaceMeshKey{} ); } template < index_t dimension > void SurfaceMeshBuilder< dimension >::disassociate_polygon_vertex_to_vertex( index_t vertex_id ) { - surface_mesh_.associate_polygon_vertex_to_vertex( - PolygonVertex{}, vertex_id, {} ); + surface_mesh_.associate_polygon_vertex_to_vertex( PolygonVertex{}, + vertex_id, typename SurfaceMesh< dimension >::SurfaceMeshKey{} ); } template < index_t dimension > @@ -727,7 +728,8 @@ namespace geode SurfaceEdgesBuilder< dimension > SurfaceMeshBuilder< dimension >::edges_builder() { - return SurfaceEdgesBuilder< dimension >{ surface_mesh_.edges( {} ) }; + return SurfaceEdgesBuilder< dimension >{ surface_mesh_.edges( + typename SurfaceMesh< dimension >::SurfaceMeshKey{} ) }; } template < index_t dimension > @@ -846,7 +848,8 @@ namespace geode copy_polygons( surface_mesh, *this ); if( surface_mesh.are_edges_enabled() ) { - surface_mesh_.copy_edges( surface_mesh, {} ); + surface_mesh_.copy_edges( surface_mesh, + typename SurfaceMesh< dimension >::SurfaceMeshKey{} ); } surface_mesh_.polygon_attribute_manager().copy( surface_mesh.polygon_attribute_manager() ); diff --git a/src/geode/mesh/core/texture_manager.cpp b/src/geode/mesh/core/texture_manager.cpp index f77b155c9..fc1e164ef 100644 --- a/src/geode/mesh/core/texture_manager.cpp +++ b/src/geode/mesh/core/texture_manager.cpp @@ -48,34 +48,41 @@ namespace geode index_t nb_textures() const { - return textures_.nb_textures( {} ); + return textures_.nb_textures( + typename TextureStorage< dimension >::TextureManagerKey{} ); } Texture< dimension >& find_or_create_texture( std::string_view name ) { - return textures_.find_or_create_texture( manager_, name, {} ); + return textures_.find_or_create_texture( manager_, name, + typename TextureStorage< dimension >::TextureManagerKey{} ); } const Texture< dimension >& find_texture( std::string_view name ) const { - return textures_.find_texture( name, {} ); + return textures_.find_texture( name, + typename TextureStorage< dimension >::TextureManagerKey{} ); } absl::FixedArray< std::string_view > texture_names() const { - return textures_.texture_names( {} ); + return textures_.texture_names( + typename TextureStorage< dimension >::TextureManagerKey{} ); } bool texture_exists( std::string_view name ) const { - return textures_.texture_exists( name, {} ); + return textures_.texture_exists( name, + typename TextureStorage< dimension >::TextureManagerKey{} ); } void delete_texture( std::string_view name ) { - const auto& texture = textures_.find_texture( name, {} ); + const auto& texture = textures_.find_texture( name, + typename TextureStorage< dimension >::TextureManagerKey{} ); const auto texture_id = texture.texture_id(); - textures_.delete_texture( name, {} ); + textures_.delete_texture( name, + typename TextureStorage< dimension >::TextureManagerKey{} ); manager_.delete_attribute( texture_id ); } diff --git a/src/geode/mesh/core/vertex_set.cpp b/src/geode/mesh/core/vertex_set.cpp index 131ab3506..8fb717eef 100644 --- a/src/geode/mesh/core/vertex_set.cpp +++ b/src/geode/mesh/core/vertex_set.cpp @@ -110,7 +110,7 @@ namespace geode auto clone = create( impl_name() ); auto builder = VertexSetBuilder::create( *clone ); builder->copy_identifier( *this ); - builder->copy( *this, {} ); + builder->copy( *this, VertexSetBuilder::VertexSetKey{} ); return clone; } diff --git a/src/geode/model/mixin/builder/block_collections_builder.cpp b/src/geode/model/mixin/builder/block_collections_builder.cpp index d60a2b84a..a76499383 100644 --- a/src/geode/model/mixin/builder/block_collections_builder.cpp +++ b/src/geode/model/mixin/builder/block_collections_builder.cpp @@ -31,7 +31,9 @@ namespace geode template < index_t dimension > const uuid& BlockCollectionsBuilder< dimension >::create_block_collection() { - return block_collections_.create_block_collection( {} ); + return block_collections_.create_block_collection( + typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ); } template < index_t dimension > @@ -39,37 +41,53 @@ namespace geode uuid block_collection_id ) { block_collections_.create_block_collection( - std::move( block_collection_id ), {} ); + std::move( block_collection_id ), + typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ); } template < index_t dimension > void BlockCollectionsBuilder< dimension >::delete_block_collection( const BlockCollection< dimension >& collection ) { - block_collections_.delete_block_collection( collection, {} ); + block_collections_.delete_block_collection( + collection, typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ); } template < index_t dimension > void BlockCollectionsBuilder< dimension >::load_block_collections( std::string_view directory ) { - return block_collections_.load_block_collections( directory, {} ); + return block_collections_.load_block_collections( + directory, typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ); } template < index_t dimension > void BlockCollectionsBuilder< dimension >::set_block_collection_name( const uuid& id, std::string_view name ) { - block_collections_.modifiable_block_collection( id, {} ) - .set_block_collection_name( name, {} ); + block_collections_ + .modifiable_block_collection( + id, typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ) + .set_block_collection_name( + name, typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ); } template < index_t dimension > void BlockCollectionsBuilder< dimension >::set_block_collection_active( const uuid& id, bool active ) { - block_collections_.modifiable_block_collection( id, {} ) - .set_block_collection_active( active, {} ); + block_collections_ + .modifiable_block_collection( + id, typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ) + .set_block_collection_active( + active, typename BlockCollections< + dimension >::BlockCollectionsBuilderKey{} ); } template class opengeode_model_api BlockCollectionsBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/blocks_builder.cpp b/src/geode/model/mixin/builder/blocks_builder.cpp index b63663e1d..02abcf4ca 100644 --- a/src/geode/model/mixin/builder/blocks_builder.cpp +++ b/src/geode/model/mixin/builder/blocks_builder.cpp @@ -41,40 +41,49 @@ namespace geode template < index_t dimension > const uuid& BlocksBuilder< dimension >::create_block( const MeshImpl& impl ) { - return blocks_.create_block( impl, {} ); + return blocks_.create_block( + impl, typename Blocks< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > void BlocksBuilder< dimension >::create_block( uuid block_id ) { - blocks_.create_block( std::move( block_id ), {} ); + blocks_.create_block( std::move( block_id ), + typename Blocks< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > void BlocksBuilder< dimension >::create_block( uuid block_id, const MeshImpl& impl ) { - blocks_.create_block( std::move( block_id ), impl, {} ); + blocks_.create_block( std::move( block_id ), impl, + typename Blocks< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > void BlocksBuilder< dimension >::delete_block( const Block< dimension >& block ) { - blocks_.delete_block( block, {} ); + blocks_.delete_block( + block, typename Blocks< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > void BlocksBuilder< dimension >::load_blocks( std::string_view directory ) { - return blocks_.load_blocks( directory, {} ); + return blocks_.load_blocks( + directory, typename Blocks< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > void BlocksBuilder< dimension >::set_block_name( const uuid& id, std::string_view name ) { - blocks_.modifiable_block( id, {} ).set_block_name( name, {} ); + blocks_ + .modifiable_block( + id, typename Blocks< dimension >::BlocksBuilderKey{} ) + .set_block_name( + name, typename Blocks< dimension >::BlocksBuilderKey{} ); block_mesh_builder( id )->set_name( name ); } @@ -82,31 +91,42 @@ namespace geode void BlocksBuilder< dimension >::set_block_active( const uuid& id, bool active ) { - blocks_.modifiable_block( id, {} ).set_block_active( active, {} ); + blocks_ + .modifiable_block( + id, typename Blocks< dimension >::BlocksBuilderKey{} ) + .set_block_active( + active, typename Blocks< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > void BlocksBuilder< dimension >::set_block_mesh( const uuid& id, std::unique_ptr< SolidMesh< dimension > > mesh ) { - blocks_.modifiable_block( id, {} ).set_mesh( std::move( mesh ), - typename Block< dimension >::BlocksBuilderKey{} ); + blocks_ + .modifiable_block( + id, typename Blocks< dimension >::BlocksBuilderKey{} ) + .set_mesh( std::move( mesh ), + typename Block< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > SolidMesh< dimension >& BlocksBuilder< dimension >::modifiable_block_mesh( const uuid& id ) { - return blocks_.modifiable_block( id, {} ).modifiable_mesh( - typename Block< dimension >::BlocksBuilderKey{} ); + return blocks_ + .modifiable_block( + id, typename Blocks< dimension >::BlocksBuilderKey{} ) + .modifiable_mesh( typename Block< dimension >::BlocksBuilderKey{} ); } template < index_t dimension > std::unique_ptr< SolidMesh< dimension > > BlocksBuilder< dimension >::steal_block_mesh( const uuid& id ) { - return blocks_.modifiable_block( id, {} ).steal_mesh( - typename Block< dimension >::BlocksBuilderKey{} ); + return blocks_ + .modifiable_block( + id, typename Blocks< dimension >::BlocksBuilderKey{} ) + .steal_mesh( typename Block< dimension >::BlocksBuilderKey{} ); } template class opengeode_model_api BlocksBuilder< 3 >; diff --git a/src/geode/model/mixin/builder/component_registry_builder.cpp b/src/geode/model/mixin/builder/component_registry_builder.cpp index 0eb05e62f..b3c7937c2 100644 --- a/src/geode/model/mixin/builder/component_registry_builder.cpp +++ b/src/geode/model/mixin/builder/component_registry_builder.cpp @@ -38,24 +38,28 @@ namespace geode void ComponentRegistryBuilder::add_mesh_component( const ComponentType& type, const uuid& id ) { - registry_.add_mesh_component( type, id, {} ); + registry_.add_mesh_component( + type, id, ComponentRegistry::RegistryBuilder{} ); } void ComponentRegistryBuilder::add_collection_component( const ComponentType& type, const uuid& id ) { - registry_.add_collection_component( type, id, {} ); + registry_.add_collection_component( + type, id, ComponentRegistry::RegistryBuilder{} ); } void ComponentRegistryBuilder::remove_mesh_component( const ComponentType& type, const uuid& id ) { - registry_.remove_mesh_component( type, id, {} ); + registry_.remove_mesh_component( + type, id, ComponentRegistry::RegistryBuilder{} ); } void ComponentRegistryBuilder::remove_collection_component( const ComponentType& type, const uuid& id ) { - registry_.remove_collection_component( type, id, {} ); + registry_.remove_collection_component( + type, id, ComponentRegistry::RegistryBuilder{} ); } } // namespace geode diff --git a/src/geode/model/mixin/builder/corner_collections_builder.cpp b/src/geode/model/mixin/builder/corner_collections_builder.cpp index 6d7e588bc..89b4d279d 100644 --- a/src/geode/model/mixin/builder/corner_collections_builder.cpp +++ b/src/geode/model/mixin/builder/corner_collections_builder.cpp @@ -32,7 +32,9 @@ namespace geode const uuid& CornerCollectionsBuilder< dimension >::create_corner_collection() { - return corner_collections_.create_corner_collection( {} ); + return corner_collections_.create_corner_collection( + typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ); } template < index_t dimension > @@ -40,37 +42,53 @@ namespace geode uuid corner_collection_id ) { corner_collections_.create_corner_collection( - std::move( corner_collection_id ), {} ); + std::move( corner_collection_id ), + typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ); } template < index_t dimension > void CornerCollectionsBuilder< dimension >::delete_corner_collection( const CornerCollection< dimension >& collection ) { - corner_collections_.delete_corner_collection( collection, {} ); + corner_collections_.delete_corner_collection( + collection, typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ); } template < index_t dimension > void CornerCollectionsBuilder< dimension >::load_corner_collections( std::string_view directory ) { - return corner_collections_.load_corner_collections( directory, {} ); + return corner_collections_.load_corner_collections( + directory, typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ); } template < index_t dimension > void CornerCollectionsBuilder< dimension >::set_corner_collection_name( const uuid& id, std::string_view name ) { - corner_collections_.modifiable_corner_collection( id, {} ) - .set_corner_collection_name( name, {} ); + corner_collections_ + .modifiable_corner_collection( + id, typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ) + .set_corner_collection_name( + name, typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ); } template < index_t dimension > void CornerCollectionsBuilder< dimension >::set_corner_collection_active( const uuid& id, bool active ) { - corner_collections_.modifiable_corner_collection( id, {} ) - .set_corner_collection_active( active, {} ); + corner_collections_ + .modifiable_corner_collection( + id, typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ) + .set_corner_collection_active( + active, typename CornerCollections< + dimension >::CornerCollectionsBuilderKey{} ); } template class opengeode_model_api CornerCollectionsBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/corners_builder.cpp b/src/geode/model/mixin/builder/corners_builder.cpp index f30299d81..03a629dd1 100644 --- a/src/geode/model/mixin/builder/corners_builder.cpp +++ b/src/geode/model/mixin/builder/corners_builder.cpp @@ -42,49 +42,60 @@ namespace geode const uuid& CornersBuilder< dimension >::create_corner( const MeshImpl& impl ) { - return corners_.create_corner( impl, {} ); + return corners_.create_corner( + impl, typename Corners< dimension >::CornersBuilderKey{} ); } template < index_t dimension > void CornersBuilder< dimension >::create_corner( uuid corner_id ) { - corners_.create_corner( std::move( corner_id ), {} ); + corners_.create_corner( std::move( corner_id ), + typename Corners< dimension >::CornersBuilderKey{} ); } template < index_t dimension > void CornersBuilder< dimension >::create_corner( uuid corner_id, const MeshImpl& impl ) { - corners_.create_corner( std::move( corner_id ), impl, {} ); + corners_.create_corner( std::move( corner_id ), impl, + typename Corners< dimension >::CornersBuilderKey{} ); } template < index_t dimension > void CornersBuilder< dimension >::delete_corner( const Corner< dimension >& corner ) { - corners_.delete_corner( corner, {} ); + corners_.delete_corner( + corner, typename Corners< dimension >::CornersBuilderKey{} ); } template < index_t dimension > void CornersBuilder< dimension >::load_corners( std::string_view directory ) { - return corners_.load_corners( directory, {} ); + return corners_.load_corners( + directory, typename Corners< dimension >::CornersBuilderKey{} ); } template < index_t dimension > std::unique_ptr< PointSetBuilder< dimension > > CornersBuilder< dimension >::corner_mesh_builder( const uuid& id ) { - return PointSetBuilder< dimension >::create( - corners_.modifiable_corner( id, {} ).modifiable_mesh( - typename Corner< dimension >::CornersBuilderKey{} ) ); + return PointSetBuilder< dimension >::create( corners_ + .modifiable_corner( + id, typename Corners< dimension >::CornersBuilderKey{} ) + .modifiable_mesh( + typename Corner< dimension >::CornersBuilderKey{} ) ); } template < index_t dimension > void CornersBuilder< dimension >::set_corner_name( const uuid& id, std::string_view name ) { - corners_.modifiable_corner( id, {} ).set_corner_name( name, {} ); + corners_ + .modifiable_corner( + id, typename Corners< dimension >::CornersBuilderKey{} ) + .set_corner_name( + name, typename Corners< dimension >::CornersBuilderKey{} ); corner_mesh_builder( id )->set_name( name ); } @@ -92,31 +103,43 @@ namespace geode void CornersBuilder< dimension >::set_corner_active( const uuid& id, bool active ) { - corners_.modifiable_corner( id, {} ).set_corner_active( active, {} ); + corners_ + .modifiable_corner( + id, typename Corners< dimension >::CornersBuilderKey{} ) + .set_corner_active( + active, typename Corners< dimension >::CornersBuilderKey{} ); } template < index_t dimension > void CornersBuilder< dimension >::set_corner_mesh( const uuid& id, std::unique_ptr< PointSet< dimension > > mesh ) { - corners_.modifiable_corner( id, {} ).set_mesh( std::move( mesh ), - typename Corner< dimension >::CornersBuilderKey{} ); + corners_ + .modifiable_corner( + id, typename Corners< dimension >::CornersBuilderKey{} ) + .set_mesh( std::move( mesh ), + typename Corner< dimension >::CornersBuilderKey{} ); } template < index_t dimension > PointSet< dimension >& CornersBuilder< dimension >::modifiable_corner_mesh( const uuid& id ) { - return corners_.modifiable_corner( id, {} ).modifiable_mesh( - typename Corner< dimension >::CornersBuilderKey{} ); + return corners_ + .modifiable_corner( + id, typename Corner< dimension >::CornersBuilderKey{} ) + .modifiable_mesh( + typename Corner< dimension >::CornersBuilderKey{} ); } template < index_t dimension > std::unique_ptr< PointSet< dimension > > CornersBuilder< dimension >::steal_corner_mesh( const uuid& id ) { - return corners_.modifiable_corner( id, {} ).steal_mesh( - typename Corner< dimension >::CornersBuilderKey{} ); + return corners_ + .modifiable_corner( + id, typename Corner< dimension >::CornersBuilderKey{} ) + .steal_mesh( typename Corner< dimension >::CornersBuilderKey{} ); } template class opengeode_model_api CornersBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/line_collections_builder.cpp b/src/geode/model/mixin/builder/line_collections_builder.cpp index 3e1fa945b..c50a12fd8 100644 --- a/src/geode/model/mixin/builder/line_collections_builder.cpp +++ b/src/geode/model/mixin/builder/line_collections_builder.cpp @@ -31,7 +31,9 @@ namespace geode template < index_t dimension > const uuid& LineCollectionsBuilder< dimension >::create_line_collection() { - return line_collections_.create_line_collection( {} ); + return line_collections_.create_line_collection( + typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ); } template < index_t dimension > @@ -39,37 +41,53 @@ namespace geode uuid line_collection_id ) { line_collections_.create_line_collection( - std::move( line_collection_id ), {} ); + std::move( line_collection_id ), + typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ); } template < index_t dimension > void LineCollectionsBuilder< dimension >::delete_line_collection( const LineCollection< dimension >& collection ) { - line_collections_.delete_line_collection( collection, {} ); + line_collections_.delete_line_collection( + collection, typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ); } template < index_t dimension > void LineCollectionsBuilder< dimension >::load_line_collections( std::string_view directory ) { - return line_collections_.load_line_collections( directory, {} ); + return line_collections_.load_line_collections( + directory, typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ); } template < index_t dimension > void LineCollectionsBuilder< dimension >::set_line_collection_name( const uuid& id, std::string_view name ) { - line_collections_.modifiable_line_collection( id, {} ) - .set_line_collection_name( name, {} ); + line_collections_ + .modifiable_line_collection( + id, typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ) + .set_line_collection_name( + name, typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ); } template < index_t dimension > void LineCollectionsBuilder< dimension >::set_line_collection_active( const uuid& id, bool active ) { - line_collections_.modifiable_line_collection( id, {} ) - .set_line_collection_active( active, {} ); + line_collections_ + .modifiable_line_collection( + id, typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ) + .set_line_collection_active( + active, typename LineCollections< + dimension >::LineCollectionsBuilderKey{} ); } template class opengeode_model_api LineCollectionsBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/lines_builder.cpp b/src/geode/model/mixin/builder/lines_builder.cpp index 255849ec7..899c85600 100644 --- a/src/geode/model/mixin/builder/lines_builder.cpp +++ b/src/geode/model/mixin/builder/lines_builder.cpp @@ -41,48 +41,59 @@ namespace geode template < index_t dimension > const uuid& LinesBuilder< dimension >::create_line( const MeshImpl& impl ) { - return lines_.create_line( impl, {} ); + return lines_.create_line( + impl, typename Lines< dimension >::LinesBuilderKey{} ); } template < index_t dimension > void LinesBuilder< dimension >::create_line( uuid line_id ) { - lines_.create_line( std::move( line_id ), {} ); + lines_.create_line( std::move( line_id ), + typename Lines< dimension >::LinesBuilderKey{} ); } template < index_t dimension > void LinesBuilder< dimension >::create_line( uuid line_id, const MeshImpl& impl ) { - lines_.create_line( std::move( line_id ), impl, {} ); + lines_.create_line( std::move( line_id ), impl, + typename Lines< dimension >::LinesBuilderKey{} ); } template < index_t dimension > void LinesBuilder< dimension >::delete_line( const Line< dimension >& line ) { - lines_.delete_line( line, {} ); + lines_.delete_line( + line, typename Lines< dimension >::LinesBuilderKey{} ); } template < index_t dimension > void LinesBuilder< dimension >::load_lines( std::string_view directory ) { - return lines_.load_lines( directory, {} ); + return lines_.load_lines( + directory, typename Lines< dimension >::LinesBuilderKey{} ); } template < index_t dimension > std::unique_ptr< EdgedCurveBuilder< dimension > > LinesBuilder< dimension >::line_mesh_builder( const uuid& id ) { - return EdgedCurveBuilder< dimension >::create( - lines_.modifiable_line( id, {} ).modifiable_mesh( - typename Line< dimension >::LinesBuilderKey{} ) ); + return EdgedCurveBuilder< dimension >::create( lines_ + .modifiable_line( + id, typename Lines< dimension >::LinesBuilderKey{} ) + .modifiable_mesh( + typename Line< dimension >::LinesBuilderKey{} ) ); } template < index_t dimension > void LinesBuilder< dimension >::set_line_name( const uuid& id, std::string_view name ) { - lines_.modifiable_line( id, {} ).set_line_name( name, {} ); + lines_ + .modifiable_line( + id, typename Lines< dimension >::LinesBuilderKey{} ) + .set_line_name( + name, typename Lines< dimension >::LinesBuilderKey{} ); line_mesh_builder( id )->set_name( name ); } @@ -90,31 +101,42 @@ namespace geode void LinesBuilder< dimension >::set_line_active( const uuid& id, bool active ) { - lines_.modifiable_line( id, {} ).set_line_active( active, {} ); + lines_ + .modifiable_line( + id, typename Lines< dimension >::LinesBuilderKey{} ) + .set_line_active( + active, typename Lines< dimension >::LinesBuilderKey{} ); } template < index_t dimension > void LinesBuilder< dimension >::set_line_mesh( const uuid& id, std::unique_ptr< EdgedCurve< dimension > > mesh ) { - lines_.modifiable_line( id, {} ).set_mesh( - std::move( mesh ), typename Line< dimension >::LinesBuilderKey{} ); + lines_ + .modifiable_line( + id, typename Lines< dimension >::LinesBuilderKey{} ) + .set_mesh( std::move( mesh ), + typename Line< dimension >::LinesBuilderKey{} ); } template < index_t dimension > EdgedCurve< dimension >& LinesBuilder< dimension >::modifiable_line_mesh( const uuid& id ) { - return lines_.modifiable_line( id, {} ).modifiable_mesh( - typename Line< dimension >::LinesBuilderKey{} ); + return lines_ + .modifiable_line( + id, typename Lines< dimension >::LinesBuilderKey{} ) + .modifiable_mesh( typename Line< dimension >::LinesBuilderKey{} ); } template < index_t dimension > std::unique_ptr< EdgedCurve< dimension > > LinesBuilder< dimension >::steal_line_mesh( const uuid& id ) { - return lines_.modifiable_line( id, {} ).steal_mesh( - typename Line< dimension >::LinesBuilderKey{} ); + return lines_ + .modifiable_line( + id, typename Lines< dimension >::LinesBuilderKey{} ) + .steal_mesh( typename Line< dimension >::LinesBuilderKey{} ); } template class opengeode_model_api LinesBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/model_boundaries_builder.cpp b/src/geode/model/mixin/builder/model_boundaries_builder.cpp index 38a3ab117..de4742764 100644 --- a/src/geode/model/mixin/builder/model_boundaries_builder.cpp +++ b/src/geode/model/mixin/builder/model_boundaries_builder.cpp @@ -31,45 +31,62 @@ namespace geode template < index_t dimension > const uuid& ModelBoundariesBuilder< dimension >::create_model_boundary() { - return model_boundaries_.create_model_boundary( {} ); + return model_boundaries_.create_model_boundary( + typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ); } template < index_t dimension > void ModelBoundariesBuilder< dimension >::create_model_boundary( uuid model_boundary_id ) { - model_boundaries_.create_model_boundary( - std::move( model_boundary_id ), {} ); + model_boundaries_.create_model_boundary( std::move( model_boundary_id ), + typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ); } template < index_t dimension > void ModelBoundariesBuilder< dimension >::delete_model_boundary( const ModelBoundary< dimension >& boundary ) { - model_boundaries_.delete_model_boundary( boundary, {} ); + model_boundaries_.delete_model_boundary( + boundary, typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ); } template < index_t dimension > void ModelBoundariesBuilder< dimension >::load_model_boundaries( std::string_view directory ) { - return model_boundaries_.load_model_boundaries( directory, {} ); + return model_boundaries_.load_model_boundaries( + directory, typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ); } template < index_t dimension > void ModelBoundariesBuilder< dimension >::set_model_boundary_name( const uuid& id, std::string_view name ) { - model_boundaries_.modifiable_model_boundary( id, {} ) - .set_model_boundary_name( name, {} ); + model_boundaries_ + .modifiable_model_boundary( + id, typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ) + .set_model_boundary_name( + name, typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ); } template < index_t dimension > void ModelBoundariesBuilder< dimension >::set_model_boundary_active( const uuid& id, bool active ) { - model_boundaries_.modifiable_model_boundary( id, {} ) - .set_model_boundary_active( active, {} ); + model_boundaries_ + .modifiable_model_boundary( + id, typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ) + .set_model_boundary_active( + active, typename ModelBoundaries< + dimension >::ModelBoundariesBuilderKey{} ); } template class opengeode_model_api ModelBoundariesBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/relationships_builder.cpp b/src/geode/model/mixin/builder/relationships_builder.cpp index 9bda94a8e..9255834af 100644 --- a/src/geode/model/mixin/builder/relationships_builder.cpp +++ b/src/geode/model/mixin/builder/relationships_builder.cpp @@ -32,43 +32,49 @@ namespace geode void RelationshipsBuilder::unregister_component( const uuid& component_id ) { - relationships_.remove_component( component_id, {} ); + relationships_.remove_component( + component_id, Relationships::RelationshipsBuilderKey{} ); } index_t RelationshipsBuilder::add_boundary_relation( const ComponentID& boundary, const ComponentID& incidence ) { - return relationships_.add_boundary_relation( boundary, incidence, {} ); + return relationships_.add_boundary_relation( + boundary, incidence, Relationships::RelationshipsBuilderKey{} ); } index_t RelationshipsBuilder::add_internal_relation( const ComponentID& internal, const ComponentID& embedding ) { - return relationships_.add_internal_relation( internal, embedding, {} ); + return relationships_.add_internal_relation( + internal, embedding, Relationships::RelationshipsBuilderKey{} ); } index_t RelationshipsBuilder::add_item_in_collection( const ComponentID& item, const ComponentID& collection ) { - return relationships_.add_item_in_collection( item, collection, {} ); + return relationships_.add_item_in_collection( + item, collection, Relationships::RelationshipsBuilderKey{} ); } void RelationshipsBuilder::remove_relation( const uuid& component_id1, const uuid& component_id2 ) { - return relationships_.remove_relation( - component_id1, component_id2, {} ); + return relationships_.remove_relation( component_id1, component_id2, + Relationships::RelationshipsBuilderKey{} ); } void RelationshipsBuilder::copy_relationships( const ModelCopyMapping& mapping, const Relationships& relationships ) { - relationships_.copy_relationships( mapping, relationships, {} ); + relationships_.copy_relationships( + mapping, relationships, Relationships::RelationshipsBuilderKey{} ); } void RelationshipsBuilder::load_relationships( std::string_view directory ) { - relationships_.load_relationships( directory, {} ); + relationships_.load_relationships( + directory, Relationships::RelationshipsBuilderKey{} ); } } // namespace geode diff --git a/src/geode/model/mixin/builder/surface_collections_builder.cpp b/src/geode/model/mixin/builder/surface_collections_builder.cpp index 945bd11e3..10f7d8ce9 100644 --- a/src/geode/model/mixin/builder/surface_collections_builder.cpp +++ b/src/geode/model/mixin/builder/surface_collections_builder.cpp @@ -32,7 +32,9 @@ namespace geode const uuid& SurfaceCollectionsBuilder< dimension >::create_surface_collection() { - return surface_collections_.create_surface_collection( {} ); + return surface_collections_.create_surface_collection( + typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ); } template < index_t dimension > @@ -40,37 +42,53 @@ namespace geode uuid surface_collection_id ) { surface_collections_.create_surface_collection( - std::move( surface_collection_id ), {} ); + std::move( surface_collection_id ), + typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ); } template < index_t dimension > void SurfaceCollectionsBuilder< dimension >::delete_surface_collection( const SurfaceCollection< dimension >& collection ) { - surface_collections_.delete_surface_collection( collection, {} ); + surface_collections_.delete_surface_collection( + collection, typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ); } template < index_t dimension > void SurfaceCollectionsBuilder< dimension >::load_surface_collections( std::string_view directory ) { - return surface_collections_.load_surface_collections( directory, {} ); + return surface_collections_.load_surface_collections( + directory, typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ); } template < index_t dimension > void SurfaceCollectionsBuilder< dimension >::set_surface_collection_name( const uuid& id, std::string_view name ) { - surface_collections_.modifiable_surface_collection( id, {} ) - .set_surface_collection_name( name, {} ); + surface_collections_ + .modifiable_surface_collection( + id, typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ) + .set_surface_collection_name( + name, typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ); } template < index_t dimension > void SurfaceCollectionsBuilder< dimension >::set_surface_collection_active( const uuid& id, bool active ) { - surface_collections_.modifiable_surface_collection( id, {} ) - .set_surface_collection_active( active, {} ); + surface_collections_ + .modifiable_surface_collection( + id, typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ) + .set_surface_collection_active( + active, typename SurfaceCollections< + dimension >::SurfaceCollectionsBuilderKey{} ); } template class opengeode_model_api SurfaceCollectionsBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/surfaces_builder.cpp b/src/geode/model/mixin/builder/surfaces_builder.cpp index f796d9845..ac85dd79e 100644 --- a/src/geode/model/mixin/builder/surfaces_builder.cpp +++ b/src/geode/model/mixin/builder/surfaces_builder.cpp @@ -34,48 +34,58 @@ namespace geode template < index_t dimension > const uuid& SurfacesBuilder< dimension >::create_surface() { - return surfaces_.create_surface( {} ); + return surfaces_.create_surface( + typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > const uuid& SurfacesBuilder< dimension >::create_surface( const MeshImpl& impl ) { - return surfaces_.create_surface( impl, {} ); + return surfaces_.create_surface( + impl, typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > void SurfacesBuilder< dimension >::create_surface( uuid surface_id ) { - surfaces_.create_surface( std::move( surface_id ), {} ); + surfaces_.create_surface( std::move( surface_id ), + typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > void SurfacesBuilder< dimension >::create_surface( uuid surface_id, const MeshImpl& impl ) { - surfaces_.create_surface( std::move( surface_id ), impl, {} ); + surfaces_.create_surface( std::move( surface_id ), impl, + typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > void SurfacesBuilder< dimension >::delete_surface( const Surface< dimension >& surface ) { - surfaces_.delete_surface( surface, {} ); + surfaces_.delete_surface( + surface, typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > void SurfacesBuilder< dimension >::load_surfaces( std::string_view directory ) { - return surfaces_.load_surfaces( directory, {} ); + return surfaces_.load_surfaces( + directory, typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > void SurfacesBuilder< dimension >::set_surface_name( const uuid& id, std::string_view name ) { - surfaces_.modifiable_surface( id, {} ).set_surface_name( name, {} ); + surfaces_ + .modifiable_surface( + id, typename Surface< dimension >::SurfacesBuilderKey{} ) + .set_surface_name( + name, typename Surface< dimension >::SurfacesBuilderKey{} ); surface_mesh_builder( id )->set_name( name ); } @@ -83,31 +93,43 @@ namespace geode void SurfacesBuilder< dimension >::set_surface_active( const uuid& id, bool active ) { - surfaces_.modifiable_surface( id, {} ).set_surface_active( active, {} ); + surfaces_ + .modifiable_surface( + id, typename Surface< dimension >::SurfacesBuilderKey{} ) + .set_surface_active( + active, typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > void SurfacesBuilder< dimension >::set_surface_mesh( const uuid& id, std::unique_ptr< SurfaceMesh< dimension > > mesh ) { - surfaces_.modifiable_surface( id, {} ).set_mesh( std::move( mesh ), - typename Surface< dimension >::SurfacesBuilderKey{} ); + surfaces_ + .modifiable_surface( + id, typename Surface< dimension >::SurfacesBuilderKey{} ) + .set_mesh( std::move( mesh ), + typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > SurfaceMesh< dimension >& SurfacesBuilder< dimension >::modifiable_surface_mesh( const uuid& id ) { - return surfaces_.modifiable_surface( id, {} ).modifiable_mesh( - typename Surface< dimension >::SurfacesBuilderKey{} ); + return surfaces_ + .modifiable_surface( + id, typename Surface< dimension >::SurfacesBuilderKey{} ) + .modifiable_mesh( + typename Surface< dimension >::SurfacesBuilderKey{} ); } template < index_t dimension > std::unique_ptr< SurfaceMesh< dimension > > SurfacesBuilder< dimension >::steal_surface_mesh( const uuid& id ) { - return surfaces_.modifiable_surface( id, {} ).steal_mesh( - typename Surface< dimension >::SurfacesBuilderKey{} ); + return surfaces_ + .modifiable_surface( + id, typename Surface< dimension >::SurfacesBuilderKey{} ) + .steal_mesh( typename Surface< dimension >::SurfacesBuilderKey{} ); } template class opengeode_model_api SurfacesBuilder< 2 >; diff --git a/src/geode/model/mixin/builder/vertex_identifier_builder.cpp b/src/geode/model/mixin/builder/vertex_identifier_builder.cpp index f65381cc5..5596a4cc3 100644 --- a/src/geode/model/mixin/builder/vertex_identifier_builder.cpp +++ b/src/geode/model/mixin/builder/vertex_identifier_builder.cpp @@ -33,43 +33,48 @@ namespace geode index_t VertexIdentifierBuilder::create_unique_vertex() { - return vertex_identifier_.create_unique_vertex( {} ); + return vertex_identifier_.create_unique_vertex( + VertexIdentifier::BuilderKey{} ); } index_t VertexIdentifierBuilder::create_unique_vertices( index_t nb ) { - return vertex_identifier_.create_unique_vertices( nb, {} ); + return vertex_identifier_.create_unique_vertices( + nb, VertexIdentifier::BuilderKey{} ); } void VertexIdentifierBuilder::set_unique_vertex( ComponentMeshVertex component_vertex_id, index_t unique_vertex_id ) { - vertex_identifier_.set_unique_vertex( - component_vertex_id, unique_vertex_id, {} ); + vertex_identifier_.set_unique_vertex( component_vertex_id, + unique_vertex_id, VertexIdentifier::BuilderKey{} ); } void VertexIdentifierBuilder::unset_unique_vertex( const ComponentMeshVertex& component_vertex_id, index_t unique_vertex_id ) { - vertex_identifier_.unset_unique_vertex( - component_vertex_id, unique_vertex_id, {} ); + vertex_identifier_.unset_unique_vertex( component_vertex_id, + unique_vertex_id, VertexIdentifier::BuilderKey{} ); } void VertexIdentifierBuilder::update_unique_vertices( const ComponentID& component_id, absl::Span< const index_t > old2new ) { - vertex_identifier_.update_unique_vertices( component_id, old2new, {} ); + vertex_identifier_.update_unique_vertices( + component_id, old2new, VertexIdentifier::BuilderKey{} ); } void VertexIdentifierBuilder::load_unique_vertices( std::string_view directory ) { - vertex_identifier_.load_unique_vertices( directory, {} ); + vertex_identifier_.load_unique_vertices( + directory, VertexIdentifier::BuilderKey{} ); } std::vector< index_t > VertexIdentifierBuilder::delete_isolated_vertices() { - return vertex_identifier_.delete_isolated_vertices( {} ); + return vertex_identifier_.delete_isolated_vertices( + VertexIdentifier::BuilderKey{} ); } } // namespace geode diff --git a/src/geode/model/mixin/core/blocks.cpp b/src/geode/model/mixin/core/blocks.cpp index f15d490ca..1c0d1472f 100644 --- a/src/geode/model/mixin/core/blocks.cpp +++ b/src/geode/model/mixin/core/blocks.cpp @@ -145,13 +145,13 @@ namespace geode template < index_t dimension > void Blocks< dimension >::load_blocks( - std::string_view directory, BlocksBuilderKey /*unused*/ ) + std::string_view directory, BlocksBuilderKey builder_key ) { impl_->load_components( absl::StrCat( directory, "/blocks" ) ); const auto mapping = impl_->file_mapping( directory ); absl::FixedArray< async::task< void > > tasks( nb_blocks() ); index_t count{ 0 }; - for( auto& block : modifiable_blocks( {} ) ) + for( auto& block : modifiable_blocks( builder_key ) ) { tasks[count++] = async::spawn( [&block, &mapping] { const auto file = mapping.at( block.id().string() ); @@ -199,7 +199,8 @@ namespace geode const MeshImpl& impl, BlocksBuilderKey /*unused*/ ) { typename Blocks< dimension >::Impl::ComponentPtr block{ - new Block< dimension >{ impl, {} } + new Block< dimension >{ + impl, typename Block< dimension >::BlocksKey{} } }; const auto& id = block->id(); impl_->add_component( std::move( block ) ); @@ -222,7 +223,8 @@ namespace geode uuid block_id, const MeshImpl& impl, BlocksBuilderKey /*unused*/ ) { typename Blocks< dimension >::Impl::ComponentPtr block{ - new Block< dimension >{ impl, {} } + new Block< dimension >{ + impl, typename Block< dimension >::BlocksKey{} } }; IdentifierBuilder{ *block }.set_id( std::move( block_id ) ); impl_->add_component( std::move( block ) ); diff --git a/src/geode/model/mixin/core/corners.cpp b/src/geode/model/mixin/core/corners.cpp index 1347c3113..246f8603b 100644 --- a/src/geode/model/mixin/core/corners.cpp +++ b/src/geode/model/mixin/core/corners.cpp @@ -115,13 +115,13 @@ namespace geode template < index_t dimension > void Corners< dimension >::load_corners( - std::string_view directory, CornersBuilderKey /*key*/ ) + std::string_view directory, CornersBuilderKey key ) { impl_->load_components( absl::StrCat( directory, "/corners" ) ); const auto mapping = impl_->file_mapping( directory ); absl::FixedArray< async::task< void > > tasks( nb_corners() ); index_t count{ 0 }; - for( auto& corner : modifiable_corners( {} ) ) + for( auto& corner : modifiable_corners( key ) ) { tasks[count++] = async::spawn( [&corner, &mapping] { const auto file = mapping.at( corner.id().string() ); @@ -199,7 +199,8 @@ namespace geode uuid corner_id, const MeshImpl& impl, CornersBuilderKey /*key*/ ) { typename Corners< dimension >::Impl::ComponentPtr corner{ - new Corner< dimension >{ impl, {} } + new Corner< dimension >{ + impl, typename Corner< dimension >::CornersKey{} } }; IdentifierBuilder{ *corner }.set_id( std::move( corner_id ) ); impl_->add_component( std::move( corner ) ); diff --git a/src/geode/model/mixin/core/lines.cpp b/src/geode/model/mixin/core/lines.cpp index aaf1f81b3..6a7643b43 100644 --- a/src/geode/model/mixin/core/lines.cpp +++ b/src/geode/model/mixin/core/lines.cpp @@ -113,13 +113,13 @@ namespace geode template < index_t dimension > void Lines< dimension >::load_lines( - std::string_view directory, LinesBuilderKey /*key*/ ) + std::string_view directory, LinesBuilderKey key ) { impl_->load_components( absl::StrCat( directory, "/lines" ) ); const auto mapping = impl_->file_mapping( directory ); absl::FixedArray< async::task< void > > tasks( nb_lines() ); index_t count{ 0 }; - for( auto& line : modifiable_lines( {} ) ) + for( auto& line : modifiable_lines( key ) ) { tasks[count++] = async::spawn( [&line, &mapping] { const auto file = mapping.at( line.id().string() ); @@ -195,7 +195,8 @@ namespace geode uuid line_id, const MeshImpl& impl, LinesBuilderKey /*key*/ ) { typename Lines< dimension >::Impl::ComponentPtr line{ - new Line< dimension >{ impl, {} } + new Line< dimension >{ + impl, typename Line< dimension >::LinesKey{} } }; IdentifierBuilder{ *line }.set_id( std::move( line_id ) ); impl_->add_component( std::move( line ) ); diff --git a/src/geode/model/mixin/core/surfaces.cpp b/src/geode/model/mixin/core/surfaces.cpp index f3be6cbb1..87f3f46f4 100644 --- a/src/geode/model/mixin/core/surfaces.cpp +++ b/src/geode/model/mixin/core/surfaces.cpp @@ -137,13 +137,13 @@ namespace geode template < index_t dimension > void Surfaces< dimension >::load_surfaces( - std::string_view directory, SurfacesBuilderKey /*key*/ ) + std::string_view directory, SurfacesBuilderKey key ) { impl_->load_components( absl::StrCat( directory, "/surfaces" ) ); const auto mapping = impl_->file_mapping( directory ); absl::FixedArray< async::task< void > > tasks( nb_surfaces() ); index_t count{ 0 }; - for( auto& surface : modifiable_surfaces( {} ) ) + for( auto& surface : modifiable_surfaces( key ) ) { tasks[count++] = async::spawn( [&surface, &mapping] { const auto file = mapping.at( surface.id().string() ); @@ -232,7 +232,8 @@ namespace geode uuid surface_id, const MeshImpl& impl, SurfacesBuilderKey /*key*/ ) { typename Surfaces< dimension >::Impl::ComponentPtr surface{ - new Surface< dimension >{ impl, {} } + new Surface< dimension >{ + impl, typename Surface< dimension >::SurfacesKey{} } }; IdentifierBuilder{ *surface }.set_id( std::move( surface_id ) ); impl_->add_component( std::move( surface ) );