Pascal Case | Camel Case | Snake Case | Lower Case | Caps Case |
---|---|---|---|---|
LazyDogBrownFox | lazyDogBrownFox | lazy_dog_brown_fox | lazydogbrownfox | LAZYDOGBROWNFOX |
- Snake Case.
my_useful_class.c
my_useful_class.cpp
- Pascal Case: The names of all types — classes, structs, type aliases, enums, and type template parameters — have the same naming convention. No underscores.
class CirclePlotter : public PlotterClass{};
struct MyStruct{};
- Pascal Case. The same naming rule applies to class- and namespace-scope constants that are exposed as part of an API and that are intended to look like functions
- Accessors and mutators (get and set functions) may be named like variables
int RandomFunctionGenerator();
void set_count(int count);
- Lower Case or Snake Case for multiple words.
- Data members of classes (but not structs) additionally have trailing underscores
std::string table_name;
int count=0;
class TableInfo {
...
private:
std::string table_name_; // OK - underscore at end.
static Pool<TableInfo>* pool_;
};
- Lower Case or Snake Case for multiple words.
example::example_scope::example_item temp_example;
- All Caps Case with underscores separating words.
#define PI 3.14159265358979323;
For more standards and links refer to Coding Standards Lookup page.
To contribute refer to the Contributing and License pages.