From ce8f5e71a436e5759f739c4cbae5bc0b3b16de38 Mon Sep 17 00:00:00 2001 From: Divyanshu Madan Date: Sun, 3 May 2020 13:28:45 +0530 Subject: [PATCH 1/9] Add header includes order --- doc/advanced/content/pcl_style_guide.rst | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index 3c85d3a184b..a88f02e488b 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -295,6 +295,7 @@ indentation level of the class body and members affected by these qualifiers are } +.. _2.6.-Automatic-code-formatting: 2.6. Automatic code formatting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -323,6 +324,36 @@ Command line usage: $ make format +2.7. Includes +^^^^^^^^^^^^^ + +For consistent usage, headers should be included in the following order with alphabetical grouping ensured: + +1. PCL headers + i. All modular PCL includes, except main includes of common module + #. The main PCL includes of common module +2. Major 3rd-Party components of tests and modules + i. gtest + #. boost + #. Eigen + #. flann +3. Major 3rd-Party components of apps + i. Qt + #. ui\_ + #. vtk +4. Minor 3rd-Party components + i. librealsense + #. ros/message_filters + #. opencv(2) + #. tide + #. thrust + #. OpenGL(UT)/GL(UT) +5. C++ standard library headers (alphabetical) +6. Others + +This style can also be enforced via clang-format. For usage instructions, refer :ref:`2.6.-Automatic-code-formatting`. + + 3. Structuring ============== From ef84d5e3ac9f0f5ecb88b96dc2ed1db522688378 Mon Sep 17 00:00:00 2001 From: divmad Date: Sun, 3 May 2020 14:42:25 +0530 Subject: [PATCH 2/9] github friendly --- doc/advanced/content/pcl_style_guide.rst | 46 +++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index a88f02e488b..f5c78a8095c 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -329,27 +329,31 @@ Command line usage: For consistent usage, headers should be included in the following order with alphabetical grouping ensured: -1. PCL headers - i. All modular PCL includes, except main includes of common module - #. The main PCL includes of common module -2. Major 3rd-Party components of tests and modules - i. gtest - #. boost - #. Eigen - #. flann -3. Major 3rd-Party components of apps - i. Qt - #. ui\_ - #. vtk -4. Minor 3rd-Party components - i. librealsense - #. ros/message_filters - #. opencv(2) - #. tide - #. thrust - #. OpenGL(UT)/GL(UT) -5. C++ standard library headers (alphabetical) -6. Others +1. PCL headers + + i. All modular PCL includes, except main includes of common module + #. The main PCL includes of common module +2. Major 3rd-Party components of tests and modules + + i. gtest + #. boost + #. Eigen + #. flann +3. Major 3rd-Party components of apps + + i. Qt + #. ui\_ + #. vtk +4. Minor 3rd-Party components + + i. librealsense + #. ros/message_filters + #. opencv(2) + #. tide + #. thrust + #. OpenGL(UT)/GL(UT) +5. C++ standard library headers (alphabetical) +6. Others This style can also be enforced via clang-format. For usage instructions, refer :ref:`2.6.-Automatic-code-formatting`. From e74b62ee3a136a4947877a8a05d79b6246df3b64 Mon Sep 17 00:00:00 2001 From: Divyanshu Madan Date: Sun, 3 May 2020 15:13:15 +0530 Subject: [PATCH 3/9] add blank line --- doc/advanced/content/pcl_style_guide.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index f5c78a8095c..e9ceaf56f97 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -296,6 +296,7 @@ indentation level of the class body and members affected by these qualifiers are .. _2.6.-Automatic-code-formatting: + 2.6. Automatic code formatting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 1915afcf876887c6fe1caa6736defcc470fac8ab Mon Sep 17 00:00:00 2001 From: Divyanshu Madan Date: Sun, 3 May 2020 15:37:34 +0530 Subject: [PATCH 4/9] replace with section link --- doc/advanced/content/pcl_style_guide.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index e9ceaf56f97..e729bdf8b0e 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -295,8 +295,6 @@ indentation level of the class body and members affected by these qualifiers are } -.. _2.6.-Automatic-code-formatting: - 2.6. Automatic code formatting ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -356,7 +354,7 @@ For consistent usage, headers should be included in the following order with alp 5. C++ standard library headers (alphabetical) 6. Others -This style can also be enforced via clang-format. For usage instructions, refer :ref:`2.6.-Automatic-code-formatting`. +This style can also be enforced via clang-format. For usage instructions, refer `2.6. Automatic code formatting`_. 3. Structuring From 8ea99e221ee0876ecd9c41621910ad729b17c51b Mon Sep 17 00:00:00 2001 From: Divyanshu Madan <43905892+divmadan@users.noreply.github.com> Date: Sun, 3 May 2020 17:26:24 +0530 Subject: [PATCH 5/9] SunBlack's suggestion Co-authored-by: SunBlack --- doc/advanced/content/pcl_style_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index e729bdf8b0e..1be197ee5d5 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -347,7 +347,7 @@ For consistent usage, headers should be included in the following order with alp i. librealsense #. ros/message_filters - #. opencv(2) + #. opencv/opencv2 #. tide #. thrust #. OpenGL(UT)/GL(UT) From c8f650b4a7860b81dfc3fad97b80982daff0d61a Mon Sep 17 00:00:00 2001 From: Divyanshu Madan <43905892+divmadan@users.noreply.github.com> Date: Sun, 3 May 2020 17:26:45 +0530 Subject: [PATCH 6/9] SunBlack's suggestion Co-authored-by: SunBlack --- doc/advanced/content/pcl_style_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index 1be197ee5d5..6a239e7bdfc 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -341,7 +341,7 @@ For consistent usage, headers should be included in the following order with alp 3. Major 3rd-Party components of apps i. Qt - #. ui\_ + #. ui-files #. vtk 4. Minor 3rd-Party components From 720ec5d302f9de7dbdd738c38b471ce49db55d40 Mon Sep 17 00:00:00 2001 From: Kunal Tyagi Date: Sun, 3 May 2020 22:24:21 +0900 Subject: [PATCH 7/9] Update doc/advanced/content/pcl_style_guide.rst Co-authored-by: SunBlack --- doc/advanced/content/pcl_style_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index 6a239e7bdfc..02258e66dd0 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -350,7 +350,7 @@ For consistent usage, headers should be included in the following order with alp #. opencv/opencv2 #. tide #. thrust - #. OpenGL(UT)/GL(UT) + #. OpenGL, GL & GLUT 5. C++ standard library headers (alphabetical) 6. Others From 1f52a7124c1d4c46b7cb63eaad2c5a8d62cf73a4 Mon Sep 17 00:00:00 2001 From: Divyanshu Madan Date: Thu, 7 May 2020 12:51:04 +0530 Subject: [PATCH 8/9] add examples --- doc/advanced/content/pcl_style_guide.rst | 34 ++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index 02258e66dd0..3097417eb1a 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -330,8 +330,38 @@ For consistent usage, headers should be included in the following order with alp 1. PCL headers - i. All modular PCL includes, except main includes of common module - #. The main PCL includes of common module + i. All modular PCL includes, except main includes of common module. + + Examples: + + .. code-block:: cpp + + #include + + .. code-block:: cpp + + #include + + .. code-block:: cpp + + #include + + #. The main PCL includes of common module. These are the header files in the ``pcl/common/include/pcl/`` directory. + + Examples: + + .. code-block:: cpp + + #include + + .. code-block:: cpp + + #include + + .. code-block:: cpp + + #include + 2. Major 3rd-Party components of tests and modules i. gtest From 3a6fd33abc8b5e7d9b1016d5b0da9ae496bd5c3c Mon Sep 17 00:00:00 2001 From: Divyanshu Madan <43905892+divmadan@users.noreply.github.com> Date: Thu, 7 May 2020 17:05:42 +0530 Subject: [PATCH 9/9] merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sérgio Agostinho --- doc/advanced/content/pcl_style_guide.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/doc/advanced/content/pcl_style_guide.rst b/doc/advanced/content/pcl_style_guide.rst index 3097417eb1a..aafbe48692b 100644 --- a/doc/advanced/content/pcl_style_guide.rst +++ b/doc/advanced/content/pcl_style_guide.rst @@ -337,13 +337,7 @@ For consistent usage, headers should be included in the following order with alp .. code-block:: cpp #include - - .. code-block:: cpp - #include - - .. code-block:: cpp - #include #. The main PCL includes of common module. These are the header files in the ``pcl/common/include/pcl/`` directory. @@ -353,13 +347,7 @@ For consistent usage, headers should be included in the following order with alp .. code-block:: cpp #include - - .. code-block:: cpp - #include - - .. code-block:: cpp - #include 2. Major 3rd-Party components of tests and modules