Writing style file
Add of a file for the standard writing in the project. I think it could be helpful. Former-commit-id: 3c61109ce5fd558e0675bf684d66262613acbe1e
This commit is contained in:
parent
fc4d84f206
commit
177ed1f3c7
|
|
@ -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 <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/NzClass.hpp>
|
||||
#include <STLHeader>
|
||||
|
||||
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 <Nazara/MODULE/FILENAME.hpp>
|
||||
#include <Nazara/NzClass.hpp>
|
||||
#include <STLHeader>
|
||||
#include <Nazara/MODULE/Debug.hpp>
|
||||
|
||||
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;
|
||||
}
|
||||
Loading…
Reference in New Issue