From d709df552509a0c3044329da4bcc58bcc0de5afb Mon Sep 17 00:00:00 2001 From: Joan Perez Ibarz <jperez@iri.upc.edu> Date: Wed, 1 Jun 2011 16:50:32 +0000 Subject: [PATCH] - removing unnecessary include directories in CMakelists from iri base driver - define attributes of abstract class as protected for inheritance prevention --- CMakeLists.txt | 6 ++--- .../iri_base_algorithm/iri_base_algorithm.h | 23 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb182e3..87a9622 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,9 +19,9 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) # edit the following line to add all the source code files of the library -# SET(sources ./src/iri_base_driver.cpp) +# SET(sources ./src/iri_base_algorithm.cpp) # edit the following line to add all the header files of the library -# SET(headers ./include/iri_base_algorithm/iri_base_algorithm.h) +# SET(headers ./include/iri_base_algorithm.h) # FIND_PACKAGE(iriutils REQUIRED) @@ -33,5 +33,5 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) #rosbuild_add_boost_directories() #rosbuild_link_boost(${PROJECT_NAME} thread) #rosbuild_add_executable(example examples/example.cpp) -# target_link_libraries(${PROJECT_NAME} ${iriutils_LIBRARY}) +#target_link_libraries(${PROJECT_NAME} ${iriutils_LIBRARY}) diff --git a/include/iri_base_algorithm/iri_base_algorithm.h b/include/iri_base_algorithm/iri_base_algorithm.h index 3fd4620..ea4f3f0 100644 --- a/include/iri_base_algorithm/iri_base_algorithm.h +++ b/include/iri_base_algorithm/iri_base_algorithm.h @@ -46,17 +46,18 @@ namespace algorithm_base */ class AbstractAlgorithmNode { - static int ctrl_c_hit_count_; - - static void hupCalled(int sig) - { - ROS_WARN("Unexpected SIGHUP caught. Ignoring it."); - } - - static void sigCalled(int sig) - { - ctrl_c_hit_count_++; - } + protected: + static int ctrl_c_hit_count_; + + static void hupCalled(int sig) + { + ROS_WARN("Unexpected SIGHUP caught. Ignoring it."); + } + + static void sigCalled(int sig) + { + ctrl_c_hit_count_++; + } }; /** -- GitLab