Graphisoft®

C/C++ Style GuideVersion: 1.1

C / C++ Style Guide

  1. Introduction
     
  2. Naming conventions
    1. #define names
    2. Type names
    3. Variable names
    4. Constants
    5. Function names
    6. Method names
    7. Parameter names
       
  3. Expressions
     
  4. Control flow statements
    1. if-else
    2. switch
    3. for, while, do-while
    4. try-catch-throw
       
  5. Variable declarations
     
  6. Functions
    1. Declaration
    2. Implementation
     
  7. Type definitions
    1. struct
    2. union
    3. enum
    4. typedef
     
  8. Class definitions
    1. Base structure
      1. Visibility
      2. Template classes
      3. Inheritance
      4. Naming conventions
    2. Body
      1. private section
      2. protected section
      3. public section
      4. Data member declaration
      5. Method declaration
      6. Embedded classes and structures
      7. Naming conventions
         
  9. Class implementation
    1. Static (class) members
    2. Methods
       
  10. namespace
     
  11. Preprocessor directives
     
  12. Writing comments
     
  13. File structure