Skip to content

Commit 4041300

Browse files
committed
minimum required to fix third boost::weak_ptr instance
1 parent 881981b commit 4041300

11 files changed

Lines changed: 77 additions & 6 deletions

File tree

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/cloud.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
#include <QtGui/QColor>
4545
#include <pcl/apps/point_cloud_editor/localTypes.h>
4646
#include <pcl/apps/point_cloud_editor/statistics.h>
47+
48+
#include <pcl/memory.h> // for pcl::weak_ptr
49+
4750
#ifdef OPENGL_IS_A_FRAMEWORK
4851
# include <OpenGL/gl.h>
4952
# include <OpenGL/glu.h>
@@ -75,6 +78,12 @@
7578
class Cloud : public Statistics
7679
{
7780
public:
81+
/// The type for shared pointer pointing to a selection buffer
82+
using SelectionPtr = pcl::shared_ptr<Selection>;
83+
84+
/// The type for weak pointer pointing to a selection buffer
85+
using SelectionWeakPtr = pcl::weak_ptr<Selection>;
86+
7887
/// @brief Default Constructor
7988
Cloud ();
8089

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

8796
/// @brief Construct a cloud from a Cloud3D.
88-
/// @details This constructor creates a cloud object with the passed
97+
/// @details This constructor creates a cloud object with the passed
8998
/// cloud object stored with the internal representation. The member
9099
/// variables of this object are initialized but not set.
91100
Cloud (const Cloud3D& cloud, bool register_stats=false);
@@ -274,12 +283,12 @@ class Cloud : public Statistics
274283
/// @param point the new point to be added.
275284
void
276285
append (const Point3D& point);
277-
286+
278287
/// @brief Appends the points of the passed cloud to this cloud.
279288
/// @param cloud the cloud to be appended to this cloud.
280289
void
281290
append (const Cloud& cloud);
282-
291+
283292
/// @brief Removes the points in selection from the cloud.
284293
/// @details Each indexed point in the selection will be removed from this
285294
/// container.
@@ -309,7 +318,7 @@ class Cloud : public Statistics
309318
/// @param new_size the new size of the cloud.
310319
void
311320
resize (unsigned int new_size);
312-
321+
313322
/// @brief Removes all points from the cloud and resets the object
314323
void
315324
clear ();
@@ -412,7 +421,7 @@ class Cloud : public Statistics
412421
/// @brief A weak pointer pointing to the selection object.
413422
/// @details This implementation uses the weak pointer to allow for a lazy
414423
/// update of the cloud if the selection object is destroyed.
415-
std::weak_ptr<Selection> selection_wk_ptr_;
424+
SelectionWeakPtr selection_wk_ptr_;
416425

417426
/// Flag that indicates whether a color ramp should be used (true) or not
418427
/// (false) when displaying the cloud

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/cloudEditorWidget.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,23 @@
4747
#include <pcl/apps/point_cloud_editor/statisticsDialog.h>
4848
#include <pcl/apps/point_cloud_editor/toolInterface.h>
4949

50+
#include <pcl/memory.h> // for pcl::shared_ptr
51+
5052
#include <QGLWidget>
5153

5254
#include <functional>
5355

56+
class Selection;
57+
5458
/// @brief class declaration for the widget for editing and viewing
5559
/// point clouds.
5660
class CloudEditorWidget : public QGLWidget
5761
{
5862
Q_OBJECT
5963
public:
64+
/// The type for shared pointer pointing to a selection buffer
65+
using SelectionPtr = pcl::shared_ptr<Selection>;
66+
6067
/// @brief Constructor
6168
/// @param parent a pointer which points to the parent widget
6269
CloudEditorWidget (QWidget *parent = nullptr);

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/copyCommand.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@
4444
#include <pcl/apps/point_cloud_editor/localTypes.h>
4545
#include <pcl/apps/point_cloud_editor/copyBuffer.h>
4646

47+
#include <pcl/memory.h> // for pcl::shared_ptr
48+
49+
class Selection;
50+
4751
class CopyCommand : public Command
4852
{
4953
public:
54+
/// The type for shared pointer pointing to a constant selection buffer
55+
using ConstSelectionPtr = pcl::shared_ptr<const Selection>;
56+
5057
/// @brief Constructor
5158
/// @param copy_buffer_ptr a shared pointer pointing to the copy buffer.
5259
/// @param selection_ptr a shared pointer pointing to the selection object.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/cutCommand.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@
4545
#include <pcl/apps/point_cloud_editor/copyBuffer.h>
4646
#include <pcl/apps/point_cloud_editor/selection.h>
4747

48+
#include <pcl/memory.h> // for pcl::shared_ptr
49+
4850
class CutCommand : public Command
4951
{
5052
public:
53+
/// The type for shared pointer pointing to a selection buffer
54+
using SelectionPtr = pcl::shared_ptr<Selection>;
55+
5156
/// @brief Constructor
5257
/// @param copy_buffer_ptr a shared pointer pointing to the copy buffer.
5358
/// @param selection_ptr a shared pointer pointing to the selection object.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/deleteCommand.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@
4545
#include <pcl/apps/point_cloud_editor/copyBuffer.h>
4646
#include <pcl/apps/point_cloud_editor/selection.h>
4747

48+
#include <pcl/memory.h> // for pcl::shared_ptr
49+
4850
class DeleteCommand : public Command
4951
{
5052
public:
53+
/// The type for shared pointer pointing to a selection buffer
54+
using SelectionPtr = pcl::shared_ptr<Selection>;
55+
5156
/// @brief Constructor
5257
/// @param selection_ptr A shared pointer pointing to the selection object.
5358
/// @param cloud_ptr A shared pointer pointing to the cloud object.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/denoiseCommand.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@
4747
#include <pcl/apps/point_cloud_editor/selection.h>
4848
#include <pcl/apps/point_cloud_editor/copyBuffer.h>
4949

50+
#include <pcl/memory.h> // for pcl::shared_ptr
51+
5052
class DenoiseCommand : public Command
5153
{
5254
public:
55+
/// The type for shared pointer pointing to a selection buffer
56+
using SelectionPtr = pcl::shared_ptr<Selection>;
57+
5358
/// @brief Constructor
5459
/// @param selection_ptr a shared pointer pointing to the selection object.
5560
/// @param cloud_ptr a shared pointer pointing to the cloud object.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/pasteCommand.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@
4343
#include <pcl/apps/point_cloud_editor/command.h>
4444
#include <pcl/apps/point_cloud_editor/localTypes.h>
4545

46+
#include <pcl/memory.h> // for pcl::shared_ptr
47+
4648
class PasteCommand : public Command
4749
{
4850
public:
51+
/// The type for shared pointer pointing to a selection buffer
52+
using SelectionPtr = pcl::shared_ptr<Selection>;
53+
4954
/// @brief Constructor
5055
/// @param copy_buffer_ptr a shared pointer pointing to the copy buffer.
5156
/// @param selection_ptr a shared pointer pointing to the selection object.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/select1DTool.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@
4242
#include <pcl/apps/point_cloud_editor/toolInterface.h>
4343
#include <pcl/apps/point_cloud_editor/localTypes.h>
4444

45+
#include <pcl/memory.h> // for pcl::shared_ptr
46+
47+
class Selection;
48+
4549
class Select1DTool : public ToolInterface
4650
{
4751
public:
52+
/// The type for shared pointer pointing to a selection buffer
53+
using SelectionPtr = pcl::shared_ptr<Selection>;
54+
4855
/// @brief Constructor
4956
/// @param selection_ptr a shared pointer pointing to the selection object.
5057
/// @param cloud_ptr a shared pointer pointing to the cloud object.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/select2DTool.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,24 @@
4444
#include <pcl/apps/point_cloud_editor/toolInterface.h>
4545
#include <pcl/apps/point_cloud_editor/localTypes.h>
4646

47+
#include <pcl/memory.h> // for pcl::shared_ptr
48+
49+
class Selection;
50+
4751
class Select2DTool : public ToolInterface
4852
{
4953
public:
54+
/// The type for shared pointer pointing to a selection buffer
55+
using SelectionPtr = pcl::shared_ptr<Selection>;
56+
5057
/// @brief Constructor
5158
/// @param selection_ptr a shared pointer pointing to the selection object.
5259
/// @param cloud_ptr a shared pointer pointing to the cloud object.
5360
Select2DTool (SelectionPtr selection_ptr, CloudPtr cloud_ptr);
5461

5562
/// @brief Destructor
5663
~Select2DTool ();
57-
64+
5865
/// @brief Initializes the selection tool with the initial mouse screen
5966
/// coordinates and key modifiers. The passed coordinates are used for
6067
/// determining the coordinates of the upper left corner of the rubber band.

apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/selectionTransformTool.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
#include <pcl/apps/point_cloud_editor/localTypes.h>
4444
#include <pcl/apps/point_cloud_editor/trackball.h>
4545

46+
#include <pcl/memory.h> // for pcl::shared_ptr
47+
48+
class Selection;
49+
4650
/// @brief The selection transform tool computes the transform matrix from
4751
/// mouse input. It then updates the cloud's transform matrix for the
4852
/// selected points so that the transformed and selected points will be
@@ -53,6 +57,9 @@
5357
class SelectionTransformTool : public ToolInterface
5458
{
5559
public:
60+
/// The type for shared pointer pointing to a constant selection buffer
61+
using ConstSelectionPtr = pcl::shared_ptr<const Selection>;
62+
5663
/// @brief Constructor
5764
/// @param selection_ptr a shared pointer pointing to the selection object.
5865
/// @param cloud_ptr a shared pointer pointing to the cloud object.

0 commit comments

Comments
 (0)