Skip to content
Extraits de code Groupes Projets
Après avoir pris connaissance de ces consignes de contribution, vous serez prêt à contribue à ce projet.

Vivy developer help

Some rules and help.

Using the namespace

All Vivy's code must live inside the Vivy namespace. There are some rules to keep in mind:

  • You can use using namespace Vivy; inside source files, but NEVER inside headers files
  • The utility garbage must live inside its own sub-namespace Vivy::Utils. You can't using namespace Vivy::Utils apart from inside one of the utils source files because it will ruin the purpose of using a different namespace for that
  • You can also NEVER using namespace std;

Code dependencies inside the project

The dependencies between the src's sub-folders are as follows:

folder the folders dependencies
src everything
src/Lib nothing
src/UI src/Lib
src/UI/FakeVim src/Lib/Utils

The ASS lib has no dependency other than the Utils. The Document lib has the Utils and ASS dependencies.

The C++ source files are .cc files and their corresponding header files are .hh files.

The FakeVim part is imported from QtCreator and uses its own namespace. Its code can picks things from the Vivy::Utils namespace. The rest of the code should use the FakeVim as defined and included in the UI/FakeVim/FakeVimTr.hh header.

C++ Standard

Here we use C++20, or at least we try. Even if the stl has some good points, the use of Qt is favored over the stl as it will result in a more coherent code base and less conversions between the types used in the Vivy's lib and the types used in Vivy's UI.

Used or will be used features

Some of the new features will be used:

  • concepts (of course! at least we try)
  • coroutines (not supported by compilers for now)
  • likely and unlikely attributes
  • auto return types in functions and arguments, to pass objects like lambda or other callable

Unused features

Some of the feature may not be used or not already be in use for multiple reasons:

  • the new C++20 modules feature is not used because I don't know how it will play with moc. It's not supported by clangd for now anyway.