Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 862 Bytes

Style-Guide.md

File metadata and controls

16 lines (10 loc) · 862 Bytes

Style Guide

Naming Conventions

The style follows the tutorial, which differs from C++ default stype:

  • Classes and Structs are UpperCamelCase
  • Members (fields, functions) are lowerCamelCase (with an exceptional house rule)
  • Macros and constant numeric values are ALL_CAPS

House rules:

  • get methods generated by macros (especially CTX_PROPERTY) always follow get_someField() syntax. This helps when you try to search for usages as the IDE doesn't collect them - search for "someField" instead
  • sometimes, the before-mentionned "get_" syntax may apply to fields that are not generated by macros. This is reserved for a future refactoring.

example: get_logicalDevice() is generated by CTX_PROPERTY(LogicalDevice, logicalDevice), while getLogicalDevice() does the same thing but is explicitly implemented as part of the SubContext class.