Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 998 Bytes

File metadata and controls

81 lines (58 loc) · 998 Bytes

Maintainer manual {#maintainer}

Coding style {#coding_style}

[TOC]

Identifiers

Namespaces

Namespace identifiers are lower case.

namespace dodo::network {
}

Type names

Type names start with a capital.

class Person {
};

Each noun within the type name starts with a capital, composite nouns each start with a capital.

class Logfile {
};

class LogfileAppender {
}

Acronyms and such preserve case

class SMTPServer {
}

Variables

Variables are lowercase.

void add( int quantity ) {
}

Protected and private class attributes are suffixed with an underscore (_)

class Person {
  protected:
    Date birthdate_;
};

Methods

int getAttrribute() const {
}

Indentation and curly brackets

No tabs. Indent is two spaces.

void foo( const Collection &collection ) {
  if ( i.size() ) {
    for ( auto i : collection ) {
    }
  else {
    cout << "the collection is empty" << endl;
  }
}