Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 823 Bytes

File metadata and controls

41 lines (27 loc) · 823 Bytes

Coding Style

This document establishes best practices and coding styles for this project.

Getters and Setters

For convenience, don't use Get as a prefix for getters, unless the type that the getter function would return matches the name of the function.

Correct:

World* GetWorld() const;
int PurchaseCount() const;

Incorrect:

World* World() const;
int GetPurchaseCount() const;

Interfaces and Some Prefix

The prefix Some has been used to designate a purely virtual interface class.

Interface classes should not store data or state, and should not have implementations for core functionality unless the implementation is trivial.

Example:

class SomeTool {
    virtual void Foo() = 0;
}

class Tool: public SomeTool {
    // MARK: SomeTool

    void Foo() override;
}