add more docstring examples, restructure files
This commit is contained in:
parent
4a1c0adff2
commit
2afa3e36c2
9 changed files with 145 additions and 17 deletions
27
cpp/.clang-format
Normal file
27
cpp/.clang-format
Normal file
|
@ -0,0 +1,27 @@
|
|||
# C/C++ Coding Style for generic Projects
|
||||
|
||||
# UseTab: (VS Code current setting)
|
||||
BasedOnStyle: LLVM
|
||||
Language: Cpp
|
||||
|
||||
IndentWidth: 2
|
||||
ColumnLimit: 110
|
||||
BreakBeforeBraces: Attach
|
||||
PointerAlignment: Left
|
||||
AccessModifierOffset: -2
|
||||
#IndentPPDirectives: AfterHash
|
||||
Cpp11BracedListStyle: true
|
||||
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignEscapedNewlines: Left
|
||||
AlignTrailingComments: true
|
||||
IndentWrappedFunctionNames: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
|
||||
SpacesBeforeTrailingComments: 2
|
||||
FixNamespaceComments: true
|
||||
ReflowComments: false
|
||||
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: false
|
24
cpp/template-file.cpp
Normal file
24
cpp/template-file.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* @file template-file.h
|
||||
* @brief File containing example of doxygen usage for quick reference.
|
||||
*
|
||||
* Here typically goes a more extensive explanation of what the header defines.
|
||||
*
|
||||
* @author Name <email@example.com>
|
||||
* @copyright (c) Company Name/ Author, YEAR
|
||||
* @copyright Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>
|
||||
* @copyright Licensed under the GNU GPLv3 License <http://www.gnu.org/licenses/gpl-3.0.txt>
|
||||
*/
|
||||
|
||||
// include system headers here
|
||||
|
||||
// then include more specific library headers
|
||||
|
||||
// include local headers last
|
||||
|
||||
/**
|
||||
* The implementation specific explanation might also be added to the source file.
|
||||
*/
|
||||
int add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
43
cpp/template-file.h
Normal file
43
cpp/template-file.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* @file template-file.h
|
||||
* @brief File containing example of doxygen usage for quick reference.
|
||||
*
|
||||
* Here typically goes a more extensive explanation of what the header defines.
|
||||
*
|
||||
* @author Name <email@example.com>
|
||||
* @copyright (c) Company Name/ Author, YEAR
|
||||
* @copyright Licensed under the Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>
|
||||
* @copyright Licensed under the GNU GPLv3 License <http://www.gnu.org/licenses/gpl-3.0.txt>
|
||||
*/
|
||||
|
||||
#ifndef _TEMPLATE_FILE_H
|
||||
#define _TEMPLATE_FILE_H
|
||||
|
||||
// include system headers here
|
||||
|
||||
// then include more specific library headers
|
||||
|
||||
// include local headers last
|
||||
|
||||
/**
|
||||
* @brief Use brief, otherwise the index won't have a brief explanation.
|
||||
*
|
||||
* Detailed explanation.
|
||||
*/
|
||||
typedef enum BoxEnum_enum {
|
||||
BOXENUM_FIRST, /**< Some documentation for first. */
|
||||
BOXENUM_SECOND, /**< Some documentation for second. */
|
||||
BOXENUM_ETC /**< Etc. */
|
||||
} BoxEnum;
|
||||
|
||||
/**
|
||||
* @brief This method adds two integers.
|
||||
*
|
||||
* Detailed explanation.
|
||||
* @param a First integer to add.
|
||||
* @param b Second integer to add.
|
||||
* @return The sum of both parameters.
|
||||
*/
|
||||
int add(int a, int b);
|
||||
|
||||
#endif /* _TEMPLATE_FILE_H */
|
Loading…
Add table
Add a link
Reference in a new issue