Atomic Engine
Atomic Engine is a cross-platform vulkan based 3D Game Engine
Loading...
Searching...
No Matches
Codebase standardisation

Code

Classes

  • Class names should be in PascalCase.
  • Class names should be descriptive and indicate the purpose of the class
  • Class names should not be abbreviated unless the abbreviation is widely recognized (init for example)
  • Class names should not contain underscores or hyphens
  • Members and functions should be private by default if they are not intended to be used outside the class

Functions

  • Function names should be in camelCase.
  • Function names should be descriptive and indicate the purpose of the function
  • One function does one thing. That's it (no more megafunction for you O: )
  • Function names should not be abbreviated unless the abbreviation is widely recognized
  • Function names should not contain underscores or hyphens
  • Functions "()" should be directly after the function name, without any space
  • Function brackets should be used like this :
    functionName(parameters)
    {
    // code
    }

Documentation

  • The documentation should follow the Doxygen format
  • All functions and classes should be documented
  • The documentation should be written in English
  • The documentation should be written in the headers, not in the code itself
  • functions should be documented with the following format:
    /**
    * @brief Brief description of the function
    *
    * @details Detailed description of the function (if needed)
    * @param param1 Description of param1 with input/output
    * @param param2 Description of param2 with input/output
    * @return Description of the return value
    */
  • Classes should be documented with the following format:
    /**
    * @class ClassName
    * @brief Brief description of the class
    *
    * @details Detailed description of the class (if needed)
    * @author Author name
    * @version Version number (v.r.p format)
    */