From 177ed1f3c7f4ad82c28fa8d4efc24fb3ac65899f Mon Sep 17 00:00:00 2001 From: Gawaboumga Date: Wed, 27 Aug 2014 14:40:19 +0200 Subject: [PATCH] Writing style file Add of a file for the standard writing in the project. I think it could be helpful. Former-commit-id: 3c61109ce5fd558e0675bf684d66262613acbe1e --- writing style.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 writing style.md diff --git a/writing style.md b/writing style.md new file mode 100644 index 000000000..cc6da29f7 --- /dev/null +++ b/writing style.md @@ -0,0 +1,84 @@ +Examples writing-style: + +Alphabetical order for everything and try to regroup each methods beginning with the same letter in the header + +Class header: + +// Copyright (C) 2014 AUTHOR +// This file is part of the "Nazara Engine - MODULE module" +// For conditions of distribution and use, see copyright notice in Config.hpp + +#pragma once + +#ifndef NAZARA_FILENAME_HPP +#define NAZARA_FILENAME_HPP + +#include +#include +#include + +struct NzPossibleImplementation; + +class NAZARA_API NzClassName +{ + friend NzClassFriend; + + public: + Constructors(); + Destructor(); + + FunctionInAClass(); + + protected: + + private: + NzClass m_variableName; + STL m_variableName; + dataType m_variableName; + + NzPossibleImplementation* m_impl; +}; + +#endif // NAZARA_FILENAME_HPP + +Class source: + +// Copyright (C) 2014 AUTHOR +// This file is part of the "Nazara Engine - MODULE module" +// For conditions of distribution and use, see copyright notice in Config.hpp + +#include +#include +#include +#include + +struct NzPossibleImplementation {}; + +NzClassName::Constructors() : +m_variableName(init) +{ + testsAndOtherInits; +} + +NzClassName::PublicFunctions() +NzClassName::ProtectedFunctions() +NzClassName::PrivateFunctions() + +Structure: + +/!\ enum in Enums.hpp + +enum nzEnum +{ + nzEnum_1, + nzEnum_2, + + nzEnum_Max = nzEnum_2 +}; + +Function: + +FunctionName() +{ + variableName = init; +} \ No newline at end of file