Skip to content

Commit 19e6041

Browse files
authored
Refactor of all collection Types. (#202)
Refactored API of all collection types. Moved away from C-style global functions to member functions. * Collection types only implement the most basic functionality, all additional methods are implemented using "deducing this" to easily extend multiple types. Main changes: * Removed 'ucount' alias of 'u32' and replaced with 'ncount' and 'nindex' types. * Refactored all String and Collection types. Refactored string types: * String, StaticString, HeapString * VarString, HeapVarString * Path, HeapPath Refactored collection types: * Span, Array, HashMap, Queue, AtomicLinkedQueue #ICE-199 State Done
1 parent 0457bf0 commit 19e6041

File tree

456 files changed

+9402
-10484
lines changed

Some content is hidden

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

456 files changed

+9402
-10484
lines changed

.github/workflows/build-dispatch.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ on:
2020
description: "Clang tools version to be installed"
2121
required: false
2222
type: string
23+
secrets:
24+
conan_user:
25+
required: true
26+
conan_token:
27+
required: true
2328

2429
jobs:
2530
build:
@@ -49,6 +54,11 @@ jobs:
4954
conan-profile-cppstd: '20'
5055
conan-profile-libcxx: 'libc++'
5156

57+
- name: Login to IceShard Conan2 Repository
58+
shell: pwsh
59+
run: |
60+
conan remote login -p ${{ secrets.conan_token }} conan2-iceshard ${{ secrets.conan_user }}
61+
5262
- name: Setup IBT
5363
uses: iceshard-engine/.github/.github/actions/ibt-wks@main
5464
with:

.github/workflows/build-validate-android.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ jobs:
2323
host-platform: 'windows-latest'
2424
target-platform: 'android'
2525
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"
26+
secrets:
27+
conan_user: ${{ secrets.CONAN_USER }}
28+
conan_token: ${{ secrets.CONAN_TOKEN }}

.github/workflows/build-validate-emscripten.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ jobs:
2424
target-platform: 'web'
2525
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"
2626
clang-version: '22'
27+
secrets:
28+
conan_user: ${{ secrets.CONAN_USER }}
29+
conan_token: ${{ secrets.CONAN_TOKEN }}

.github/workflows/build-validate-linux.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ jobs:
2424
target-platform: 'linux'
2525
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"
2626
clang-version: '20'
27+
secrets:
28+
conan_user: ${{ secrets.CONAN_USER }}
29+
conan_token: ${{ secrets.CONAN_TOKEN }}

.github/workflows/build-validate-windows.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ jobs:
2323
host-platform: 'windows-latest'
2424
target-platform: 'win32'
2525
targets: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}"
26+
secrets:
27+
conan_user: ${{ secrets.CONAN_USER }}
28+
conan_token: ${{ secrets.CONAN_TOKEN }}

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,9 @@ Thid party tools and features:
3434
#### Linux _(Tested)_
3535
![Code validation result for Linux targets.](https://github.com/iceshard-engine/engine/actions/workflows/build-validate-linux.yaml/badge.svg)
3636

37-
#### Android _(Untested)_
37+
#### Android _(Tested)_
3838
![Code validation result for Android targets.](https://github.com/iceshard-engine/engine/actions/workflows/build-validate-android.yaml/badge.svg)
3939

40-
##### Known issues
41-
* The x64 binaries do not load properly in emulators
42-
* The binaries use outdated API Levels and NKD version
43-
* The binaries are still build with 4 KiB page support instead of required 16 KiB
44-
4540
#### Emscripten _(Tested)_
4641
![Code validation result for WebAssembly targets.](https://github.com/iceshard-engine/engine/actions/workflows/build-validate-emscripten.yaml/badge.svg)
4742

@@ -60,9 +55,9 @@ To build this engine you will need the following tools and SDKs installed:
6055
* **Linux:**
6156
* Toolchain: Clang-20
6257
* Vulkan SDK _(1.4.313.0 or later)_
63-
* **Android:** _(Outdated)_
64-
* Toolchain: NDK-27
65-
* AndroidAPI: 29
58+
* **Android:**
59+
* Toolchain: NDK-28
60+
* AndroidAPI: 35
6661
* **Web:**
6762
* Toolchain: Emscripten-v4.0.9
6863
* **MacOS:** _(No plans)_

source/code/core/collections/collections.bff

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Copyright 2022 - 2025, Dandielo <dandielo@iceshard.net>
1+
/// Copyright 2022 - 2026, Dandielo <dandielo@iceshard.net>
22
/// SPDX-License-Identifier: MIT
33

44
.Project =
@@ -11,6 +11,9 @@
1111

1212
.Public =
1313
[
14+
.Modules = {
15+
'fmt'
16+
}
1417
.Uses = {
1518
'core'
1619
'memsys'

source/code/core/collections/collections_tests.bff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/// Copyright 2022 - 2025, Dandielo <dandielo@iceshard.net>
1+
/// Copyright 2022 - 2026, Dandielo <dandielo@iceshard.net>
22
/// SPDX-License-Identifier: MIT
33

44
.Project =
55
[
66
.Name = 'collections_tests'
77
.Kind = .Kind_ConsoleApp
88
.Group = 'Tests'
9-
.Requires = { 'Windows' }
9+
.Requires = { 'DevPlatform' }
1010
.Tags = { 'UnitTests' }
1111

1212
.BaseDir = '$WorkspaceCodeDir$/core/collections'

source/code/core/collections/natvis/collections.natvis

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,4 @@
9090
</Expand>
9191
</Type>
9292

93-
<Type Name="ice::HashMapView&lt;*,*&gt;">
94-
<DisplayString>Hash {{ count={_count}, capacity={_capacity}, load_factor={(float)_count/(float)_capacity,g} }}</DisplayString>
95-
<Expand>
96-
<Item Name="[size]">_count</Item>
97-
<Item Name="[capacity]">_capacity</Item>
98-
<Synthetic Name="[items]" ExcludeView="Expanded">
99-
<DisplayString>load_factor {{ {(float)_count/(float)_capacity,g} }}</DisplayString>
100-
<Expand>
101-
<ArrayItems>
102-
<Size>_count</Size>
103-
<ValuePointer>_data</ValuePointer>
104-
</ArrayItems>
105-
</Expand>
106-
</Synthetic>
107-
<IndexListItems IncludeView="Expanded">
108-
<Size>_count</Size>
109-
<ValueNode>_data[$i]</ValueNode>
110-
</IndexListItems>
111-
</Expand>
112-
</Type>
113-
11493
</AutoVisualizer>

source/code/core/collections/natvis/string.natvis

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
33

4+
<Type Name="ice::ncount">
5+
<DisplayString Condition="_width == 0">0 &lt;invalid&gt;</DisplayString>
6+
<DisplayString>{_value}</DisplayString>
7+
<Expand>
8+
<Item Name="[value]">_value</Item>
9+
<Item Name="[width]">_width</Item>
10+
<Item Condition="_value &gt;= 0" Name="[bytes]">_value * _width</Item>
11+
<Item Condition="_value &lt; 0" Name="[bytes]">0</Item>
12+
</Expand>
13+
</Type>
14+
15+
<Type Name="ice::nindex">
16+
<DisplayString Condition="_width == 0">0 &lt;invalid&gt;</DisplayString>
17+
<DisplayString>{_value} </DisplayString>
18+
<Expand>
19+
<Item Name="[value]">_value</Item>
20+
<Item Name="[width]">_width</Item>
21+
<Item Name="[bytes]">_value * uint64_t(_width)</Item>
22+
</Expand>
23+
</Type>
24+
425
<!-- Native Visualization for the core::String<> type -->
526
<Type Name="ice::HeapString&lt;*&gt;">
627
<DisplayString>HeapString {{ { _data,s8 } }}</DisplayString>

0 commit comments

Comments
 (0)