Code Conventions - MrShoor/AvalancheProject GitHub Wiki

Naming

  • all project units are prefixed with av- prefixed (avRes, avMain).. except for (ContextSwitcher... todo: find out why so? )
  • public types are prefixed Tav- (i.e. TavMainRender)
  • constants don't have any specific prefix

Coding

  • usage of exceptions is allowed. There's no common "Exception" class, thus direct inheritance from Classes.Exception should be used.
  • COM interfaces are used. However, some of the classes would not allow reference-counting (see TNoRefObject)
  • generics are welcomed
  • Classes public properties - if a value is read-only and requires a function call - instead of declearing read-only property - make the function as a public and name it as property. (i.e. "function Inited3d()" instead of "funcction GetInited3d()" or "property Inited3d read GetInited3()")

Formatting

  • code formatting style - classic Delphi