image_flip_nodelet.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016  
00017 
00018 //##################
00019 //#### includes ####
00020 
00021 // ROS includes
00022 #include <ros/ros.h>
00023 #include <nodelet/nodelet.h>
00024 
00025 // image flip code
00026 #include <cob_image_flip/image_flip.h>
00027 
00028 // this should really be in the implementation (.cpp file)
00029 #include <pluginlib/class_list_macros.h>
00030 
00031 namespace cob_image_flip
00032 {
00033 class ImageFlipNodelet : public nodelet::Nodelet
00034 {
00035 protected:
00036         ros::NodeHandle node_handle_;
00037         ImageFlip* image_flip_;
00038 
00039 public:
00040 
00041         ImageFlipNodelet()
00042         {
00043                 image_flip_ = 0;
00044         };
00045 
00046         ~ImageFlipNodelet()
00047         {
00048                 if (image_flip_ != 0)
00049                         delete image_flip_;
00050         };
00051 
00052         virtual void onInit()
00053         {
00054                 // Create a handle for this node, initialize node
00055                 node_handle_ = getPrivateNodeHandle();
00056 
00057                 // Create ImageFlip class instance
00058                 image_flip_ = new ImageFlip(node_handle_);
00059         }
00060 };
00061 }
00062 
00063 // watch the capitalization carefully
00064 PLUGINLIB_EXPORT_CLASS(cob_image_flip::ImageFlipNodelet, nodelet::Nodelet)


cob_image_flip
Author(s): Richard Bormann
autogenerated on Fri Mar 15 2019 03:10:14