<commit_before>.. _pcl_style_guide:

PCL C++ Programming Style Guide
-------------------------------

To make sure that all code in PCL is coherent and easily understood by other
developers and users, we follow a set of strict rules that everyone should
adopt. These rules are not to be broken unless there is a very good reason to
do so. Changes to these rules are always possible, but the person proposing and
changing a rule will have the unfortunate task to go and apply the rule change
to all the existing code.

1. Chapter 1 -- Naming
----------------------

1.1 Files

All files should be **under_scored**.

 * Header files have the extension **.h**
 * Templated implementation files have the extension **.hpp**
 * Source files have the extension **.cpp**


1.2 Directories

All directories and subdirectories should be **under_scored**.

 * Header files should go under **include/**
 * Templated implementation files should go under **include/impl/**
 * Source files should go under **src/**


1.3 Classes / Structs

Class names (and other type names) should be **CamelCased**, e.g.:

.. code-block:: cpp

  class ExampleClass;

Exception: if the class name contains a short acronym, the acronym itself
should be all capitals, e.g.:

.. code-block:: cpp

  class PFHEstimation;


1.4 Functions / Methods

Functions and class method names should be **camelCased**, and arguments are
**under_scored**, e.g.:

.. code-block:: cpp

  int 
  exampleMethod (int example_arg);

Functions and methods usually performs an action, so the name should make clear
what it does: checkForErrors() instead of errorCheck(), dumpDataToFile()
instead of dataFile(). Classes are often nouns. By making function names verbs
and following other naming conventions programs can be read more naturally.


1.5 Variables

Variable names should be **under_scored**.

.. code-block:: cpp

  int my_variable;

1.5.1 Iterators

Iterator variables should indicate what they're iterating over, e.g.:

.. code-block:: cpp

  std::list<int> pid_list;
  std::list<int>::iterator pid_it;<commit_msg>css test<commit_after>.. _pcl_style_guide:

PCL C++ Programming Style Guide
-------------------------------

To make sure that all code in PCL is coherent and easily understood by other
developers and users, we follow a set of strict rules that everyone should
adopt. These rules are not to be broken unless there is a very good reason to
do so. Changes to these rules are always possible, but the person proposing and
changing a rule will have the unfortunate task to go and apply the rule change
to all the existing code.

1. Chapter 1 -- Naming
======================

1.1 Files
^^^^^^^^^

All files should be **under_scored**.

 * Header files have the extension **.h**
 * Templated implementation files have the extension **.hpp**
 * Source files have the extension **.cpp**


1.2 Directories
"""""""""""""""

All directories and subdirectories should be **under_scored**.

 * Header files should go under **include/**
 * Templated implementation files should go under **include/impl/**
 * Source files should go under **src/**


1.3 Classes / Structs
"""""""""""""""""""""

Class names (and other type names) should be **CamelCased**, e.g.:

.. code-block:: cpp

  class ExampleClass;

Exception: if the class name contains a short acronym, the acronym itself
should be all capitals, e.g.:

.. code-block:: cpp

  class PFHEstimation;


1.4 Functions / Methods
"""""""""""""""""""""""

Functions and class method names should be **camelCased**, and arguments are
**under_scored**, e.g.:

.. code-block:: cpp

  int 
  exampleMethod (int example_arg);

Functions and methods usually performs an action, so the name should make clear
what it does: checkForErrors() instead of errorCheck(), dumpDataToFile()
instead of dataFile(). Classes are often nouns. By making function names verbs
and following other naming conventions programs can be read more naturally.


1.5 Variables
"""""""""""""

Variable names should be **under_scored**.

.. code-block:: cpp

  int my_variable;

1.5.1 Iterators

Iterator variables should indicate what they're iterating over, e.g.:

.. code-block:: cpp

  std::list<int> pid_list;
  std::list<int>::iterator pid_it;
{'fraction_non_alphanumeric': 0.12384560738811272, 'fraction_numerical': 0.007103954534690978, 'mean_word_length': 3.772881355932203, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4319478', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1154, 'n_words': 550}