#
# Empirix CLANG formatter.
# Please use with clang-format version 5.0 or greater
#
# This file is used by "format_check" recursive check on all .cpp and .h
# files. This style reflects the most widely employed style in Empirix.
#

BasedOnStyle: LLVM
IndentWidth: 4
UseTab: ForContinuationAndIndentation
TabWidth: 4
BreakBeforeBraces: Custom
BraceWrapping: 
    AfterClass: true
    AfterControlStatement: true
    AfterEnum: true 
    AfterFunction: true 
    AfterNamespace: true
    AfterObjCDeclaration: true 
    AfterStruct: true 
    AfterUnion: true 
    BeforeCatch: true 
    BeforeElse: true 
    IndentBraces: false
    #NECESSARY  ONLY with CLANG_FORMAT 9
    AfterCaseLabel: true
##NECESSARY ONLY with CLANG_FORMAT 9
AllowAllConstructorInitializersOnNextLine: false

AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: true
BinPackArguments: true
BinPackParameters: false
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: false
ColumnLimit: 160
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
ContinuationIndentWidth: 2
PointerAlignment: Left
ReflowComments: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
SortIncludes: false
FixNamespaceComments: false
BreakBeforeBinaryOperators: NonAssignment
SpaceAfterTemplateKeyword: true
AlignAfterOpenBracket: Align
AlignOperands: true
BreakConstructorInitializers: AfterColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
SpaceAfterCStyleCast: true
BreakBeforeTernaryOperators: true

# This is to have public/private/protected on same column of "class"
AccessModifierOffset: -4
