Overview - simple-entertainment/simplicity GitHub Wiki

At the Core

The Simplicity namespace.

The APIs

Simplicity consists of the following APIs:

The Conventions

Ownership

The concept of ownership is implemented using smart pointers. If a function takes a smart pointer it will become the owner of the object passed to it. If a function returns a smart pointer it is giving ownership to the callee. Functions that take or return raw pointers do NOT change the owner of the object.

void Simplicity::addEngine(std::unique_ptr<Engine> engine); // Simplicity is taking ownership of the Engine from the callee.
std::unique_ptr<Engine> Simplicity::removeEngine(Engine* engine); // Simplicity is returning ownership of the Engine to the callee.
void RenderingEngine::setGraph(Graph* graph); // The RenderingEngine is obtaining an optional reference to a graph but not taking ownership of it.
Graph* Graph::getParent(); // The Graph is returning an optional reference to its parent (it may not have one) but the callee is not taking ownership.

This convention has meant that the delete keyword does not appear once in simplicity's code-base.

⚠️ **GitHub.com Fallback** ⚠️