Changeset View
Changeset View
Standalone View
Standalone View
doc/developer-notes.md
Show First 20 Lines • Show All 527 Lines • ▼ Show 20 Lines | section separated by a newline: | ||||
1. In a .cpp file, the associated .h is in first position. In a test source, this is the header file under test. | 1. In a .cpp file, the associated .h is in first position. In a test source, this is the header file under test. | ||||
2. The project headers. | 2. The project headers. | ||||
3. The test headers. | 3. The test headers. | ||||
4. The 3rd party libraries headers. Different libraries should be in different sections. | 4. The 3rd party libraries headers. Different libraries should be in different sections. | ||||
5. The system libraries. | 5. The system libraries. | ||||
All headers should be lexically ordered inside their block. | All headers should be lexically ordered inside their block. | ||||
- Use include guards to avoid the problem of double inclusion. The header file | |||||
`foo/bar.h` should use the include guard identifier `BITCOIN_FOO_BAR_H`, e.g. | |||||
```c++ | |||||
#ifndef BITCOIN_FOO_BAR_H | |||||
#define BITCOIN_FOO_BAR_H | |||||
... | |||||
#endif // BITCOIN_FOO_BAR_H | |||||
``` | |||||
GUI | GUI | ||||
----- | ----- | ||||
- Do not display or manipulate dialogs in model code (classes `*Model`) | - Do not display or manipulate dialogs in model code (classes `*Model`) | ||||
- *Rationale*: Model classes pass through events and data from the core, they | - *Rationale*: Model classes pass through events and data from the core, they | ||||
should not interact with the user. That's where View classes come in. The converse also | should not interact with the user. That's where View classes come in. The converse also | ||||
holds: try to not directly access core data structures from Views. | holds: try to not directly access core data structures from Views. | ||||
▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines |