Skip to content

Commit e8f4d23

Browse files
hikinggrassa-w50
authored andcommitted
Squashed initial commit
0 parents  commit e8f4d23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+12277
-0
lines changed

.clang-format

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveMacros: true
7+
AlignConsecutiveAssignments: false
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Right
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllArgumentsOnNextLine: true
13+
AllowAllConstructorInitializersOnNextLine: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: Never
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortEnumsOnASingleLine: false
18+
AllowShortFunctionsOnASingleLine: None
19+
AllowShortLambdasOnASingleLine: All
20+
AllowShortIfStatementsOnASingleLine: Never
21+
AllowShortLoopsOnASingleLine: false
22+
AlwaysBreakAfterDefinitionReturnType: None
23+
AlwaysBreakAfterReturnType: None
24+
AlwaysBreakBeforeMultilineStrings: false
25+
AlwaysBreakTemplateDeclarations: MultiLine
26+
BinPackArguments: true
27+
BinPackParameters: true
28+
BraceWrapping:
29+
AfterCaseLabel: false
30+
AfterClass: false
31+
AfterControlStatement: false
32+
AfterEnum: false
33+
AfterFunction: false
34+
AfterNamespace: false
35+
AfterObjCDeclaration: false
36+
AfterStruct: false
37+
AfterUnion: false
38+
AfterExternBlock: false
39+
BeforeCatch: false
40+
BeforeElse: false
41+
IndentBraces: false
42+
SplitEmptyFunction: true
43+
SplitEmptyRecord: true
44+
SplitEmptyNamespace: true
45+
BreakBeforeBinaryOperators: None
46+
BreakBeforeBraces: Attach
47+
BreakBeforeInheritanceComma: false
48+
BreakInheritanceList: BeforeColon
49+
BreakBeforeTernaryOperators: true
50+
BreakConstructorInitializersBeforeComma: false
51+
BreakConstructorInitializers: AfterColon
52+
BreakAfterJavaFieldAnnotations: false
53+
BreakStringLiterals: true
54+
ColumnLimit: 120
55+
CommentPragmas: '^ IWYU pragma:'
56+
CompactNamespaces: false
57+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
58+
ConstructorInitializerIndentWidth: 4
59+
ContinuationIndentWidth: 4
60+
Cpp11BracedListStyle: true
61+
DeriveLineEnding: true
62+
DerivePointerAlignment: false
63+
DisableFormat: false
64+
ExperimentalAutoDetectBinPacking: false
65+
FixNamespaceComments: true
66+
ForEachMacros:
67+
- foreach
68+
- Q_FOREACH
69+
- BOOST_FOREACH
70+
IncludeBlocks: Preserve
71+
IncludeCategories:
72+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
73+
Priority: 2
74+
SortPriority: 0
75+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
76+
Priority: 3
77+
SortPriority: 0
78+
- Regex: '.*'
79+
Priority: 1
80+
SortPriority: 0
81+
IncludeIsMainRegex: '(Test)?$'
82+
IncludeIsMainSourceRegex: ''
83+
IndentCaseLabels: false
84+
IndentGotoLabels: true
85+
IndentPPDirectives: None
86+
IndentWidth: 4
87+
IndentWrappedFunctionNames: false
88+
JavaScriptQuotes: Leave
89+
JavaScriptWrapImports: true
90+
KeepEmptyLinesAtTheStartOfBlocks: true
91+
MacroBlockBegin: ''
92+
MacroBlockEnd: ''
93+
MaxEmptyLinesToKeep: 1
94+
NamespaceIndentation: None
95+
ObjCBinPackProtocolList: Auto
96+
ObjCBlockIndentWidth: 2
97+
ObjCSpaceAfterProperty: false
98+
ObjCSpaceBeforeProtocolList: true
99+
PenaltyBreakAssignment: 2
100+
PenaltyBreakBeforeFirstCallParameter: 19
101+
PenaltyBreakComment: 300
102+
PenaltyBreakFirstLessLess: 120
103+
PenaltyBreakString: 1000
104+
PenaltyBreakTemplateDeclaration: 10
105+
PenaltyExcessCharacter: 1000000
106+
PenaltyReturnTypeOnItsOwnLine: 60
107+
PointerAlignment: Left
108+
ReflowComments: true
109+
SortIncludes: true
110+
SortUsingDeclarations: true
111+
SpaceAfterCStyleCast: false
112+
SpaceAfterLogicalNot: false
113+
SpaceAfterTemplateKeyword: true
114+
SpaceBeforeAssignmentOperators: true
115+
SpaceBeforeCpp11BracedList: false
116+
SpaceBeforeCtorInitializerColon: true
117+
SpaceBeforeInheritanceColon: true
118+
SpaceBeforeParens: ControlStatements
119+
SpaceBeforeRangeBasedForLoopColon: true
120+
SpaceInEmptyBlock: false
121+
SpaceInEmptyParentheses: false
122+
SpacesBeforeTrailingComments: 1
123+
SpacesInAngles: false
124+
SpacesInConditionalStatement: false
125+
SpacesInContainerLiterals: true
126+
SpacesInCStyleCastParentheses: false
127+
SpacesInParentheses: false
128+
SpacesInSquareBrackets: false
129+
SpaceBeforeSquareBrackets: false
130+
Standard: Latest
131+
StatementMacros:
132+
- Q_UNUSED
133+
- QT_REQUIRE_VERSION
134+
TabWidth: 8
135+
UseCRLF: false
136+
UseTab: Never
137+
...
138+

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*build*
2+
*vscode
3+
workspace.yaml

CMakeLists.txt

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
cmake_minimum_required(VERSION 3.14.7)
2+
3+
project(OCPP VERSION 0.1
4+
DESCRIPTION "A C++ implementation of the Open Charge Point Protocol"
5+
LANGUAGES CXX)
6+
7+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
8+
9+
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE)
10+
11+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
12+
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dist" CACHE PATH "..." FORCE)
13+
endif()
14+
15+
option(BUILD_TESTING "Run unit tests" OFF)
16+
17+
# configure clang-tidy if requested
18+
option(CMAKE_RUN_CLANG_TIDY "Run clang-tidy" OFF)
19+
if(CMAKE_RUN_CLANG_TIDY)
20+
message("Running clang-tidy")
21+
string(CONCAT CLANG_TIDY_CHECKS "*,"
22+
"-llvmlibc*,"
23+
"-fuchsia-default-arguments-calls,"
24+
"-fuchsia-overloaded-operator,"
25+
"-fuchsia-statically-constructed-objects,"
26+
"-readability-function-cognitive-complexity,"
27+
"-modernize-use-trailing-return-type,"
28+
"-abseil-string-find-startswith,"
29+
"-abseil-string-find-str-contains,"
30+
";")
31+
set(CMAKE_CXX_CLANG_TIDY
32+
clang-tidy;
33+
-header-filter='.*'
34+
-checks=${CLANG_TIDY_CHECKS}
35+
-export-fixes=clang-tidy-fixes.yaml)
36+
endif()
37+
38+
# build doxygen documentation if doxygen is available
39+
find_package(Doxygen)
40+
if(DOXYGEN_FOUND)
41+
set( DOXYGEN_OUTPUT_DIRECTORY dist/docs )
42+
doxygen_add_docs(${PROJECT_NAME}doxygen include lib src)
43+
else()
44+
message("Doxygen is needed to generate documentation")
45+
endif()
46+
47+
add_definitions(-DBOOST_LOG_DYN_LINK)
48+
49+
find_package(EDM REQUIRED)
50+
51+
find_package(Boost COMPONENTS filesystem program_options regex system thread REQUIRED)
52+
53+
find_package(SQLite3 REQUIRED)
54+
55+
find_package(OpenSSL REQUIRED)
56+
57+
# library code
58+
add_subdirectory(lib)
59+
60+
# executable code
61+
add_subdirectory(src)
62+
63+
# auxillary files
64+
add_subdirectory(aux)

0 commit comments

Comments
 (0)