-
Notifications
You must be signed in to change notification settings - Fork 27
Coding Standards
Mike R edited this page Dec 5, 2021
·
3 revisions
- Classes and types names must be only in UpperCamelCase. Examples:
GeoObject
,SimpleDataRecord
. - Varibles, members, functions and methods must be only in lowerCamelCase. Examples:
put
,redirectInputToUser
. - Classes, types and varibles must be only meaningful nouns. Examples:
Vehicle
,Coordinate
,RedirectedPacket
. - Don't use verbal nouns for domain types. Use it only for pure fiction objects like handlers, adapters and controllers.
- Methods and functions must be meaningful verbs, just with one exeption - getters must be nouns like members. Example:
validateMissionItem
. - Signals must be past verbs. Example:
validationFailed
- Slots and signal handler functions (QML) must be named like on'SignalName'. Example:
onPositionChanged
. - Name interfaces (ISP from SOLID) with
I
prefix. Examples:IUser
,IVehicle
,IControlFactory
. - Use abbreviations in code only from dictionary.
- Classes must have one main constructor. Auxiliary constructors must call main constructor of this class.