https://docs.opendap.org/index.php?title=Include_files_for_libdap&feed=atom&action=historyInclude files for libdap - Revision history2024-03-29T12:59:34ZRevision history for this page on the wikiMediaWiki 1.38.4https://docs.opendap.org/index.php?title=Include_files_for_libdap&diff=13095&oldid=prevJimg: Created page with "= Guidelines for including headers = In our code that uses ''libdap'', we should make sure to prefix the libdap headers that are included with <pre>libdap/</pre> like this:..."2021-11-24T17:49:19Z<p>Created page with "= Guidelines for including headers = In our code that uses ''libdap'', we should make sure to prefix the libdap headers that are included with <pre>libdap/</pre> like this:..."</p>
<p><b>New page</b></p><div>= Guidelines for including headers =<br />
<br />
In our code that uses ''libdap'', we should make sure to prefix the libdap headers that are included with <pre>libdap/</pre> like this:<br />
<br />
#include <libdap/BaseType><br />
<br />
This is because some of the names used by the libdap headers are also used by C++ or the STL or are close enough to those names to cause problems with various software development tools.<br />
<br />
It's best to use double quotes for headers from within a project and angle brackets for those from outside the project. So, use angle brackets with libdap headers in the BES code; use double quotes for BES headers in the BES code.<br />
<br />
Group headers like this: <br />
* First include "config.h"<br />
* Then system headers<br />
* Then C/C++ library headers<br />
* Then libraries (like libdap)<br />
* Then BES headers<br />
<br />
Never include <pre>config.h</pre> in a header that will be installed (which is essentially every header).<br />
<br />
Minimise headers included in other headers.<br />
<br />
Never put <pre>using namespace xxx</pre> in a header - it's a great way to cut down on the wordiness of an implementation (.cc) but in a header it will introduce that ''using'' statement to all of the code that directly or indirectly includes the header.</div>Jimg