Skip to content

Commit

Permalink
Updates .h disclaimer with more info. Regenerates headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
TSNoble committed Nov 28, 2024
1 parent a10a31a commit 04f375f
Show file tree
Hide file tree
Showing 376 changed files with 4,143 additions and 1,128 deletions.
21 changes: 18 additions & 3 deletions moveit/scripts/create_deprecated_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
from pathlib import Path


DISCLAIMER = """
/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via {},
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
"""


class NoIncludeGuard(Exception):
ERROR = "No include guard found in {}.hpp. Unable to generate pretext."

Expand Down Expand Up @@ -86,13 +101,13 @@ class DeprecatedHeader:
def __init__(self, hpp: HppFile):
self.hpp = hpp
self.path = hpp.path.with_suffix(".h")
self.prefix = f"/* This file was autogenerated by {Path(__file__).name} */"
self.warn = '#pragma message(".h header is obsolete. Please use the .hpp header instead.")'
self.contents = self.contents()

def contents(self) -> str:
items = [self.prefix, self.hpp.pretext, self.warn, self.hpp.include]
return "\n\n".join(items) + "\n"
disclaimer = DISCLAIMER.format(Path(__file__).name).rstrip("\n")
items = [disclaimer, self.hpp.pretext, self.warn, self.hpp.include]
return "\n".join(items) + "\n"


class HeaderSummary:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Acorn Pooley, Ioan Sucan */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/allvalid/collision_detector_allocator_allvalid.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan, Jia Pan, Jens Petit */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/allvalid/collision_env_allvalid.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_common.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Acorn Pooley, Ioan Sucan */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_detector_allocator.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan, Jens Petit */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_env.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan, E. Gil Jones */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_matrix.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Adam Leeper */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_octomap_filter.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -35,7 +45,5 @@
*********************************************************************/

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_plugin.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -35,7 +45,5 @@
*********************************************************************/

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_plugin_cache.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/collision_tools.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan, Jon Binney */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/occupancy_map.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Jens Petit */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/test_collision_common_panda.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: E. Gil Jones */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/test_collision_common_pr2.hpp>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* This file was autogenerated by create_deprecated_headers.py */

/*********************************************************************
* All MoveIt 2 headers have been updated to use the .hpp extension.
*
* .h headers are now autogenerated via create_deprecated_headers.py,
* and will import the corresponding .hpp with a deprecation warning.
*
* imports via .h files may be removed in future releases, so please
* modify your imports to use the corresponding .hpp imports.
*
* See https://github.com/moveit/moveit2/pull/3113 for extra details.
*********************************************************************/
/*********************************************************************
* Software License Agreement (BSD License)
*
Expand Down Expand Up @@ -37,7 +47,5 @@
/* Author: Ioan Sucan, Acorn Pooley, Sachin Chitta */

#pragma once

#pragma message(".h header is obsolete. Please use the .hpp header instead.")

#include <moveit/collision_detection/world.hpp>
Loading

0 comments on commit 04f375f

Please sign in to comment.