4math / Engine

Simple Vulkan API engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Common code style guide should be accepted.

cyoq opened this issue · comments

commented

As the source such guides can be taken :

Naming conventions should be also described.

All logical parts must be separated by namespaces

namespace name
{
   exceptions and EXIT_CODES;
   enums;
   classes;
}

All clases have same patten

class ClassName
{
   // VARIABLES
   private : 
   m_initialized = false;
   public : 

   // CONSTRUCTORS/DESTRUCTORS
   public:
   ClassName() { Inintialize() };
  ~ClassName() { Shutdown() }; 

   // METHODES
   private : 
   Inintialize();
   Shutdown();
   public : 
};

Name rules

  1. Private variable is written separating each word with an _ and have prefix m_
    type m_variable_name;
  2. Public variable is writen in lowerCamelCase style
    type variableName;
  3. Local variable is written separating each word with an _
    type variable_name
  4. Private and public methodes are writen in UpperCamelCase style
    type MethodeName();
  5. Methode parametere is written separating each word with an _ and with a _ postfix
    type MethodeName( type parameter_name_ );
  6. Class name is writen in UpperCamelCase style
    class ClassName{};
  7. All exit codes, expressions and constants are writen in UPER_CASE and each word is separated with _
    constexpr EXPR_NAME = 0;