Naming Conventions

From Argoday

Jump to: navigation, search

Contents

Naming

General properties considered important for naming is that:

Types

Any Type qualifier (Class, Struct, or Namespace) should be named using UpperCamelCase

Variables

Any Variable (Global Variable, Local Variable, or Member Variable) should be named using lowerCamelCase

Functions

Any Function (Global Function or Member Function) should be named using lowerCamelCase

Macros

Macros (when used) are written in UPPER_CASE notation

Header Guards however have the specific naming construction:

<Module Name>__<File Name>_<File Extension>

Where

For Example:

IMAGE__BaseImage_H

IMAGE__BaseImage_CPP_H

File Directory Structure

Files should be organized identically to the namespace nesting for the items declared in that file. (Files should not mix namespaces)

File Names

Files should contain either a class or a collection of global functions within a namespace.

For files involving classes:

Files that involve global functions should have a name that is the same as the namespace of this file, and this namespace should be unique to that particular header-source pair. In this case the file may be located in the folder one namespace up (thus not creating a folder containing only two files).

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox