1# Coding Guidelines
2
3## C++ Coding Guidelines
4
5### Indenting and Spacing
6
7- Indenting must be done with tab characters.
8- Spacing must be done with space characters.
9- The following indent style shall be followed (Allman style):
10```
11if(x == y)
12{
13    statement;
14}
15```
16
17### Naming
18
19- Class member method names shall begin with a upper case character (ex.: `int DoSomething();`).
20- Class member variable names shall be prefixed by `m_` (ex.: `int m_member = 0;`).
21
22### Constructors and Destructors
23
24- Empty ctors and dtors definitions are not permitted.
25- Use direct member initialization when possible.
26- If an empty default ctor is needed, it must be declared as `default` in the class declaration.
27- Empty virtual dtors must be marked as `default` in the class declaration.
28
29### Override Keyword
30
31All methods overriding a virtual method from a base class shall be annotated with `override` and must not be marked as `virtual`.
32
33**Exception**: dtors shall be marked as `virtual` and not `override`.
34
35### IOP HLE Modules
36
37- **Module Methods**: All parameters for must be passed as `uint32`. Pointer parameters must also be passed as `uint32` and the name of the parameter must be prepended with `Ptr` (ie. `stringPtr`). When used, return values must be `int32`.
38
39## Objective-C Coding Guidelines
40
41### Naming
42
43- Interface member method names shall begin with a lower case character (ex.: `-(int)doSomething;`).
44