mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
Replace Boost shared pointers
Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -280,7 +280,7 @@ ifcopenshell::geom::brep_element* ifcopenshell::geom::converter::create_brep_for
|
||||
guid,
|
||||
context_string,
|
||||
place,
|
||||
boost::shared_ptr<ifcopenshell::geom::Representation::brep>(shape),
|
||||
std::shared_ptr<ifcopenshell::geom::Representation::brep>(shape),
|
||||
product
|
||||
);
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
#include "../ifcgeom/element.h"
|
||||
|
||||
#include <boost/function.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace ifcopenshell { namespace geom {
|
||||
|
||||
class IFC_GEOM_API converter {
|
||||
public:
|
||||
typedef boost::shared_ptr<ifcopenshell::geom::Representation::brep> brep_ptr;
|
||||
typedef std::shared_ptr<ifcopenshell::geom::Representation::brep> brep_ptr;
|
||||
private:
|
||||
ifcopenshell::geom::abstract_mapping* mapping_;
|
||||
std::unique_ptr<ifcopenshell::geom::kernels::abstract_kernel> kernel_;
|
||||
|
||||
@@ -160,12 +160,12 @@ namespace ifcopenshell::geom {
|
||||
|
||||
class brep_element : public element {
|
||||
private:
|
||||
boost::shared_ptr<ifcopenshell::geom::Representation::brep> _geometry;
|
||||
std::shared_ptr<ifcopenshell::geom::Representation::brep> _geometry;
|
||||
public:
|
||||
const boost::shared_ptr<ifcopenshell::geom::Representation::brep>& geometry_pointer() const { return _geometry; }
|
||||
const std::shared_ptr<ifcopenshell::geom::Representation::brep>& geometry_pointer() const { return _geometry; }
|
||||
const ifcopenshell::geom::Representation::brep& geometry() const { return *_geometry; }
|
||||
brep_element(int id, int parent_id, const std::string& name, const std::string& type, const std::string& guid,
|
||||
const std::string& context, const ifcopenshell::geom::taxonomy::matrix4::ptr& trsf, const boost::shared_ptr<ifcopenshell::geom::Representation::brep>& geometry,
|
||||
const std::string& context, const ifcopenshell::geom::taxonomy::matrix4::ptr& trsf, const std::shared_ptr<ifcopenshell::geom::Representation::brep>& geometry,
|
||||
const express::entity& product)
|
||||
: element(geometry->settings(), id, parent_id, name, type, guid, context, trsf, product)
|
||||
, _geometry(geometry)
|
||||
@@ -182,15 +182,15 @@ namespace ifcopenshell::geom {
|
||||
|
||||
class triangulation_element : public element {
|
||||
private:
|
||||
boost::shared_ptr< ifcopenshell::geom::Representation::triangulation > _geometry;
|
||||
std::shared_ptr< ifcopenshell::geom::Representation::triangulation > _geometry;
|
||||
public:
|
||||
const ifcopenshell::geom::Representation::triangulation& geometry() const { return *_geometry; }
|
||||
const boost::shared_ptr< ifcopenshell::geom::Representation::triangulation>& geometry_pointer() const { return _geometry; }
|
||||
const std::shared_ptr< ifcopenshell::geom::Representation::triangulation>& geometry_pointer() const { return _geometry; }
|
||||
triangulation_element(const ifcopenshell::geom::brep_element& shape_model)
|
||||
: element(shape_model)
|
||||
, _geometry(boost::shared_ptr<ifcopenshell::geom::Representation::triangulation>(new ifcopenshell::geom::Representation::triangulation(shape_model.geometry())))
|
||||
, _geometry(std::make_shared<ifcopenshell::geom::Representation::triangulation>(shape_model.geometry()))
|
||||
{}
|
||||
triangulation_element(const ifcopenshell::geom::element& source, const boost::shared_ptr<ifcopenshell::geom::Representation::triangulation>& geometry)
|
||||
triangulation_element(const ifcopenshell::geom::element& source, const std::shared_ptr<ifcopenshell::geom::Representation::triangulation>& geometry)
|
||||
: element(source)
|
||||
, _geometry(geometry)
|
||||
{}
|
||||
@@ -202,12 +202,12 @@ namespace ifcopenshell::geom {
|
||||
|
||||
class serialized_element : public element {
|
||||
private:
|
||||
boost::shared_ptr<ifcopenshell::geom::Representation::serialization> _geometry;
|
||||
std::shared_ptr<ifcopenshell::geom::Representation::serialization> _geometry;
|
||||
public:
|
||||
const ifcopenshell::geom::Representation::serialization& geometry() const { return *_geometry; }
|
||||
serialized_element(const brep_element& shape_model)
|
||||
: element(shape_model)
|
||||
, _geometry(boost::shared_ptr<ifcopenshell::geom::Representation::serialization>(new ifcopenshell::geom::Representation::serialization(shape_model.geometry())))
|
||||
, _geometry(std::make_shared<ifcopenshell::geom::Representation::serialization>(shape_model.geometry()))
|
||||
{}
|
||||
serialized_element(const serialized_element& other) = default;
|
||||
private:
|
||||
|
||||
@@ -551,7 +551,7 @@ bool ifcopenshell::geom::open_cascade_kernel::convert_impl(const taxonomy::revol
|
||||
// guid,
|
||||
// context_string,
|
||||
// trsf,
|
||||
// boost::shared_ptr<ifcopenshell::geom::Representation::brep>(shape),
|
||||
// std::shared_ptr<ifcopenshell::geom::Representation::brep>(shape),
|
||||
// product
|
||||
// );
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user