-
Notifications
You must be signed in to change notification settings - Fork 16
Home
Welcome to the astronomy wiki!
It is important to maintain consistent design, look and feel. Thus, below a few basic guidelines are listed.
First and foremost, make sure you are familiar with the official Boost Library Requirements and Guidelines.
Second, strive for writing idiomatic C++11, clean and elegant code.
Maintain structure your source code files according to the following guidelines:
-
Name files in a meaningful way.
-
In the header, put
#include
guard based on header path and file name#ifndef BOOST_ASTRONOMY_<DIR1>_<DIR2>_<FILE>_HPP #define BOOST_ASTRONOMY_<DIR1>_<DIR2>_<FILE>_HPP ... #endif
-
Make sure each header is self-contained, i.e. that they include all headers they need.
-
All public headers should be placed in
boost/astronomy/
orboost/astronomy/<component>/
. -
All non-public headers should be placed
boost/astronomy/detail
orboost/astronomy/<component>/detail
. -
All public definitions should reside in scope of
namespace boost { namespace astronomy {...}}
. -
All non-public definitions should reside in scope of
namespace boost { namespace astronomy { namespace detail {...}}}
. -
Write your code to fit within 100 columns of text.
-
Use EditorConfig for your editor and enable .editorconfig to:
- Indent with 4 spaces and no tabs.
- Trim any trailing whitespaces.
-
Do not increases the indentation level within namespace.