|
CodeStyle
Code Style for our implementation.
Phase-Implementation IntroductionCode Style和给出的API中的style一致,大部分参考Google C++ Style Guide 下面列出了一些必要的,漏掉了的大家再补充 DetailsNamingSample Naming Style: ErrCode closeIndex(IdxState *idxState);
Start with a capital letter and have a capital letter for each new word, with no underscores:ErrCode, IdxState.
Variable names are all lowercase, with underscores between words. Class member variables have trailing underscores. For instance: my_exciting_local_variable, my_exciting_member_variable. For global variables, prefix it with g or some other marker to easily distinguish it from local variables.
Use a k followed by mixed case: kDaysInAWeek.
按照closeIndex这种命名方式,首字母小写,其他单词大写.T-Tree的外部接口以tt打头, e.g. ttSearch() Commenthttp://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Comments Indenttab = 4 blank #vim的设置 set tabstop = 4 set shiftwidth = 4 |
关于大括号的战争呢?。。。