Commit d53bffff authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

removed contrib directory and corrected the contribution guides

parent 4d1ed98d
Pipeline #918 passed with stage
in 6 minutes and 50 seconds
...@@ -13,6 +13,8 @@ This style-guide is intended for developers writing code for AMDiS, is not compl ...@@ -13,6 +13,8 @@ This style-guide is intended for developers writing code for AMDiS, is not compl
Parts of this convention are taken from well established style guides, like the *Google C++ Style Guide*. Parts of this convention are taken from well established style guides, like the *Google C++ Style Guide*.
In general, the code should follow the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines).
## File naming conventions ## File naming conventions
Filenames should be mixed lower and upper case, starting with an uppercase letter. They should not include underscores or dashed. Use an uppercase letter to indicate a new subword. Sourcefiles should end in `.cpp` and header files should end in `.hpp`. In case you move the code of a template class to a separate file, included textually at the end of the corresponding header file, use the extensions `.inc.hpp`. Filenames should be mixed lower and upper case, starting with an uppercase letter. They should not include underscores or dashed. Use an uppercase letter to indicate a new subword. Sourcefiles should end in `.cpp` and header files should end in `.hpp`. In case you move the code of a template class to a separate file, included textually at the end of the corresponding header file, use the extensions `.inc.hpp`.
...@@ -26,19 +28,19 @@ Examples of valid filenames: ...@@ -26,19 +28,19 @@ Examples of valid filenames:
* `DOFVector.cpp` * `DOFVector.cpp`
* `DOFVector.inc.hpp` (the implementation of the methods of the template class `DOFVector<T>`) * `DOFVector.inc.hpp` (the implementation of the methods of the template class `DOFVector<T>`)
Do not use filenames that already exist in /usr/include or are stdandard C/C++ include files, such as `math.h` (remember that windows files-systems are case insensitive and thus, there is not difference between `math.h` and `Math.H`.) Do not use filenames that already exist in /usr/include or are stdandard C/C++ include files, such as `math.h` (remember that windows files-systems are case insensitive and thus, there is no difference between `math.h` and `Math.H`.)
## Generale file structure ## Generale file structure
Every header file should start with a copyright notice and an include guard `#pragma once`, where the text of the copyright notice is given in the file `tools/license.templ.txt` and can automatically by added, using the script files in the `tools` directory: Every header file should start with a copyright notice and an include guard `#pragma once`, where the text of the copyright notice is given in the file `tools/license.templ.txt` and can automatically by added, using the script files in the `tools` directory:
``` c++ ``` c++
// Software License for AMDiS2 // Software License for dune-amdis
// //
// Copyright (c) 2015 Institute for Scientific Computing, TU-Dresden // Copyright (c) 2015 Institute for Scientific Computing, Technische Universitaet Dresden
// All rights reserved. // All rights reserved.
// Authors: Simon Praetorius // Authors: Simon Praetorius
// //
// This file is part of the AMDiS2 Library // This file is part of the dune-amdis Library
// see also the LICENSE file in the distribution. // see also the LICENSE file in the distribution.
#pragma once #pragma once
...@@ -55,7 +57,7 @@ All of a project's header files should be listed as descendants of the project's ...@@ -55,7 +57,7 @@ All of a project's header files should be listed as descendants of the project's
* Other external libraries' header files. * Other external libraries' header files.
* Your project's header files. * Your project's header files.
For better readability a comment above each group can be added. Within each section the includes should be ordered alphabetically. Project's header files should be surrounded by `"`, while external header files hould be surrounded by `<...>`. For better readability a comment above each group can be added. Within each section the includes should be ordered alphabetically. Project's header files should be surrounded by `"`, while external header files should be surrounded by `<...>`.
For example, the includes in `io/VtkWriter.cpp` might look like this: For example, the includes in `io/VtkWriter.cpp` might look like this:
...@@ -93,15 +95,15 @@ namespace AMDiS ...@@ -93,15 +95,15 @@ namespace AMDiS
} // end namespace AMDiS } // end namespace AMDiS
``` ```
Implementation details are put into a subnamespace `Impl`. Implementation details are put into a subnamespace `Impl`. A few more subnamespaces of `AMDiS` are allowed, e.g., `Concepts`. If onw of these subnamespaces need another subsubnamespace for implementation details, it should be names `_Impl`.
## Line length ## Line length
Each line of text in your code should be at most 80 characters long. Each line of text in your code should be at most 100 characters long.
**Exceptions:** **Exceptions:**
* An #include statement with a long path may exceed 80 columns. * An #include statement with a long path may exceed 100 columns.
* A raw-string literal may have content that exceeds 80 characters. * A raw-string literal may have content that exceeds 100 characters.
* ... * ...
## Indentation ## Indentation
......
#! /bin/bash
set -e
set -x
root=${PWD}
if [ ! -d install/MTL ]; then
mkdir -p install/MTL
cd install/MTL
curl -o MTL.tar.gz "http://www.simunova.com/downloads/mtl4/MTL-4.0.9555-Linux.tar.gz"
tar --strip-components=2 -xf MTL.tar.gz
rm MTL.tar.gz
cd ${root}
fi
# if [ ! -d install/gtest ]; then
# mkdir -p install/gtest
# cd install/gtest
# cmake -DCMAKE_INSTALL_PREFIX=${root}/install/gtest /usr/src/gtest
# make
# cd ${root}
# fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment