Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A ADIOS2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 97
    • Issues 97
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Admin message

Admins will be upgrading ORNL GitLab Servers on Monday, 11 Dec 2023, from 5 PM until 7 PM EST. Repositories will experience intermittent outages during this time.

  • Podhorszki, Norbert
  • ADIOS2
  • Wiki
  • File Header Structure and Includes

File Header Structure and Includes · Changes

Page history
Updated File Header Structure and Includes (markdown) authored May 01, 2017 by williamfgc's avatar williamfgc
Hide whitespace changes
Inline Side-by-side
File-Header-Structure-and-Includes.md
View page @ 40acda49
<ol><li><strong>License header:</strong> All files start with the ADIOS2 Apache license header, file name, creation date, and author. Contact information is encouraged. <ul><li><pre style="border: 0;"><code> /**
<ol><li><strong>License header:</strong> All files start with the ADIOS2 Apache license header, file name, creation date, and author. Contact information is encouraged.
<ul><li><pre style="border: 0;"><code> /**
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
......@@ -7,6 +8,7 @@
* Created on: April 27, 2017
* Author: Mark Alexander Godoy godoyma@email.com
*/
</code></pre>
<strong>Include guards:</strong> all headers must have include guards to prevents name conflict. These are place right after the license and at the end of the file. The adopted format includes the relative path in ADIOS. For example, **adios2/engine/bp/BPFileWriter.h** will contain the following include guards:<ol><li><ul><li><pre style="border: 0;"><code>#ifndef ADIOS2_ENGINE_BP_BPFILEWRITER_H_
#define ADIOS2_ENGINE_BP_BPFILEWRITER_H_<br><br>
......@@ -24,7 +26,7 @@
#include &lt;map&gt;
</code></pre></li></ul></li></ol></li></ol>
</code></pre></li></ul></li><li><strong>Header include organization:</strong> Use the following ordering for the included headers: Example for file ClassName.cpp :<ol><li>Corresponding header: ClassName.h </li><li>System C/POSIX Headers <em>e.g.</em> unistd.h, sys/ipc.h</li><li>C++ versions of system C headers <em>e.g.</em> cstdlib, cstring</li><li>System C++ headers <em>e.g.</em> vector, map</li><li>Other library headers <em>e.g.</em> boost, zfp, bzip2, thrust</li><li>Other headers from this library <em>e.g</em> &quot;adiosFunctions.h&quot;</li></ol><ul><li>Example:</li></ul><ol><li><ul><li><pre style="border: 0;"><code> #include &quot;ClassName.h&quot;
</li></ul></li><li><strong>Header include organization:</strong> Use the following ordering for the included headers: Example for file ClassName.cpp :<ol><li>Corresponding header: ClassName.h </li><li>System C/POSIX Headers <em>e.g.</em> unistd.h, sys/ipc.h</li><li>C++ versions of system C headers <em>e.g.</em> cstdlib, cstring</li><li>System C++ headers <em>e.g.</em> vector, map</li><li>Other library headers <em>e.g.</em> boost, zfp, bzip2, thrust</li><li>Other headers from this library <em>e.g</em> &quot;adiosFunctions.h&quot;</li></ol><ul><li>Example:</li></ul><ol><li><ul><li><pre style="border: 0;"><code> #include &quot;ClassName.h&quot;
</code></pre></li><li><pre style="border: 0;"><code> #include &lt;unistd.h&gt; // write, close
#include &lt;sys/ipc.h&gt; // key_t
</code></pre></li><li><pre style="border: 0;"><code> #include &lt;vector&gt;
......
Clone repository
  • ADIOS2 Coding Guidelines
  • ADIOS2 Contributing on GitHub
  • Building and installing with CMake
  • C Interoperability and Type Casting
  • Clang Format Text Style
  • Classes and Structs
  • Exceptions for Error Reporting
  • File Header Structure and Includes
  • Generating Doxygen API documentation
  • Hello ADIOS2 Write Read Example
  • Home
  • Proposed ADIOS2 architecture based on standard OSI 7 layer model
  • RAII Memory Management
  • Setting your Local Repository
  • Submitting Changes
View All Pages