From cac42ff0a5e28223079ce426d7d1ca209d41ed6f Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Fri, 9 Feb 2018 13:39:47 -0800 Subject: [PATCH] update include statements and header guards to match new headers --- include/class_loader/class_loader.hpp | 14 ++++++++------ include/class_loader/class_loader_core.hpp | 14 ++++++++------ include/class_loader/exceptions.hpp | 12 +++++++----- include/class_loader/meta_object.hpp | 10 ++++++---- .../class_loader/multi_library_class_loader.hpp | 13 ++++++++----- include/class_loader/register_macro.hpp | 11 +++++------ src/class_loader.cpp | 2 +- src/class_loader_core.cpp | 7 +++++-- src/meta_object.cpp | 4 ++-- src/multi_library_class_loader.cpp | 2 +- test/base.hpp | 6 +++--- test/plugins1.cpp | 4 ++-- test/plugins2.cpp | 4 ++-- test/unique_ptr_test.cpp | 6 +++--- test/utest.cpp | 6 +++--- 15 files changed, 64 insertions(+), 51 deletions(-) diff --git a/include/class_loader/class_loader.hpp b/include/class_loader/class_loader.hpp index d0c41a99..5932781a 100644 --- a/include/class_loader/class_loader.hpp +++ b/include/class_loader/class_loader.hpp @@ -1,4 +1,6 @@ /* + * Software License Agreement (BSD License) + * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * @@ -10,7 +12,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * @@ -27,8 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CLASS_LOADER__CLASS_LOADER_H_ -#define CLASS_LOADER__CLASS_LOADER_H_ +#ifndef CLASS_LOADER__CLASS_LOADER_HPP_ +#define CLASS_LOADER__CLASS_LOADER_HPP_ #include #include @@ -39,8 +41,8 @@ #include "console_bridge/console.h" -#include "class_loader/class_loader_core.h" -#include "class_loader/class_loader_register_macro.h" +#include "class_loader/class_loader_core.hpp" +#include "class_loader/register_macro.hpp" #if __cplusplus >= 201103L #include @@ -315,4 +317,4 @@ class ClassLoader } // namespace class_loader -#endif // CLASS_LOADER__CLASS_LOADER_H_ +#endif // CLASS_LOADER__CLASS_LOADER_HPP_ diff --git a/include/class_loader/class_loader_core.hpp b/include/class_loader/class_loader_core.hpp index afda035c..d2aa62a6 100644 --- a/include/class_loader/class_loader_core.hpp +++ b/include/class_loader/class_loader_core.hpp @@ -1,4 +1,6 @@ /* + * Software License Agreement (BSD License) + * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * @@ -10,7 +12,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * @@ -27,8 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CLASS_LOADER__CLASS_LOADER_CORE_H_ -#define CLASS_LOADER__CLASS_LOADER_CORE_H_ +#ifndef CLASS_LOADER__CLASS_LOADER_CORE_HPP_ +#define CLASS_LOADER__CLASS_LOADER_CORE_HPP_ #include #include @@ -41,8 +43,8 @@ #include "Poco/SharedLibrary.h" -#include "class_loader/meta_object.h" -#include "class_loader/class_loader_exceptions.h" +#include "class_loader/exceptions.hpp" +#include "class_loader/meta_object.hpp" /** * @note This header file is the internal implementation of the plugin system which is exposed via the ClassLoader class @@ -340,4 +342,4 @@ void unloadLibrary(const std::string & library_path, ClassLoader * loader); } // namespace class_loader_private } // namespace class_loader -#endif // CLASS_LOADER__CLASS_LOADER_CORE_H_ +#endif // CLASS_LOADER__CLASS_LOADER_CORE_HPP_ diff --git a/include/class_loader/exceptions.hpp b/include/class_loader/exceptions.hpp index 1eaa358f..ad652a36 100644 --- a/include/class_loader/exceptions.hpp +++ b/include/class_loader/exceptions.hpp @@ -1,4 +1,6 @@ /* + * Software License Agreement (BSD License) + * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * @@ -10,7 +12,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * @@ -27,10 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CLASS_LOADER__CLASS_LOADER_EXCEPTIONS_H_ -#define CLASS_LOADER__CLASS_LOADER_EXCEPTIONS_H_ +#ifndef CLASS_LOADER__EXCEPTIONS_HPP_ +#define CLASS_LOADER__EXCEPTIONS_HPP_ -#include +#include #include namespace class_loader @@ -92,4 +94,4 @@ class NoClassLoaderExistsException : public ClassLoaderException }; } // namespace class_loader -#endif // CLASS_LOADER__CLASS_LOADER_EXCEPTIONS_H_ +#endif // CLASS_LOADER__EXCEPTIONS_HPP_ diff --git a/include/class_loader/meta_object.hpp b/include/class_loader/meta_object.hpp index dcf9659f..5cc80c24 100644 --- a/include/class_loader/meta_object.hpp +++ b/include/class_loader/meta_object.hpp @@ -1,4 +1,6 @@ /* + * Software License Agreement (BSD License) + * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * @@ -10,7 +12,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * @@ -30,8 +32,8 @@ // Note: This header defines a simplication of Poco::MetaObject // that allows us to tag MetaObjects with an associated library name. -#ifndef CLASS_LOADER__META_OBJECT_H_ -#define CLASS_LOADER__META_OBJECT_H_ +#ifndef CLASS_LOADER__META_OBJECT_HPP_ +#define CLASS_LOADER__META_OBJECT_HPP_ #include #include @@ -198,4 +200,4 @@ class MetaObject : public AbstractMetaObject } // namespace class_loader_private } // namespace class_loader -#endif // CLASS_LOADER__META_OBJECT_H_ +#endif // CLASS_LOADER__META_OBJECT_HPP_ diff --git a/include/class_loader/multi_library_class_loader.hpp b/include/class_loader/multi_library_class_loader.hpp index e43d765b..d570edf8 100644 --- a/include/class_loader/multi_library_class_loader.hpp +++ b/include/class_loader/multi_library_class_loader.hpp @@ -1,4 +1,6 @@ /* + * Software License Agreement (BSD License) + * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * @@ -10,7 +12,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * @@ -27,8 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CLASS_LOADER__MULTI_LIBRARY_CLASS_LOADER_H_ -#define CLASS_LOADER__MULTI_LIBRARY_CLASS_LOADER_H_ +#ifndef CLASS_LOADER__MULTI_LIBRARY_CLASS_LOADER_HPP_ +#define CLASS_LOADER__MULTI_LIBRARY_CLASS_LOADER_HPP_ #include #include @@ -36,7 +38,8 @@ #include #include -#include "class_loader/class_loader.h" +#include "console_bridge/console.h" +#include "class_loader/class_loader.hpp" namespace class_loader { @@ -324,4 +327,4 @@ class MultiLibraryClassLoader } // namespace class_loader -#endif // CLASS_LOADER__MULTI_LIBRARY_CLASS_LOADER_H_ +#endif // CLASS_LOADER__MULTI_LIBRARY_CLASS_LOADER_HPP_ diff --git a/include/class_loader/register_macro.hpp b/include/class_loader/register_macro.hpp index 21da5c1d..35bacf0f 100644 --- a/include/class_loader/register_macro.hpp +++ b/include/class_loader/register_macro.hpp @@ -10,7 +10,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * @@ -27,13 +27,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CLASS_LOADER__CLASS_LOADER_REGISTER_MACRO_H_ -#define CLASS_LOADER__CLASS_LOADER_REGISTER_MACRO_H_ +#ifndef CLASS_LOADER__REGISTER_MACRO_HPP_ +#define CLASS_LOADER__REGISTER_MACRO_HPP_ #include -#include "class_loader/class_loader_core.h" - +#include "class_loader/class_loader_core.hpp" #include "console_bridge/console.h" #define CLASS_LOADER_REGISTER_CLASS_INTERNAL_WITH_MESSAGE(Derived, Base, UniqueID, Message) \ @@ -70,4 +69,4 @@ #define CLASS_LOADER_REGISTER_CLASS(Derived, Base) \ CLASS_LOADER_REGISTER_CLASS_WITH_MESSAGE(Derived, Base, "") -#endif // CLASS_LOADER__CLASS_LOADER_REGISTER_MACRO_H_ +#endif // CLASS_LOADER__REGISTER_MACRO_HPP_ diff --git a/src/class_loader.cpp b/src/class_loader.cpp index 7a9f4bda..f013bc17 100644 --- a/src/class_loader.cpp +++ b/src/class_loader.cpp @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "class_loader/class_loader.h" +#include "class_loader/class_loader.hpp" #include diff --git a/src/class_loader_core.cpp b/src/class_loader_core.cpp index f9885ee9..1985b13e 100644 --- a/src/class_loader_core.cpp +++ b/src/class_loader_core.cpp @@ -27,8 +27,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "class_loader/class_loader_core.h" -#include "class_loader/class_loader.h" +#include "class_loader/class_loader_core.hpp" +#include "class_loader/class_loader.hpp" + +#include + #include #include #include diff --git a/src/meta_object.cpp b/src/meta_object.cpp index 60879978..cdf844d0 100644 --- a/src/meta_object.cpp +++ b/src/meta_object.cpp @@ -29,8 +29,8 @@ #include -#include "class_loader/meta_object.h" -#include "class_loader/class_loader.h" +#include "class_loader/meta_object.hpp" +#include "class_loader/class_loader.hpp" namespace class_loader { diff --git a/src/multi_library_class_loader.cpp b/src/multi_library_class_loader.cpp index 5a8cf1ff..b14ee37d 100644 --- a/src/multi_library_class_loader.cpp +++ b/src/multi_library_class_loader.cpp @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "class_loader/multi_library_class_loader.h" +#include "class_loader/multi_library_class_loader.hpp" #include #include diff --git a/test/base.hpp b/test/base.hpp index f714f2df..2d12524e 100644 --- a/test/base.hpp +++ b/test/base.hpp @@ -27,8 +27,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef BASE_H_ -#define BASE_H_ +#ifndef BASE_HPP_ +#define BASE_HPP_ class Base { @@ -37,4 +37,4 @@ class Base virtual void saySomething() = 0; }; -#endif // BASE_H_ +#endif // BASE_HPP_ diff --git a/test/plugins1.cpp b/test/plugins1.cpp index 0ed7d486..0c608110 100644 --- a/test/plugins1.cpp +++ b/test/plugins1.cpp @@ -29,9 +29,9 @@ #include -#include "class_loader/class_loader.h" +#include "class_loader/class_loader.hpp" -#include "./base.h" +#include "./base.hpp" class Dog : public Base { diff --git a/test/plugins2.cpp b/test/plugins2.cpp index 5347111f..6cb60743 100644 --- a/test/plugins2.cpp +++ b/test/plugins2.cpp @@ -29,9 +29,9 @@ #include -#include "class_loader/class_loader.h" +#include "class_loader/class_loader.hpp" -#include "./base.h" +#include "./base.hpp" class Robot : public Base { diff --git a/test/unique_ptr_test.cpp b/test/unique_ptr_test.cpp index 0857cff6..ef22427b 100644 --- a/test/unique_ptr_test.cpp +++ b/test/unique_ptr_test.cpp @@ -28,8 +28,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#include +#include +#include #include #include @@ -40,7 +40,7 @@ #include #include -#include "./base.h" +#include "./base.hpp" const std::string LIBRARY_1 = class_loader::systemLibraryFormat("class_loader_TestPlugins1"); // NOLINT const std::string LIBRARY_2 = class_loader::systemLibraryFormat("class_loader_TestPlugins2"); // NOLINT diff --git a/test/utest.cpp b/test/utest.cpp index 67405141..7d6f7fe5 100644 --- a/test/utest.cpp +++ b/test/utest.cpp @@ -34,12 +34,12 @@ #include #include -#include "class_loader/class_loader.h" -#include "class_loader/multi_library_class_loader.h" +#include "class_loader/class_loader.hpp" +#include "class_loader/multi_library_class_loader.hpp" #include "gtest/gtest.h" -#include "./base.h" +#include "./base.hpp" const std::string LIBRARY_1 = class_loader::systemLibraryFormat("class_loader_TestPlugins1"); // NOLINT const std::string LIBRARY_2 = class_loader::systemLibraryFormat("class_loader_TestPlugins2"); // NOLINT