... | @@ -7,15 +7,6 @@ |
... | @@ -7,15 +7,6 @@ |
|
* Created on: April 27, 2017
|
|
* Created on: April 27, 2017
|
|
* Author: Mark Alexander Godoy godoyma@email.com
|
|
* Author: Mark Alexander Godoy godoyma@email.com
|
|
*/
|
|
*/
|
|
</code></pre></li></ul></li><li><strong>Header include organization:</strong> 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> "adiosFunctions.h"</li></ol><ul><li>Example:</li></ul><ol><li><ul><li><pre style="border: 0;"><code> #include "ClassName.h"
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include <unistd.h> // write, close
|
|
|
|
#include <sys/ipc.h> // key_t
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include <vector>
|
|
|
|
#include <new> // std::bad_alloc
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include <bzip2.h>
|
|
|
|
#include <zfp.h>
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include "adiosFunctions.h" // IsLittleEndian
|
|
|
|
</code></pre></li></ul></li></ol></li><li>
|
|
|
|
|
|
|
|
<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_
|
|
<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>
|
|
#define ADIOS2_ENGINE_BP_BPFILEWRITER_H_<br><br>
|
... | @@ -32,3 +23,13 @@ |
... | @@ -32,3 +23,13 @@ |
|
#include <stdexcept> //std::invalid_argument
|
|
#include <stdexcept> //std::invalid_argument
|
|
#include <map>
|
|
#include <map>
|
|
</code></pre></li></ul></li></ol></li></ol>
|
|
</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> "adiosFunctions.h"</li></ol><ul><li>Example:</li></ul><ol><li><ul><li><pre style="border: 0;"><code> #include "ClassName.h"
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include <unistd.h> // write, close
|
|
|
|
#include <sys/ipc.h> // key_t
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include <vector>
|
|
|
|
#include <new> // std::bad_alloc
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include <bzip2.h>
|
|
|
|
#include <zfp.h>
|
|
|
|
</code></pre></li><li><pre style="border: 0;"><code> #include "adiosFunctions.h" // IsLittleEndian
|
|
|
|
</code></pre></li></ul></li></ol></li><li> |
|
|
|
\ No newline at end of file |