copyCommand.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00040 
00041 #ifndef COPY_COMMAND_H_
00042 #define COPY_COMMAND_H_
00043 
00044 #include <pcl/apps/point_cloud_editor/command.h>
00045 #include <pcl/apps/point_cloud_editor/localTypes.h>
00046 #include <pcl/apps/point_cloud_editor/copyBuffer.h>
00047 
00048 class CopyCommand : public Command
00049 {
00050   public:
00055     CopyCommand (CopyBufferPtr copy_buffer_ptr,
00056                  ConstSelectionPtr selection_ptr,
00057                  ConstCloudPtr cloud_ptr)
00058       : copy_buffer_ptr_(copy_buffer_ptr), selection_ptr_(selection_ptr),
00059         cloud_ptr_(cloud_ptr)
00060     {
00061       has_undo_ = false;
00062     }
00063 
00065     ~CopyCommand ()
00066     {
00067     }
00068   
00069   protected:
00073     void
00074     execute ()
00075     {
00076       if (!cloud_ptr_)
00077         return;
00078       copy_buffer_ptr_ -> set(cloud_ptr_, *selection_ptr_);
00079     }
00080 
00082     void
00083     undo ()
00084     {
00085       assert(false);
00086     }
00087 
00088   private:
00090     CopyCommand ()
00091     {
00092       assert(false);
00093     }
00094 
00096     CopyCommand (const CopyCommand&)
00097     {
00098       assert(false);
00099     }
00100 
00102     CopyCommand&
00103     operator= (const CopyCommand&)
00104     {
00105       assert(false); return (*this);
00106     }
00107 
00109     CopyBufferPtr copy_buffer_ptr_;
00110 
00112     ConstSelectionPtr selection_ptr_;
00113 
00115     ConstCloudPtr cloud_ptr_;
00116 };
00117 #endif //COPY_COMMAND_H_


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:22:56