mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 18:45:43 +00:00
Merge topic 'doc_updates'
024b8a306 Fix formatting of CodingConventions.md. 48c31b57a Bump clang version to 5.0. Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !1841
This commit is contained in:
commit
1a63ebe2b3
@ -59,7 +59,7 @@ VTK-m Requires:
|
||||
|
||||
+ C++11 Compiler. VTK-m has been confirmed to work with the following
|
||||
+ GCC 4.8+
|
||||
+ Clang 3.3+
|
||||
+ Clang 5.0+
|
||||
+ XCode 5.0+
|
||||
+ MSVC 2015+
|
||||
+ Intel 17.0.4+
|
||||
|
@ -15,7 +15,7 @@ coding and because we expect vtkm to have continual interaction with VTK.
|
||||
form. Various copyright specific details are referenced in the LICENSE.txt
|
||||
file.
|
||||
|
||||
```
|
||||
```
|
||||
//==========================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
@ -25,7 +25,7 @@ coding and because we expect vtkm to have continual interaction with VTK.
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//==========================================================================
|
||||
```
|
||||
```
|
||||
|
||||
+ The CopyrightStatement test checks all files for a similar statement.
|
||||
The test will print out a suggested text that can be copied and pasted
|
||||
@ -41,22 +41,21 @@ coding and because we expect vtkm to have continual interaction with VTK.
|
||||
directory, with non alphanumeric characters, such as / and . replaced
|
||||
with underscores. The `#endif` part of the guard at the bottom of the
|
||||
file should include the guard name in a comment. For example, the
|
||||
vtkm/cont/ArrayHandle.h header contains the guard
|
||||
|
||||
```cpp
|
||||
#ifndef vtk_m_cont_ArrayHandle_h
|
||||
#define vtk_m_cont_ArrayHandle_h
|
||||
```
|
||||
at the top and
|
||||
```cpp
|
||||
#endif //vtk_m_cont_ArrayHandle_h
|
||||
```
|
||||
at the bottom.
|
||||
vtkm/cont/ArrayHandle.h header contains the guard demostrated below.
|
||||
|
||||
The unique use of vtk_m over vtkm is to allow auto-complete engines the
|
||||
ability to differentiate between the header guards and VTKM_ macros
|
||||
that are used within the code base.
|
||||
|
||||
```cpp
|
||||
#ifndef vtk_m_cont_ArrayHandle_h
|
||||
#define vtk_m_cont_ArrayHandle_h
|
||||
|
||||
// All ArrayHandle code here
|
||||
|
||||
#endif //vtk_m_cont_ArrayHandle_h
|
||||
```
|
||||
|
||||
+ The VTK-m toolkit has several nested namespaces. The declaration of
|
||||
each namespace should be on its own line, and the code inside the
|
||||
namespace bracket should not be indented. The closing brace at the
|
||||
@ -64,7 +63,7 @@ coding and because we expect vtkm to have continual interaction with VTK.
|
||||
the namespace. Namespaces can be grouped as desired. The following is a
|
||||
valid use of namespaces.
|
||||
|
||||
```cpp
|
||||
```cpp
|
||||
namespace vtkm {
|
||||
namespace cont {
|
||||
namespace detail {
|
||||
@ -73,7 +72,7 @@ class InternalClass;
|
||||
class ExposedClass;
|
||||
}
|
||||
} // namespace vtkm::cont
|
||||
```
|
||||
```
|
||||
|
||||
+ Multiple inheritance is not allowed in VTK-m classes.
|
||||
|
||||
@ -170,7 +169,7 @@ for (auto v : vector)
|
||||
or detail class clearly associated with it, the reference can be
|
||||
shortened to `internal::` or `detail::`.
|
||||
|
||||
+ use `this->` inside of methods when accessing class methods and
|
||||
+ Use `this->` inside of methods when accessing class methods and
|
||||
instance variables to distinguish between local variables and instance
|
||||
variables.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user