Files
xahaud/CheatSheet.md
Vinnie Falco 4090fbf0b7 Squashed 'Subtrees/leveldb/' changes from ab82e57..ae6c262
ae6c262 Merge branch 'leveldb' into ripple-fork
28fa222 Looks like a bit more delay is needed to smooth the latency.
a18f3e6 Tidy up JobQueue, add ripple_core module
18b245c Added GNU/kFreeBSD kernel name (TARGET_OS)

git-subtree-dir: Subtrees/leveldb
git-subtree-split: ae6c2620b2ef3d5c69e63dc0eda865d6a39fa061
2013-07-01 10:25:46 -07:00

658 B

Form

  • One class per header file.
  • Place each data member on its own line.
  • Place each ctor-initializer on its own line.
  • Create typedefs for primitive types to describe them.
  • Return descriptive local variables instead of constants.
  • Use long descriptive names instead of abbreviations.
  • Use "explicit" for single-argument ctors
  • Avoid globals especially objects with static storage duration
  • Order class declarations as types, public, protected, private, then data.
  • Prefer 'private' over 'protected'

Function

  • Minimize external dependencies
    • Pass options in the ctor instead of using theConfig
    • Use as few other classes as possible