Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1.75 KB

CODING-STYLE.md

File metadata and controls

21 lines (16 loc) · 1.75 KB

Coding style

Coding style in pdfmm follows the following general rules:

  • Visual Studio formatting convetions (see for example C# convetions, where they apply for all C based languages;
  • Capitalized case for public MethodNames();
  • Camel case for variables, parameters and fields (example variableName);
  • m_ and s_ prefixes respectively for and static fields/variables. For example m_Value or s_instance.

As some lenient rules, not truly enforced in all the code base, it's recommended to use:

  • Lower case method names for private methods used only in this class. Example initOperation();
  • Capitalized case for method for private or protected methods used outside of this class boundary, in case of class friendship or inheritance. For example FriendMethod() or ProtectedMethod;
  • Lower case field names for private fields used only in this class boundary, for example m_privateField;
  • Capitalized field names for private fields exposed by public getters/setters, example m_Value.

Some examples of expected coding style can be found at the following permalinks: