Skip to content

Commit 43b772e

Browse files
committed
Strings: Move String and SmallString to Memory
1 parent f23e76e commit 43b772e

File tree

67 files changed

+189
-167
lines changed

Some content is hidden

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

67 files changed

+189
-167
lines changed

Documentation/Libraries/Build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Build uses C++ to imperatively describe a sequence of build operations.
77
[TOC]
88

99
# Dependencies
10-
- Direct dependencies: [Containers](@ref library_containers), [FileSystem](@ref library_file_system), [FileSystemIterator](@ref library_file_system_iterator), [Foundation](@ref library_foundation), [Hashing](@ref library_hashing), [Process](@ref library_process), [Strings](@ref library_strings)
10+
- Direct dependencies: [Containers](@ref library_containers), [FileSystem](@ref library_file_system), [FileSystemIterator](@ref library_file_system_iterator), [Foundation](@ref library_foundation), [Hashing](@ref library_hashing), [Memory](@ref library_memory), [Process](@ref library_process), [Strings](@ref library_strings)
1111
- All dependencies: [Containers](@ref library_containers), [File](@ref library_file), [FileSystem](@ref library_file_system), [FileSystemIterator](@ref library_file_system_iterator), [Foundation](@ref library_foundation), [Hashing](@ref library_hashing), [Memory](@ref library_memory), [Process](@ref library_process), [Strings](@ref library_strings), [Time](@ref library_time)
1212

1313
# Statistics

Documentation/Libraries/Memory.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Most classes have been originally part of the [Foundation](@ref library_foundati
3030
| SC::Memory | @copybrief SC::Memory
3131
| SC::VirtualMemory | @copybrief SC::VirtualMemory
3232
| SC::Globals | @copybrief SC::Globals
33+
| SC::String | @copybrief SC::String
34+
| SC::SmallString | @copybrief SC::SmallString
3335

3436
# Status
3537
🟩 Usable
@@ -46,6 +48,12 @@ Such allocators can be just fixed buffers, regular heap memory or reserved SC::V
4648
## Buffer
4749
@copydoc SC::Buffer
4850

51+
## String
52+
@copydoc SC::String
53+
54+
## SmallString
55+
@copydoc SC::SmallString
56+
4957
## Memory
5058
@copydoc SC::Memory
5159

Documentation/Libraries/Reflection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
@copydetails group_reflection
88

99
# Dependencies
10-
- Direct dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Strings](@ref library_strings)
11-
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Strings](@ref library_strings)
10+
- Direct dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory)
11+
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory)
1212

1313
# Statistics
1414
| Type | Lines Of Code | Comments | Sum |

Documentation/Libraries/SerializationBinary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Dependencies
1010
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection)
11-
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
11+
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection)
1212

1313
# Statistics
1414
| Type | Lines Of Code | Comments | Sum |

Documentation/Libraries/SerializationText.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@copydetails group_serialization_text
88

99
# Dependencies
10-
- Direct dependencies: [Foundation](@ref library_foundation), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
10+
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
1111
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
1212

1313
# Statistics

Documentation/Libraries/Strings.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
Strings library allow read-only and write string operations and UTF Conversions.
88
Path is able to parse and manipulate windows and posix paths.
99

10+
@note SC::String and SC::SmallString, the "classic C++ style" string containers are defined in [Memory](@ref library_memory) because they are based on SC::Buffer and they use dynamic memory allocation provided by the Memory library.
11+
12+
1013
# Dependencies
11-
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory)
12-
- All dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory)
14+
- Direct dependencies: [Foundation](@ref library_foundation)
15+
- All dependencies: [Foundation](@ref library_foundation)
1316

1417
# Statistics
1518
| Type | Lines Of Code | Comments | Sum |
@@ -22,7 +25,6 @@ Path is able to parse and manipulate windows and posix paths.
2225

2326
| Class | Description
2427
|:--------------------------|:--------------------------------------|
25-
| SC::String | @copybrief SC::String |
2628
| SC::StringBuilder | @copybrief SC::StringBuilder |
2729
| SC::StringConverter | @copybrief SC::StringConverter |
2830
| SC::StringIterator | @copybrief SC::StringIterator |
@@ -122,9 +124,6 @@ Some relevant blog posts are:
122124
### StringBuilder::appendHex
123125
@copydoc SC::StringBuilder::appendHex
124126

125-
## String
126-
@copydoc SC::String
127-
128127
## StringIterator
129128
@copydoc SC::StringIterator
130129

Documentation/Pages/Dependencies.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This file describes what each library depends on.
1010
- All dependencies: [Async](@ref library_async), [File](@ref library_file), [FileSystem](@ref library_file_system), [Foundation](@ref library_foundation), [Socket](@ref library_socket), [Threading](@ref library_threading), [Time](@ref library_time)
1111

1212
# [Build](@ref library_build)
13-
- Direct dependencies: [Containers](@ref library_containers), [FileSystem](@ref library_file_system), [FileSystemIterator](@ref library_file_system_iterator), [Foundation](@ref library_foundation), [Hashing](@ref library_hashing), [Process](@ref library_process), [Strings](@ref library_strings)
13+
- Direct dependencies: [Containers](@ref library_containers), [FileSystem](@ref library_file_system), [FileSystemIterator](@ref library_file_system_iterator), [Foundation](@ref library_foundation), [Hashing](@ref library_hashing), [Memory](@ref library_memory), [Process](@ref library_process), [Strings](@ref library_strings)
1414
- All dependencies: [Containers](@ref library_containers), [File](@ref library_file), [FileSystem](@ref library_file_system), [FileSystemIterator](@ref library_file_system_iterator), [Foundation](@ref library_foundation), [Hashing](@ref library_hashing), [Memory](@ref library_memory), [Process](@ref library_process), [Strings](@ref library_strings), [Time](@ref library_time)
1515

1616
# [Containers](@ref library_containers)
@@ -62,24 +62,24 @@ This file describes what each library depends on.
6262
- All dependencies: [File](@ref library_file), [Foundation](@ref library_foundation)
6363

6464
# [Reflection](@ref library_reflection)
65-
- Direct dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Strings](@ref library_strings)
66-
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Strings](@ref library_strings)
65+
- Direct dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory)
66+
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory)
6767

6868
# [SerializationBinary](@ref library_serialization_binary)
6969
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection)
70-
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
70+
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection)
7171

7272
# [SerializationText](@ref library_serialization_text)
73-
- Direct dependencies: [Foundation](@ref library_foundation), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
73+
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
7474
- All dependencies: [Containers](@ref library_containers), [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Reflection](@ref library_reflection), [Strings](@ref library_strings)
7575

7676
# [Socket](@ref library_socket)
7777
- Direct dependencies: [Foundation](@ref library_foundation)
7878
- All dependencies: [Foundation](@ref library_foundation)
7979

8080
# [Strings](@ref library_strings)
81-
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory)
82-
- All dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory)
81+
- Direct dependencies: [Foundation](@ref library_foundation)
82+
- All dependencies: [Foundation](@ref library_foundation)
8383

8484
# [Testing](@ref library_testing)
8585
- Direct dependencies: [Foundation](@ref library_foundation), [Memory](@ref library_memory), [Strings](@ref library_strings)

Examples/SCExample/Examples/ImguiHelpers.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
#pragma once
44
#include "Libraries/Containers/Vector.h"
55
#include "Libraries/Foundation/Result.h"
6-
#include "Libraries/Strings/String.h"
6+
#include "Libraries/Memory/String.h"
7+
#include "Libraries/Strings/StringView.h"
78
#include "imgui.h"
89

910
namespace SC

Examples/SCExample/Examples/SerializationExample/SerializationExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ struct SerializationTextReadVersioned<TextStream, ImVector<T>> : public Serializ
9090
} // namespace SC
9191

9292
#include "Libraries/FileSystem/FileSystem.h"
93+
#include "Libraries/Memory/String.h"
9394
#include "Libraries/Plugin/PluginMacros.h"
9495
#include "Libraries/Process/Process.h"
9596
#include "Libraries/SerializationBinary/SerializationBinary.h"
9697
#include "Libraries/SerializationText/SerializationJson.h"
9798
#include "Libraries/Strings/Path.h"
98-
#include "Libraries/Strings/String.h"
9999
#include "Libraries/Strings/StringBuilder.h"
100100

101101
#include "../ISCExample.h"

Examples/SCExample/SCExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
#include "Libraries/Async/Async.h"
77
#include "Libraries/Foundation/Deferred.h"
8+
#include "Libraries/Memory/String.h"
89
#include "Libraries/Socket/Socket.h"
9-
#include "Libraries/Strings/String.h"
1010
#include "Libraries/Strings/StringBuilder.h"
1111
#include "Libraries/Time/Time.h"
1212
#include "SCExampleSokol.h"

0 commit comments

Comments
 (0)