Skip to content

Coding Convention

Jihyun Kim edited this page Mar 9, 2023 · 7 revisions

naming

  • private과 public 사이 한 줄 띄워쓰기
  • private 변수는 변수명 앞에 “_” 붙이기
  • getter 함수는 const 붙이기
  • 배열이나 다른 자료구조로 관리되면 변수명 복수형으로 쓰기 (ex-> std:vector users)
  • private > protected > public 순으로 정의
class {Class_Name} {
    private:
        {자료형} {_변수명};

    public:
        {자료형} {변수명};
};

header

#include <iostream>
#include <vector>
...
(공백)
#include "CustomHeader.hpp"
...

tab

탭을 사용한 들여쓰기: size 4

Command class의 자식 클래스 규칙

Command class 자식들 {
    생성자 첫 번째 인자로 명령어 입력한 유저 받기 (User client, ...)
    타겟으로 지정되는 유저나 채널명은 target으로 통일
}

Clone this wiki locally