TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Recommendation:  TT#011

Synopsis:NavKit Specific Guidelines - Include Paths
Language:C++
Severity Level:4
Category:TomTom Guidelines


Description:

NavKit is composed of many modules, as defined at this link When you wish to use the functionality of another subsystem within your system, you will need to be able to accurately find that other modules include files. Inorder to make it predictable on how to find files, we must define some rules and give guidance on where to locate the files.

#include paths shall always begin with the name of the module (e.g. #include "Routing/Implementation/RoutingEngine/Generic/Route.h"). The directory structure that contains the modules is kept independent from the #include directives by adding a small set of top-level include directories. Today, these directories would be: ROOT (for including DataAccess) Engines ClientAPI ExtensionAPI Extensions Framework ProcessHost TestTools

When creating components, the public interface header files should be self sufficient, and be located in the interfaces directory of the component. There shall be no dependendenies from Interface directories to the Implementation directories. If teams change the location of headers inside their module, they need to update references to it in modules that use the header, since this is as a change of the public API. Note though that the public API under the Interfaces directory will likely be flat. Moreover, 'master' headers can pull in other headers and hide their location from clients.

API includes paths that are defined as macros in the CMakeLists.txt will eventually be deprecated, replacing the implicit include paths, with explicit ones referencing the directories that are defined once in the top-level CMakeLists.txt