Skip to content

Coding Standards

Mike R edited this page Dec 5, 2021 · 3 revisions

Namings

  1. Classes and types names must be only in UpperCamelCase. Examples: GeoObject, SimpleDataRecord.
  2. Varibles, members, functions and methods must be only in lowerCamelCase. Examples: put, redirectInputToUser.
  3. Classes, types and varibles must be only meaningful nouns. Examples: Vehicle, Coordinate, RedirectedPacket.
  4. Don't use verbal nouns for domain types. Use it only for pure fiction objects like handlers, adapters and controllers.
  5. Methods and functions must be meaningful verbs, just with one exeption - getters must be nouns like members. Example: validateMissionItem.
  6. Signals must be past verbs. Example: validationFailed
  7. Slots and signal handler functions (QML) must be named like on'SignalName'. Example: onPositionChanged.
  8. Name interfaces (ISP from SOLID) with I prefix. Examples: IUser, IVehicle, IControlFactory.
  9. Use abbreviations in code only from dictionary.

Classes

  1. Classes must have one main constructor. Auxiliary constructors must call main constructor of this class.
Clone this wiki locally