#include <pasteCommand.h>
Public Member Functions | |
PasteCommand (ConstCopyBufferPtr copy_buffer_ptr, SelectionPtr selection_ptr, CloudPtr cloud_ptr) | |
Constructor. | |
~PasteCommand () | |
Destructor. | |
Protected Member Functions | |
void | execute () |
Appends the points in the copy buffer into the cloud. | |
void | undo () |
Removes the points that were pasted to the cloud. | |
Private Member Functions | |
PasteCommand & | operator= (const PasteCommand &) |
Equal operator - commands are non-copyable. | |
PasteCommand () | |
Default constructor - object is not default constructable. | |
PasteCommand (const PasteCommand &) | |
Copy constructor - commands are non-copyable. | |
Private Attributes | |
CloudPtr | cloud_ptr_ |
a pointer pointing to the cloud | |
ConstCopyBufferPtr | copy_buffer_ptr_ |
a pointer pointing to the copy buffer. | |
unsigned int | prev_cloud_size_ |
SelectionPtr | selection_ptr_ |
A shared pointer pointing to the selection object. |
Definition at line 48 of file pasteCommand.h.
PasteCommand::PasteCommand | ( | ConstCopyBufferPtr | copy_buffer_ptr, |
SelectionPtr | selection_ptr, | ||
CloudPtr | cloud_ptr | ||
) |
Constructor.
copy_buffer_ptr | a shared pointer pointing to the copy buffer. |
selection_ptr | a shared pointer pointing to the selection object. |
cloud_ptr | a shared pointer pointing to the cloud object. |
Definition at line 46 of file pasteCommand.cpp.
PasteCommand::~PasteCommand | ( | ) | [inline] |
Destructor.
Definition at line 60 of file pasteCommand.h.
PasteCommand::PasteCommand | ( | ) | [inline, private] |
Default constructor - object is not default constructable.
Definition at line 78 of file pasteCommand.h.
PasteCommand::PasteCommand | ( | const PasteCommand & | ) | [inline, private] |
Copy constructor - commands are non-copyable.
Definition at line 83 of file pasteCommand.h.
void PasteCommand::execute | ( | ) | [protected, virtual] |
Appends the points in the copy buffer into the cloud.
After appending the points to the cloud, this function also updates the selection object to point to the newly pasted points. This also updates the selection object to point to the newly pasted points.
Implements Command.
Definition at line 55 of file pasteCommand.cpp.
PasteCommand& PasteCommand::operator= | ( | const PasteCommand & | ) | [inline, private] |
Equal operator - commands are non-copyable.
Definition at line 90 of file pasteCommand.h.
void PasteCommand::undo | ( | ) | [protected, virtual] |
Removes the points that were pasted to the cloud.
Implements Command.
Definition at line 74 of file pasteCommand.cpp.
CloudPtr PasteCommand::cloud_ptr_ [private] |
a pointer pointing to the cloud
Definition at line 104 of file pasteCommand.h.
a pointer pointing to the copy buffer.
Definition at line 107 of file pasteCommand.h.
unsigned int PasteCommand::prev_cloud_size_ [private] |
The size of the cloud before new points are pasted. This value is used to mark the point where points were added to the cloud. In order to support undo, one only has to resize the cloud using this value.
Definition at line 98 of file pasteCommand.h.
SelectionPtr PasteCommand::selection_ptr_ [private] |
A shared pointer pointing to the selection object.
Definition at line 101 of file pasteCommand.h.