Configured the project to begin working on part one.

This commit is contained in:
2023-03-02 20:16:05 -05:00
parent 5d3b099970
commit a12ba641f1
14 changed files with 18742 additions and 1 deletions

100
thirdparty/.clang-format vendored Normal file
View File

@ -0,0 +1,100 @@
# Format Style Options - Created with Clang Power Tools
---
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCompound: true
PadOperators: true
AlignConsecutiveBitFields: AcrossComments
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortLambdasOnASingleLine: None
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BeforeLambdaBody: false
BeforeWhile: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: true
BreakInheritanceList: BeforeColon
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
ColumnLimit: 180
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth : 4
ContinuationIndentWidth: 4
DeriveLineEnding: true
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseBlocks: true
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: false
IndentPPDirectives: None
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
Language: Cpp
NamespaceIndentation: All
PointerAlignment: Left
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: After
SpaceBeforeCaseColon: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesInAngles: true
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
Standard: c++17
TabWidth: 4
UseTab: ForIndentation
...

82
thirdparty/format.ps1 vendored Normal file
View File

@ -0,0 +1,82 @@
<#
.DESCRIPTION
Helper script to format all header and source files in the repository.
By default, the script will recursively search under the repo root for
files to format. Users can give explicit parameters indicating how the
search should include and exclude filetypes.
If users don't want the search functionality, they can instead provide
an explicit list of files to format.
.PARAMETER RepoRoot
Full path to the root of the repository which is the target of the search.
Will default to the root of the current working directory.
.PARAMETER Include
Array of filetype extensions to target for formatting.
By default, targets standard extensions for header and source files.
Follows the same rules as the -Include parameter for Get-ChildItem.
.PARAMETER Exclude
Array of filetype extensions to exclude from formatting.
By default, excludes generated XAML files.
Follows the same rules as the -Exclude paramter for Get-ChildItem.
.PARAMETER Files
Array of files to format. The script will exit if one of the provided
filepaths does not exist.
.EXAMPLE
.\clang-format-all.ps1
Formats all header and source files under the repository root.
.EXAMPLE
.\clang-format-all.ps1 -RepoRoot 'S:\repos\calculator' -Include '*.h', '*.cpp' -Exclude '*.g.*'
Formats all *.h and *.cpp files under 'S:\repos\calculator', excluding files with an extension
like *.g.*
.EXAMPLE
.\clang-format-all.ps1 -File 'S:\repos\calculator\src\CalcViewModel\UnitConverterViewModel.h', 'S:\repos\calculator\src\CalcViewModel\MemoryItemViewModel.cpp'
Formats the specified files.
#>
[CmdletBinding( DefaultParameterSetName = 'Search' )]
param(
[Parameter( ParameterSetName = 'Search' )]
[ValidateScript({ Test-Path -PathType Container -Path $_ })]
[string] $RepoRoot = "$( (Get-Item .).FullName )/thirdparty",
[Parameter( ParameterSetName = 'Search' )]
[string[]] $Include = ( '*.h', '*.hh', '*.hpp', '*.c', '*.cc', '*.cpp' ),
[Parameter( ParameterSetName = 'Search' )]
[string[]] $Exclude = ( '*.g.*', "zpl.h" ),
[Parameter(
ParameterSetName = 'Explicit',
Mandatory)]
[ValidateScript({
$_ | Where-Object { -not (Test-Path -PathType Leaf -Path $_) } |
ForEach-Object { throw "Could not find file: [$_]" }
return $true
})]
[string[]] $Files
)
if ($PSCmdlet.ParameterSetName -eq 'Explicit')
{
# Use the file paths we were given.
$targetFiles = @($Files)
}
else
{
# Gather the files to be formatted.
$targetFiles = @(
Get-ChildItem -Recurse -Path $RepoRoot -Include $Include -Exclude $Exclude |
Select-Object -ExpandProperty FullName
)
}
# Format the files.
$formatParams = @(
'-i' # In-place
'-style=file' # Search for a .clang-format file in the parent directory of the source file.
'-verbose'
)
if ( $targetFiles )
{
clang-format $formatParams $targetFiles
}

18369
thirdparty/zpl.h vendored Normal file

File diff suppressed because it is too large Load Diff