Skip to content

Commit

Permalink
fix(explicit constructor): Added explicit constructors and updated wi…
Browse files Browse the repository at this point in the history
…th those in OpenGeode.
  • Loading branch information
MelchiorSchuh committed Jul 5, 2024
1 parent 771f78b commit df48bd0
Show file tree
Hide file tree
Showing 63 changed files with 404 additions and 387 deletions.
2 changes: 1 addition & 1 deletion include/geode/inspector/brep_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( BRepInspector );

public:
BRepInspector( const BRep& brep );
explicit BRepInspector( const BRep& brep );

BRepInspectionResult inspect_brep() const;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( BRepComponentMeshesAdjacency );

public:
BRepComponentMeshesAdjacency( const BRep& model );
explicit BRepComponentMeshesAdjacency( const BRep& model );

~BRepComponentMeshesAdjacency();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ namespace geode

namespace geode
{
struct opengeode_inspector_inspector_api
SectionMeshesAdjacencyInspectionResult
struct
opengeode_inspector_inspector_api SectionMeshesAdjacencyInspectionResult
{
InspectionIssuesMap< PolygonEdge >
surfaces_edges_with_wrong_adjacencies{
Expand All @@ -61,7 +61,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SectionComponentMeshesAdjacency );

public:
SectionComponentMeshesAdjacency( const Section& model );
explicit SectionComponentMeshesAdjacency( const Section& model );

~SectionComponentMeshesAdjacency();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SolidMeshAdjacency );

public:
SolidMeshAdjacency( const SolidMesh< dimension >& mesh );
explicit SolidMeshAdjacency( const SolidMesh< dimension >& mesh );

~SolidMeshAdjacency();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SurfaceMeshAdjacency );

public:
SurfaceMeshAdjacency( const SurfaceMesh< dimension >& mesh );
explicit SurfaceMeshAdjacency( const SurfaceMesh< dimension >& mesh );

~SurfaceMeshAdjacency();

Expand Down
2 changes: 1 addition & 1 deletion include/geode/inspector/criterion/brep_meshes_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( BRepMeshesInspector );

public:
BRepMeshesInspector( const BRep& brep );
explicit BRepMeshesInspector( const BRep& brep );

BRepMeshesInspectionResult inspect_brep_meshes() const;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( ComponentMeshesColocation );

public:
ComponentMeshesColocation( const Model& model );
explicit ComponentMeshesColocation( const Model& model );

~ComponentMeshesColocation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( EdgedCurveColocation );

public:
EdgedCurveColocation( const EdgedCurve< dimension >& mesh );
explicit EdgedCurveColocation( const EdgedCurve< dimension >& mesh );

~EdgedCurveColocation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( PointSetColocation );

public:
PointSetColocation( const PointSet< dimension >& mesh );
explicit PointSetColocation( const PointSet< dimension >& mesh );

~PointSetColocation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace geode
OPENGEODE_TEMPLATE_ASSERT_3D( dimension );

public:
SolidMeshColocation( const SolidMesh< dimension >& mesh );
explicit SolidMeshColocation( const SolidMesh< dimension >& mesh );

~SolidMeshColocation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SurfaceMeshColocation );

public:
SurfaceMeshColocation( const SurfaceMesh< dimension >& mesh );
explicit SurfaceMeshColocation( const SurfaceMesh< dimension >& mesh );

~SurfaceMeshColocation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( UniqueVerticesColocation );

public:
UniqueVerticesColocation( const Model& model );
explicit UniqueVerticesColocation( const Model& model );

~UniqueVerticesColocation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace geode

namespace geode
{
struct opengeode_inspector_inspector_api
BRepMeshesDegenerationInspectionResult
struct
opengeode_inspector_inspector_api BRepMeshesDegenerationInspectionResult
{
InspectionIssuesMap< index_t > degenerated_edges{
"BRep component meshes with degenerated edges"
Expand All @@ -65,7 +65,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( BRepComponentMeshesDegeneration );

public:
BRepComponentMeshesDegeneration( const BRep& brep );
explicit BRepComponentMeshesDegeneration( const BRep& brep );

~BRepComponentMeshesDegeneration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( EdgedCurveDegeneration );

public:
EdgedCurveDegeneration( const EdgedCurve< dimension >& mesh );
explicit EdgedCurveDegeneration( const EdgedCurve< dimension >& mesh );

~EdgedCurveDegeneration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace geode

namespace geode
{
struct opengeode_inspector_inspector_api
SectionMeshesDegenerationInspectionResult
struct
opengeode_inspector_inspector_api SectionMeshesDegenerationInspectionResult
{
InspectionIssuesMap< index_t > degenerated_edges{
"Section component meshes with degenerated edges"
Expand All @@ -62,7 +62,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SectionComponentMeshesDegeneration );

public:
SectionComponentMeshesDegeneration( const Section& section );
explicit SectionComponentMeshesDegeneration( const Section& section );

~SectionComponentMeshesDegeneration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace geode
OPENGEODE_TEMPLATE_ASSERT_3D( dimension );

public:
SolidMeshDegeneration( const SolidMesh< dimension >& mesh );
explicit SolidMeshDegeneration( const SolidMesh< dimension >& mesh );

~SolidMeshDegeneration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ namespace geode
OPENGEODE_DISABLE_COPY( SurfaceMeshDegeneration );

public:
SurfaceMeshDegeneration( const SurfaceMesh< dimension >& mesh );
explicit SurfaceMeshDegeneration(
const SurfaceMesh< dimension >& mesh );

~SurfaceMeshDegeneration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace geode

namespace geode
{
struct opengeode_inspector_inspector_api
ElementsIntersectionsInspectionResult
struct
opengeode_inspector_inspector_api ElementsIntersectionsInspectionResult
{
InspectionIssues<
std::pair< ComponentMeshElement, ComponentMeshElement > >
Expand All @@ -59,7 +59,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( ModelMeshesIntersections );

public:
ModelMeshesIntersections( const Model& model );
explicit ModelMeshesIntersections( const Model& model );

~ModelMeshesIntersections();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SurfaceCurveIntersections );

public:
SurfaceCurveIntersections(
explicit SurfaceCurveIntersections(
const TriangulatedSurface< dimension >& surface,
const EdgedCurve< dimension >& curve );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( TriangulatedSurfaceIntersections );

public:
TriangulatedSurfaceIntersections(
explicit TriangulatedSurfaceIntersections(
const TriangulatedSurface< dimension >& mesh );

~TriangulatedSurfaceIntersections();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( BRepComponentMeshesManifold );

public:
BRepComponentMeshesManifold( const BRep& brep );
explicit BRepComponentMeshesManifold( const BRep& brep );

~BRepComponentMeshesManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

namespace geode
{
struct opengeode_inspector_inspector_api
SectionMeshesManifoldInspectionResult
struct
opengeode_inspector_inspector_api SectionMeshesManifoldInspectionResult
{
InspectionIssuesMap< index_t > meshes_non_manifold_vertices{
"Section component meshes with non manifold vertices"
Expand All @@ -59,7 +59,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SectionComponentMeshesManifold );

public:
SectionComponentMeshesManifold( const Section& section );
explicit SectionComponentMeshesManifold( const Section& section );

~SectionComponentMeshesManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace geode
OPENGEODE_TEMPLATE_ASSERT_3D( dimension );

public:
SolidMeshEdgeManifold( const SolidMesh< dimension >& mesh );
explicit SolidMeshEdgeManifold( const SolidMesh< dimension >& mesh );

~SolidMeshEdgeManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace geode
OPENGEODE_TEMPLATE_ASSERT_3D( dimension );

public:
SolidMeshFacetManifold( const SolidMesh< dimension >& mesh );
explicit SolidMeshFacetManifold( const SolidMesh< dimension >& mesh );

~SolidMeshFacetManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace geode
OPENGEODE_TEMPLATE_ASSERT_3D( dimension );

public:
SolidMeshVertexManifold( const SolidMesh< dimension >& mesh );
explicit SolidMeshVertexManifold( const SolidMesh< dimension >& mesh );

~SolidMeshVertexManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ namespace geode
OPENGEODE_DISABLE_COPY( SurfaceMeshEdgeManifold );

public:
SurfaceMeshEdgeManifold( const SurfaceMesh< dimension >& mesh );
explicit SurfaceMeshEdgeManifold(
const SurfaceMesh< dimension >& mesh );

~SurfaceMeshEdgeManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ namespace geode
OPENGEODE_DISABLE_COPY( SurfaceMeshVertexManifold );

public:
SurfaceMeshVertexManifold( const SurfaceMesh< dimension >& mesh );
explicit SurfaceMeshVertexManifold(
const SurfaceMesh< dimension >& mesh );

~SurfaceMeshVertexManifold();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace geode
class ColocationImpl
{
protected:
ColocationImpl( const Mesh& mesh );
explicit ColocationImpl( const Mesh& mesh );

public:
bool mesh_has_colocated_points() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace geode
InspectionIssuesMap< PolygonEdge >& issues_map ) const;

protected:
ComponentMeshesAdjacency( const Model& model );
explicit ComponentMeshesAdjacency( const Model& model );

const Model& model() const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace geode
InspectionIssuesMap< index_t >& issues_map ) const;

protected:
ComponentMeshesDegeneration( const Model& model );
explicit ComponentMeshesDegeneration( const Model& model );

const Model& model() const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace geode
InspectionIssuesMap< std::array< index_t, 2 > >& issues_map ) const;

protected:
ComponentMeshesManifold( const Model& model );
explicit ComponentMeshesManifold( const Model& model );

const Model& model() const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace geode
bool edge_is_degenerated( index_t edge_index ) const;

protected:
DegenerationImpl( const Mesh& mesh );
explicit DegenerationImpl( const Mesh& mesh );

const Mesh& mesh() const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SectionMeshesInspector );

public:
SectionMeshesInspector( const Section& section );
explicit SectionMeshesInspector( const Section& section );

SectionMeshesInspectionResult inspect_section_meshes() const;
};
Expand Down
2 changes: 1 addition & 1 deletion include/geode/inspector/edgedcurve_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( EdgedCurveInspector );

public:
EdgedCurveInspector( const EdgedCurve< dimension >& mesh );
explicit EdgedCurveInspector( const EdgedCurve< dimension >& mesh );

EdgedCurveInspectionResult inspect_edged_curve() const;
};
Expand Down
2 changes: 1 addition & 1 deletion include/geode/inspector/mixin/add_inspectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace geode
class AddInspectors : public Inspectors...
{
protected:
AddInspectors( const Mesh& mesh ) : Inspectors{ mesh }... {}
explicit AddInspectors( const Mesh& mesh ) : Inspectors{ mesh }... {}
AddInspectors( AddInspectors&& ) = default;
};
} // namespace geode
2 changes: 1 addition & 1 deletion include/geode/inspector/pointset_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( PointSetInspector );

public:
PointSetInspector( const PointSet< dimension >& mesh );
explicit PointSetInspector( const PointSet< dimension >& mesh );

PointSetInspectionResult inspect_point_set() const;
};
Expand Down
2 changes: 1 addition & 1 deletion include/geode/inspector/section_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace geode
OPENGEODE_DISABLE_COPY( SectionInspector );

public:
SectionInspector( const Section& section );
explicit SectionInspector( const Section& section );

SectionInspectionResult inspect_section() const;
};
Expand Down
2 changes: 1 addition & 1 deletion include/geode/inspector/solid_inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace geode
OPENGEODE_TEMPLATE_ASSERT_3D( dimension );

public:
SolidMeshInspector( const SolidMesh< dimension >& mesh );
explicit SolidMeshInspector( const SolidMesh< dimension >& mesh );
SolidInspectionResult inspect_solid() const;
};
ALIAS_3D( SolidMeshInspector );
Expand Down
Loading

0 comments on commit df48bd0

Please sign in to comment.