Kouhei Sutou
null+****@clear*****
Thu Oct 4 10:38:59 JST 2012
Kouhei Sutou 2012-03-15 15:05:24 +0900 (Thu, 15 Mar 2012) New Revision: 96e7fb4901f6c75ab77a7a9172447d7d549a7c2c https://github.com/mroonga/mroonga/commit/96e7fb4901f6c75ab77a7a9172447d7d549a7c2c Log: doc coding-style: add about naming rule for class Modified files: doc/source/developer/coding_style.rst Modified: doc/source/developer/coding_style.rst (+34 -0) =================================================================== --- doc/source/developer/coding_style.rst 2012-03-15 14:55:42 +0900 (b0bd545) +++ doc/source/developer/coding_style.rst 2012-03-15 15:05:24 +0900 (deb3986) @@ -136,3 +136,37 @@ TODO: 読みやすさの他にデバッグのしやすさ(gdbでの追いや TODO: ちゃんと考える。 何度も繰り返し使う領域(バッファ)が必要な場合は ``GRN_BULK`` を使う。例えば、カラムの値を取得する領域などである。 + +命名規則 +-------- + +クラス名 +^^^^^^^^ + +クラスの名前は ``UpperCamelCase`` とする。 + +よい例: + + class MyClass + { + } + +悪い例( ``snail_case`` である): + + class my_class + { + } + +ただし、 ``ha_mroonga`` などMySQLとのインターフェイスとなるクラスでかつ他の類似のモジュールに命名規則がある場合はそれに従う。 + +よい例: + + class ha_mroonga: public handler + { + } + +悪い例( ``UpperCamelCase`` になっている): + + class HaMroonga: public handler + { + } -------------- next part -------------- HTML����������������������������...Download