This thread is introducing a few guidlines to contribute to our source code. This list isn't claiming to be complete. Also some guidlines may change in future by request of other developers. I want to start from my position first:
Names:
- Name prefixes on classes, structures and unions: All Names begin with T[any name]. Examples: class TObject, class TView, class TSegment
- function names: All function names should start with lowercase letter: Examples: lookupPlanetObject(), createObjectFromGUID()
Headers and Sources:
- Modularization: An application module in Simerge consists mainly of a single header file and of multiple source files belonging to it. Alternatively a module may be split into multiple headers divided by sub functionalities. Especially then, when it gets too big.
- Procedures in headers: Better not add big chunks of procedural code into headers, in exception of small inline functions or templates.
- Grouping in Source: All members of a class inside a source file should be grouped together into a block introduced by a comment "Members of [[classname]]". The same should be done for global symbols introduced by a comment "global symbols".
Objects:
- Singletons: Better not to use.
Any purposes and discussions are welcome.