Skip to content

Commit

Permalink
minimum required to fix third boost::weak_ptr instance
Browse files Browse the repository at this point in the history
  • Loading branch information
aPonza committed Mar 21, 2020
1 parent 881981b commit 4041300
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
#include <QtGui/QColor>
#include <pcl/apps/point_cloud_editor/localTypes.h>
#include <pcl/apps/point_cloud_editor/statistics.h>

#include <pcl/memory.h> // for pcl::weak_ptr

#ifdef OPENGL_IS_A_FRAMEWORK
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
Expand Down Expand Up @@ -75,6 +78,12 @@
class Cloud : public Statistics
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// The type for weak pointer pointing to a selection buffer
using SelectionWeakPtr = pcl::weak_ptr<Selection>;

/// @brief Default Constructor
Cloud ();

Expand All @@ -85,7 +94,7 @@ class Cloud : public Statistics
Cloud (const Cloud& copy);

/// @brief Construct a cloud from a Cloud3D.
/// @details This constructor creates a cloud object with the passed
/// @details This constructor creates a cloud object with the passed
/// cloud object stored with the internal representation. The member
/// variables of this object are initialized but not set.
Cloud (const Cloud3D& cloud, bool register_stats=false);
Expand Down Expand Up @@ -274,12 +283,12 @@ class Cloud : public Statistics
/// @param point the new point to be added.
void
append (const Point3D& point);

/// @brief Appends the points of the passed cloud to this cloud.
/// @param cloud the cloud to be appended to this cloud.
void
append (const Cloud& cloud);

/// @brief Removes the points in selection from the cloud.
/// @details Each indexed point in the selection will be removed from this
/// container.
Expand Down Expand Up @@ -309,7 +318,7 @@ class Cloud : public Statistics
/// @param new_size the new size of the cloud.
void
resize (unsigned int new_size);

/// @brief Removes all points from the cloud and resets the object
void
clear ();
Expand Down Expand Up @@ -412,7 +421,7 @@ class Cloud : public Statistics
/// @brief A weak pointer pointing to the selection object.
/// @details This implementation uses the weak pointer to allow for a lazy
/// update of the cloud if the selection object is destroyed.
std::weak_ptr<Selection> selection_wk_ptr_;
SelectionWeakPtr selection_wk_ptr_;

/// Flag that indicates whether a color ramp should be used (true) or not
/// (false) when displaying the cloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,23 @@
#include <pcl/apps/point_cloud_editor/statisticsDialog.h>
#include <pcl/apps/point_cloud_editor/toolInterface.h>

#include <pcl/memory.h> // for pcl::shared_ptr

#include <QGLWidget>

#include <functional>

class Selection;

/// @brief class declaration for the widget for editing and viewing
/// point clouds.
class CloudEditorWidget : public QGLWidget
{
Q_OBJECT
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param parent a pointer which points to the parent widget
CloudEditorWidget (QWidget *parent = nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@
#include <pcl/apps/point_cloud_editor/localTypes.h>
#include <pcl/apps/point_cloud_editor/copyBuffer.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class Selection;

class CopyCommand : public Command
{
public:
/// The type for shared pointer pointing to a constant selection buffer
using ConstSelectionPtr = pcl::shared_ptr<const Selection>;

/// @brief Constructor
/// @param copy_buffer_ptr a shared pointer pointing to the copy buffer.
/// @param selection_ptr a shared pointer pointing to the selection object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@
#include <pcl/apps/point_cloud_editor/copyBuffer.h>
#include <pcl/apps/point_cloud_editor/selection.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class CutCommand : public Command
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param copy_buffer_ptr a shared pointer pointing to the copy buffer.
/// @param selection_ptr a shared pointer pointing to the selection object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@
#include <pcl/apps/point_cloud_editor/copyBuffer.h>
#include <pcl/apps/point_cloud_editor/selection.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class DeleteCommand : public Command
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param selection_ptr A shared pointer pointing to the selection object.
/// @param cloud_ptr A shared pointer pointing to the cloud object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@
#include <pcl/apps/point_cloud_editor/selection.h>
#include <pcl/apps/point_cloud_editor/copyBuffer.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class DenoiseCommand : public Command
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param selection_ptr a shared pointer pointing to the selection object.
/// @param cloud_ptr a shared pointer pointing to the cloud object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@
#include <pcl/apps/point_cloud_editor/command.h>
#include <pcl/apps/point_cloud_editor/localTypes.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class PasteCommand : public Command
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param copy_buffer_ptr a shared pointer pointing to the copy buffer.
/// @param selection_ptr a shared pointer pointing to the selection object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,16 @@
#include <pcl/apps/point_cloud_editor/toolInterface.h>
#include <pcl/apps/point_cloud_editor/localTypes.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class Selection;

class Select1DTool : public ToolInterface
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param selection_ptr a shared pointer pointing to the selection object.
/// @param cloud_ptr a shared pointer pointing to the cloud object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,24 @@
#include <pcl/apps/point_cloud_editor/toolInterface.h>
#include <pcl/apps/point_cloud_editor/localTypes.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class Selection;

class Select2DTool : public ToolInterface
{
public:
/// The type for shared pointer pointing to a selection buffer
using SelectionPtr = pcl::shared_ptr<Selection>;

/// @brief Constructor
/// @param selection_ptr a shared pointer pointing to the selection object.
/// @param cloud_ptr a shared pointer pointing to the cloud object.
Select2DTool (SelectionPtr selection_ptr, CloudPtr cloud_ptr);

/// @brief Destructor
~Select2DTool ();

/// @brief Initializes the selection tool with the initial mouse screen
/// coordinates and key modifiers. The passed coordinates are used for
/// determining the coordinates of the upper left corner of the rubber band.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
#include <pcl/apps/point_cloud_editor/localTypes.h>
#include <pcl/apps/point_cloud_editor/trackball.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class Selection;

/// @brief The selection transform tool computes the transform matrix from
/// mouse input. It then updates the cloud's transform matrix for the
/// selected points so that the transformed and selected points will be
Expand All @@ -53,6 +57,9 @@
class SelectionTransformTool : public ToolInterface
{
public:
/// The type for shared pointer pointing to a constant selection buffer
using ConstSelectionPtr = pcl::shared_ptr<const Selection>;

/// @brief Constructor
/// @param selection_ptr a shared pointer pointing to the selection object.
/// @param cloud_ptr a shared pointer pointing to the cloud object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@
#include <pcl/apps/point_cloud_editor/localTypes.h>
#include <pcl/apps/point_cloud_editor/cloud.h>

#include <pcl/memory.h> // for pcl::shared_ptr

class Selection;

class TransformCommand : public Command
{
public:
/// The type for shared pointer pointing to a constant selection buffer
using ConstSelectionPtr = pcl::shared_ptr<const Selection>;

/// @brief Constructor
/// @param selection_ptr a shared pointer pointing to the selection object.
/// @param cloud_ptr a shared pointer pointing to the cloud object.
Expand Down

0 comments on commit 4041300

Please sign in to comment.