Record:C++命名規則

2531 ワード

class
各単語の頭文字の大文字
base
‘C’+adj.+n.
function
各単語の頭文字の大文字
base
v.+n.
callback&event
‘On’+base
visual
‘Do’+base
protect
‘_’+~;
private
‘__’+~
variable
各単語の頭文字の大文字
base
役割ドメイン接頭辞+タイプ接頭辞+~adj.+n.
役割ドメイン接頭辞
アクティブドメイン
none
local
m_
member
sm_
static member
s_
static
g_
global
sg_
static global
gg_
global global(processing share)
タイプ接頭辞
を選択します.
n
number
e
enumeration
c
char
b
bool
f
float
p
pointer
pfn
point of function
g
grid(配列)
i
intance(クラスインスタンス)
const
タイプ接頭辞+全大文字
列挙、連合、typedef
全大文字で構成され、単語間は下線で囲まれています.
マクロ、列挙、連合、typedef
全大文字で構成され、単語間は下線で囲まれています.
/*    :
**class:          ;
**  'C'+adj.+n.;
**
**func:          ;
**  base:       v.+n.;
**  call&event: 'On'+base;
**  visual:     'Do'+base;
**  protect:    '_'+~;
**  private::   '__'+~;
**
**variable:          ;
**  base:     +    +~  adj.+n.
**       :
**  none -- local; m_ -- member; sm_ -- static member;
**  s_ -- static; g_ -- global; sg_ -- static global;
**  gg_ -- global global(processing share)////////////
**      :
**  n -- number; e -- enumeration; c -- char; b -- bool;
**  f -- float; p -- pointer; pfn -- point of function; 
**  g -- grid(  ); i -- intance(   )//////////////
**
**const:    +     
**
**  、  、typedef:       ,        
**
** 、   :       ,        
*/