Coding standard

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Internal coding standard for Maratis: * All code files should include the license at the top. * Name of the original author of the file should be added before the license. * ...")
 
m
 
Line 7: Line 7:
 
* Member variables are prefixed by m_ and begin lower case.
 
* Member variables are prefixed by m_ and begin lower case.
 
* Use of singletons is acceptable, but reserved for the engine and hardware devices.
 
* Use of singletons is acceptable, but reserved for the engine and hardware devices.
* Enums are all uppercase starting with M_.
+
* Enums are prefixed by M_ and in all uppercase.
  
 
   enum M_MATRIX_MODES
 
   enum M_MATRIX_MODES

Latest revision as of 20:38, 9 February 2014

Internal coding standard for Maratis:

  • All code files should include the license at the top.
  • Name of the original author of the file should be added before the license.
  • All classes start with M (for Maratis).
  • Function names are camelCase, starting with lower case.
  • Member variables are prefixed by m_ and begin lower case.
  • Use of singletons is acceptable, but reserved for the engine and hardware devices.
  • Enums are prefixed by M_ and in all uppercase.
 enum M_MATRIX_MODES
 {
       M_MATRIX_MODELVIEW = 0,
       M_MATRIX_PROJECTION,
       M_MATRIX_TEXTURE,
 };
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox