Update docs (#157)
- More welcoming contribution docs - Updated style docs
This commit is contained in:
parent
f71a3bea1e
commit
352ceacfcb
@ -19,8 +19,8 @@ SomeFeature.cpp
|
|||||||
SomeFeature.h
|
SomeFeature.h
|
||||||
```
|
```
|
||||||
|
|
||||||
Private/internal headers are postfixed with `_i` before the file extension.
|
Private/internal headers are postfixed with `Private` before the file extension.
|
||||||
Like `SomeFeature_i.h`
|
Like `SomeFeaturePrivate.h`
|
||||||
|
|
||||||
### Folders
|
### Folders
|
||||||
|
|
||||||
@ -56,16 +56,28 @@ Preprocessor functions are written in snake-case and prefixed with `tt_`, for ex
|
|||||||
|
|
||||||
Consts are lower camel case with capital letters.
|
Consts are lower camel case with capital letters.
|
||||||
|
|
||||||
Typedefs for structs and datatype aliases are upper camel case.
|
Typedefs for structs, classes and datatype aliases are upper camel case.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
typedef uint32_t SomeAlias;
|
typedef uint32_t ThreadId;
|
||||||
|
|
||||||
const SomeAlias myAlias;
|
const ThreadId id;
|
||||||
|
|
||||||
typedef struct {
|
struct ThreadData {
|
||||||
// ...
|
// ...
|
||||||
} SomeStruct;
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### Enumerations
|
||||||
|
|
||||||
|
`enum class` or `enum struct` is preferred over plain `enum` because of scoping. It's styled like this:
|
||||||
|
|
||||||
|
```c++
|
||||||
|
enum class {
|
||||||
|
Ok,
|
||||||
|
NotSupported,
|
||||||
|
Error
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
# Note
|
# Note
|
||||||
|
|
||||||
During the pre-alpha stage, contributions will not yet be considered.
|
During the pre-alpha stage, the APIs are changing rapidly.
|
||||||
Too many things are changing too rapidly:
|
I don't want to disappoint people with huge merge conflicts, so new features are not accepted yet.
|
||||||
I don't want to disappoint people with huge merge conflicts.
|
|
||||||
|
I welcome fixes and possibly also board implementations:
|
||||||
|
Please open an [Issue](https://github.com/ByteWelder/Tactility/issues/new) on GitHub to discuss first new boards!
|
||||||
|
|
||||||
# Code Style
|
# Code Style
|
||||||
|
|
||||||
See [this document](CODING_STYLE.md).
|
See [this document](CODING_STYLE.md).
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user