summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx/include
diff options
context:
space:
mode:
Diffstat (limited to 'FoundationEx/include')
-rw-r--r--FoundationEx/include/starshatter/foundation/data.h26
-rw-r--r--FoundationEx/include/starshatter/foundation/reader.h6
2 files changed, 30 insertions, 2 deletions
diff --git a/FoundationEx/include/starshatter/foundation/data.h b/FoundationEx/include/starshatter/foundation/data.h
new file mode 100644
index 0000000..20308a2
--- /dev/null
+++ b/FoundationEx/include/starshatter/foundation/data.h
@@ -0,0 +1,26 @@
+/* Starshatter: The Open Source Project
+ Copyright (c) 2021-2024, Starshatter: The Open Source Project Contributors
+ Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
+ Copyright (c) 1997-2006, Destroyer Studios LLC.
+*/
+
+#pragma once
+
+#include "reader.h"
+
+
+namespace starshatter
+{
+namespace foundation
+{
+namespace data
+{
+
+
+bool toggle_filesystem(bool enabled);
+Reader open(const char* pathname);
+
+
+} // namespace data
+} // namespace foundation
+} // namespace starshatter
diff --git a/FoundationEx/include/starshatter/foundation/reader.h b/FoundationEx/include/starshatter/foundation/reader.h
index 7ec81b4..69472c8 100644
--- a/FoundationEx/include/starshatter/foundation/reader.h
+++ b/FoundationEx/include/starshatter/foundation/reader.h
@@ -9,6 +9,8 @@
#include <cstddef>
#include <memory>
+#include <Text.h>
+
namespace starshatter
{
@@ -40,7 +42,7 @@ struct BaseReader
virtual Count read(Char* dest, Count bytes) = 0;
virtual Count peek(Char* dest) const = 0;
virtual Count peek(Char* dest, Count bytes) const = 0;
- virtual const Char* data() const = 0;
+ virtual Text more() = 0;
};
@@ -73,7 +75,7 @@ struct Reader : public BaseReader<char>
Count read(char* dest, Count bytes) override;
Count peek(char* dest) const override;
Count peek(char* dest, Count bytes) const override;
- const char* data() const override;
+ Text more() override;
private:
Base actual;
};