Compare commits
44 Commits
release-d2
...
59fa39070f
Author | SHA1 | Date | |
---|---|---|---|
59fa39070f | |||
c55994f67d | |||
e81d28a681 | |||
0626c2a815 | |||
10a12f2ab2 | |||
2667be88f6 | |||
5972d8acef | |||
9c026e1a6c | |||
1dff26d895 | |||
ff2eb5b11b | |||
28b1c6dcf4 | |||
ef9cb8bea4 | |||
0d106bde21 | |||
b75bbc4d20 | |||
227dd68a4f | |||
02db760b8c | |||
09c57545bc | |||
f128664a81 | |||
e84df7801e | |||
caa59f3724 | |||
1cf09433e8 | |||
9948346ce4 | |||
aa8200beed | |||
124c7029bd | |||
5d1f680a51 | |||
c2e34b6456 | |||
173d3f4bc7 | |||
8a29c0952c | |||
5848bc8eb7 | |||
7ba66787f8 | |||
e367575974 | |||
2bc2003caa | |||
b31062e609 | |||
e4285bd48b | |||
a76638cc86 | |||
5433fd9b1d | |||
b46cb65b7f | |||
877349df46 | |||
5418c06296 | |||
dd9c1100c3 | |||
db82aee7c7 | |||
edf15858ca | |||
d1efbb2ffa | |||
051623f4b5 |
@ -2,4 +2,4 @@
|
|||||||
source:
|
source:
|
||||||
- src
|
- src
|
||||||
copyright_notice: |-
|
copyright_notice: |-
|
||||||
Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||||
|
6
deps/glutils/.liccor.yml
vendored
Normal file
6
deps/glutils/.liccor.yml
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
source:
|
||||||
|
- include
|
||||||
|
- src
|
||||||
|
copyright_notice: |-
|
||||||
|
Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
37
deps/glutils/include/glutils/glutils.hpp
vendored
37
deps/glutils/include/glutils/glutils.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -150,8 +150,39 @@ class FrameBufferBind {
|
|||||||
|
|
||||||
void bind(const FrameBuffer &fb) noexcept;
|
void bind(const FrameBuffer &fb) noexcept;
|
||||||
|
|
||||||
|
struct ShaderVarSet {
|
||||||
|
GLsizei len{};
|
||||||
|
ox::String name;
|
||||||
|
};
|
||||||
|
|
||||||
ox::Result<GLProgram> buildShaderProgram(ox::CStringView const&vert, ox::CStringView const&frag, ox::CStringView const&geo = "") noexcept;
|
struct ProgramSource {
|
||||||
|
ox::Vector<glutils::ShaderVarSet> const shaderParams;
|
||||||
|
GLsizei const rowLen = [this] {
|
||||||
|
GLsizei len{};
|
||||||
|
for (auto const&v : shaderParams) {
|
||||||
|
len += v.len;
|
||||||
|
}
|
||||||
|
return len;
|
||||||
|
}();
|
||||||
|
GLsizei const vboLen = rowLen * 4;
|
||||||
|
ox::String const vertShader{};
|
||||||
|
ox::String const fragShader{};
|
||||||
|
ox::String const geomShader{};
|
||||||
|
};
|
||||||
|
|
||||||
|
ox::Result<GLProgram> buildShaderProgram(ProgramSource const&src) noexcept;
|
||||||
|
|
||||||
|
ox::Result<GLProgram> buildShaderProgram(
|
||||||
|
ox::CStringView const&vert,
|
||||||
|
ox::CStringView const&frag,
|
||||||
|
ox::CStringView const&geo = "") noexcept;
|
||||||
|
|
||||||
|
void setupShaderParams(
|
||||||
|
GLProgram const&shader,
|
||||||
|
ox::Vector<ShaderVarSet> const&vars,
|
||||||
|
GLsizei vertexRowLen) noexcept;
|
||||||
|
|
||||||
|
void setupShaderParams(GLProgram const&shader, ox::Vector<ShaderVarSet> const&vars) noexcept;
|
||||||
|
|
||||||
glutils::GLVertexArray generateVertexArrayObject() noexcept;
|
glutils::GLVertexArray generateVertexArrayObject() noexcept;
|
||||||
|
|
||||||
@ -160,6 +191,8 @@ glutils::GLBuffer generateBuffer() noexcept;
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
FrameBuffer generateFrameBuffer(int width, int height) noexcept;
|
FrameBuffer generateFrameBuffer(int width, int height) noexcept;
|
||||||
|
|
||||||
|
void resizeFrameBuffer(FrameBuffer &fb, int width, int height) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes a FrameBuffer, and creates if it does not already exist.
|
* Resizes a FrameBuffer, and creates if it does not already exist.
|
||||||
*/
|
*/
|
||||||
|
50
deps/glutils/src/glutils.cpp
vendored
50
deps/glutils/src/glutils.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/std/assert.hpp>
|
#include <ox/std/assert.hpp>
|
||||||
@ -88,6 +88,40 @@ static ox::Result<GLShader> buildShader(
|
|||||||
return shader;
|
return shader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ox::Result<GLProgram> buildShaderProgram(ProgramSource const&src) noexcept {
|
||||||
|
oxRequireM(program, buildShaderProgram(
|
||||||
|
src.vertShader,
|
||||||
|
src.fragShader,
|
||||||
|
src.geomShader));
|
||||||
|
setupShaderParams(program, src.shaderParams, src.rowLen);
|
||||||
|
return std::move(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupShaderParams(
|
||||||
|
GLProgram const&shader,
|
||||||
|
ox::Vector<ShaderVarSet> const&vars,
|
||||||
|
GLsizei vertexRowLen) noexcept {
|
||||||
|
// setup vars
|
||||||
|
for (auto lenWritten = 0LU; auto const&v : vars) {
|
||||||
|
auto const attr = static_cast<GLuint>(glGetAttribLocation(shader, v.name.c_str()));
|
||||||
|
glEnableVertexAttribArray(attr);
|
||||||
|
glVertexAttribPointer(
|
||||||
|
attr, v.len, GL_FLOAT, GL_FALSE,
|
||||||
|
vertexRowLen * static_cast<GLsizei>(sizeof(float)),
|
||||||
|
std::bit_cast<void*>(uintptr_t{lenWritten * sizeof(float)}));
|
||||||
|
lenWritten += static_cast<size_t>(v.len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupShaderParams(GLProgram const&shader, ox::Vector<ShaderVarSet> const&vars) noexcept {
|
||||||
|
// get row len
|
||||||
|
GLsizei vertexRowLen{};
|
||||||
|
for (auto const&v : vars) {
|
||||||
|
vertexRowLen += v.len;
|
||||||
|
}
|
||||||
|
setupShaderParams(shader, vars, vertexRowLen);
|
||||||
|
}
|
||||||
|
|
||||||
ox::Result<GLProgram> buildShaderProgram(
|
ox::Result<GLProgram> buildShaderProgram(
|
||||||
ox::CStringView const&vert,
|
ox::CStringView const&vert,
|
||||||
ox::CStringView const&frag,
|
ox::CStringView const&frag,
|
||||||
@ -147,11 +181,7 @@ FrameBuffer generateFrameBuffer(int width, int height) noexcept {
|
|||||||
return fb;
|
return fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void resizeInitFrameBuffer(FrameBuffer &fb, int width, int height) noexcept {
|
void resizeFrameBuffer(FrameBuffer &fb, int width, int height) noexcept {
|
||||||
if (!fb) {
|
|
||||||
fb = generateFrameBuffer(width, height);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
width = ox::max(1, width);
|
width = ox::max(1, width);
|
||||||
height = ox::max(1, height);
|
height = ox::max(1, height);
|
||||||
fb.width = width;
|
fb.width = width;
|
||||||
@ -171,6 +201,14 @@ void resizeInitFrameBuffer(FrameBuffer &fb, int width, int height) noexcept {
|
|||||||
glBindRenderbuffer(GL_RENDERBUFFER, 0);
|
glBindRenderbuffer(GL_RENDERBUFFER, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resizeInitFrameBuffer(FrameBuffer &fb, int width, int height) noexcept {
|
||||||
|
if (!fb) {
|
||||||
|
fb = generateFrameBuffer(width, height);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resizeFrameBuffer(fb, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
void resizeInitFrameBuffer(FrameBuffer &fb, ox::Size const&sz) noexcept {
|
void resizeInitFrameBuffer(FrameBuffer &fb, ox::Size const&sz) noexcept {
|
||||||
resizeInitFrameBuffer(fb, sz.width, sz.height);
|
resizeInitFrameBuffer(fb, sz.width, sz.height);
|
||||||
}
|
}
|
||||||
|
4
deps/ox/src/ox/clargs/clargs.cpp
vendored
4
deps/ox/src/ox/clargs/clargs.cpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/std/string.hpp>
|
#include <ox/std/string.hpp>
|
||||||
|
4
deps/ox/src/ox/clargs/clargs.hpp
vendored
4
deps/ox/src/ox/clargs/clargs.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/claw/claw.hpp
vendored
2
deps/ox/src/ox/claw/claw.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/claw/format.hpp
vendored
2
deps/ox/src/ox/claw/format.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/claw/read.cpp
vendored
2
deps/ox/src/ox/claw/read.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
4
deps/ox/src/ox/claw/readclaw.cpp
vendored
4
deps/ox/src/ox/claw/readclaw.cpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
2
deps/ox/src/ox/claw/test/tests.cpp
vendored
2
deps/ox/src/ox/claw/test/tests.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/claw/write.cpp
vendored
2
deps/ox/src/ox/claw/write.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "write.hpp"
|
#include "write.hpp"
|
||||||
|
4
deps/ox/src/ox/claw/write.hpp
vendored
4
deps/ox/src/ox/claw/write.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/event/event.hpp
vendored
2
deps/ox/src/ox/event/event.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/event/signal.cpp
vendored
2
deps/ox/src/ox/event/signal.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "signal.hpp"
|
#include "signal.hpp"
|
||||||
|
2
deps/ox/src/ox/event/signal.hpp
vendored
2
deps/ox/src/ox/event/signal.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/event/test/tests.cpp
vendored
2
deps/ox/src/ox/event/test/tests.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "filestoretemplate.hpp"
|
#include "filestoretemplate.hpp"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/fs/filesystem/directory.cpp
vendored
2
deps/ox/src/ox/fs/filesystem/directory.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "directory.hpp"
|
#include "directory.hpp"
|
||||||
|
4
deps/ox/src/ox/fs/filesystem/directory.hpp
vendored
4
deps/ox/src/ox/fs/filesystem/directory.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
28
deps/ox/src/ox/fs/filesystem/filelocation.cpp
vendored
28
deps/ox/src/ox/fs/filesystem/filelocation.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/model/modelops.hpp>
|
#include <ox/model/modelops.hpp>
|
||||||
@ -88,6 +88,32 @@ FileAddress &FileAddress::operator=(FileAddress &&other) noexcept {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FileAddress::operator==(FileAddress const&other) const noexcept {
|
||||||
|
if (m_type != other.m_type) {
|
||||||
|
auto const aIsPath =
|
||||||
|
m_type == FileAddressType::Path || m_type == FileAddressType::ConstPath;
|
||||||
|
auto const bIsPath =
|
||||||
|
other.m_type == FileAddressType::Path || other.m_type == FileAddressType::ConstPath;
|
||||||
|
if (!(aIsPath && bIsPath)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch (m_type) {
|
||||||
|
case FileAddressType::ConstPath:
|
||||||
|
case FileAddressType::Path: {
|
||||||
|
auto const a = getPath();
|
||||||
|
auto const b = other.getPath();
|
||||||
|
return (other.m_type == FileAddressType::ConstPath || other.m_type == FileAddressType::Path)
|
||||||
|
&& (a.value == b.value);
|
||||||
|
}
|
||||||
|
case FileAddressType::Inode:
|
||||||
|
return m_data.inode == other.m_data.inode;
|
||||||
|
case FileAddressType::None:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool FileAddress::operator==(CRStringView path) const noexcept {
|
bool FileAddress::operator==(CRStringView path) const noexcept {
|
||||||
auto [p, err] = getPath();
|
auto [p, err] = getPath();
|
||||||
if (err) {
|
if (err) {
|
||||||
|
11
deps/ox/src/ox/fs/filesystem/filelocation.hpp
vendored
11
deps/ox/src/ox/fs/filesystem/filelocation.hpp
vendored
@ -22,6 +22,9 @@ enum class FileAddressType: int8_t {
|
|||||||
Inode,
|
Inode,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
constexpr Error model(T *h, CommonPtrWith<class FileAddress> auto *fa) noexcept;
|
||||||
|
|
||||||
class FileAddress {
|
class FileAddress {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@ -67,6 +70,8 @@ class FileAddress {
|
|||||||
|
|
||||||
FileAddress &operator=(FileAddress &&other) noexcept;
|
FileAddress &operator=(FileAddress &&other) noexcept;
|
||||||
|
|
||||||
|
bool operator==(const FileAddress &other) const noexcept;
|
||||||
|
|
||||||
bool operator==(CRStringView path) const noexcept;
|
bool operator==(CRStringView path) const noexcept;
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
@ -89,12 +94,12 @@ class FileAddress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Result<ox::StringView> getPath() const noexcept {
|
constexpr Result<ox::CStringView> getPath() const noexcept {
|
||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
case FileAddressType::Path:
|
case FileAddressType::Path:
|
||||||
return ox::StringView(m_data.path);
|
return ox::CStringView(m_data.path);
|
||||||
case FileAddressType::ConstPath:
|
case FileAddressType::ConstPath:
|
||||||
return ox::StringView(m_data.constPath);
|
return ox::CStringView(m_data.constPath);
|
||||||
default:
|
default:
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
}
|
}
|
||||||
|
4
deps/ox/src/ox/fs/filesystem/filesystem.cpp
vendored
4
deps/ox/src/ox/fs/filesystem/filesystem.cpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/std/error.hpp>
|
#include <ox/std/error.hpp>
|
||||||
|
4
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
4
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/std/error.hpp>
|
#include <ox/std/error.hpp>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/std/memops.hpp>
|
#include <ox/std/memops.hpp>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/fs/filesystem/types.hpp
vendored
2
deps/ox/src/ox/fs/filesystem/types.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/fs/fs.hpp
vendored
2
deps/ox/src/ox/fs/fs.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
4
deps/ox/src/ox/fs/ptrarith/nodebuffer.hpp
vendored
4
deps/ox/src/ox/fs/ptrarith/nodebuffer.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
4
deps/ox/src/ox/fs/ptrarith/ptr.hpp
vendored
4
deps/ox/src/ox/fs/ptrarith/ptr.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/fs/test/tests.cpp
vendored
2
deps/ox/src/ox/fs/test/tests.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// make sure asserts are enabled for the test file
|
// make sure asserts are enabled for the test file
|
||||||
|
4
deps/ox/src/ox/fs/tool.cpp
vendored
4
deps/ox/src/ox/fs/tool.cpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
2
deps/ox/src/ox/logconn/def.hpp
vendored
2
deps/ox/src/ox/logconn/def.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/logconn/logconn.cpp
vendored
2
deps/ox/src/ox/logconn/logconn.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/mc/err.hpp
vendored
2
deps/ox/src/ox/mc/err.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/mc/intops.hpp
vendored
2
deps/ox/src/ox/mc/intops.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/mc/mc.hpp
vendored
2
deps/ox/src/ox/mc/mc.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/mc/presenceindicator.cpp
vendored
2
deps/ox/src/ox/mc/presenceindicator.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "err.hpp"
|
#include "err.hpp"
|
||||||
|
4
deps/ox/src/ox/mc/presenceindicator.hpp
vendored
4
deps/ox/src/ox/mc/presenceindicator.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/mc/read.hpp
vendored
2
deps/ox/src/ox/mc/read.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/mc/types.hpp
vendored
2
deps/ox/src/ox/mc/types.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/mc/write.hpp
vendored
2
deps/ox/src/ox/mc/write.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/model/def.hpp
vendored
2
deps/ox/src/ox/model/def.hpp
vendored
@ -13,5 +13,5 @@
|
|||||||
#define oxModelBegin(modelName) constexpr ox::Error model(auto *io, [[maybe_unused]] ox::CommonPtrWith<modelName> auto *o) noexcept { oxReturnError(io->template setTypeInfo<modelName>());
|
#define oxModelBegin(modelName) constexpr ox::Error model(auto *io, [[maybe_unused]] ox::CommonPtrWith<modelName> auto *o) noexcept { oxReturnError(io->template setTypeInfo<modelName>());
|
||||||
#define oxModelEnd() return OxError(0); }
|
#define oxModelEnd() return OxError(0); }
|
||||||
#define oxModelField(fieldName) oxReturnError(io->field(#fieldName, &o->fieldName));
|
#define oxModelField(fieldName) oxReturnError(io->field(#fieldName, &o->fieldName));
|
||||||
#define oxModelFieldRename(serFieldName, objFieldName) oxReturnError(io->field(#serFieldName, &o->objFieldName));
|
#define oxModelFieldRename(objFieldName, serFieldName) oxReturnError(io->field(#serFieldName, &o->objFieldName));
|
||||||
#define oxModelFriend(modelName) friend constexpr ox::Error model(auto*, ox::CommonPtrWith<modelName> auto*) noexcept
|
#define oxModelFriend(modelName) friend constexpr ox::Error model(auto*, ox::CommonPtrWith<modelName> auto*) noexcept
|
||||||
|
2
deps/ox/src/ox/model/descread.hpp
vendored
2
deps/ox/src/ox/model/descread.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/model/desctypes.cpp
vendored
2
deps/ox/src/ox/model/desctypes.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "desctypes.hpp"
|
#include "desctypes.hpp"
|
||||||
|
2
deps/ox/src/ox/model/descwrite.hpp
vendored
2
deps/ox/src/ox/model/descwrite.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/model/fieldcounter.hpp
vendored
2
deps/ox/src/ox/model/fieldcounter.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/model/metadata.hpp
vendored
2
deps/ox/src/ox/model/metadata.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/model/modelhandleradaptor.hpp
vendored
2
deps/ox/src/ox/model/modelhandleradaptor.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
4
deps/ox/src/ox/model/modelops.hpp
vendored
4
deps/ox/src/ox/model/modelops.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
11
deps/ox/src/ox/model/modelvalue.hpp
vendored
11
deps/ox/src/ox/model/modelvalue.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@ -334,7 +334,12 @@ consteval bool isVector(const ModelValueVector*) noexcept {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr Error model(auto *h, CommonPtrWith<ModelObject> auto *obj) noexcept;
|
||||||
|
constexpr Error model(auto *h, CommonPtrWith<ModelUnion> auto *obj) noexcept;
|
||||||
|
|
||||||
|
|
||||||
class ModelObject {
|
class ModelObject {
|
||||||
|
friend constexpr Error model(auto *h, CommonPtrWith<ModelObject> auto *obj) noexcept;
|
||||||
public:
|
public:
|
||||||
struct Field {
|
struct Field {
|
||||||
String name;
|
String name;
|
||||||
@ -517,7 +522,7 @@ class ModelUnion {
|
|||||||
String name;
|
String name;
|
||||||
ModelValue value;
|
ModelValue value;
|
||||||
};
|
};
|
||||||
oxModelFriend(ModelUnion);
|
friend constexpr Error model(auto *h, CommonPtrWith<ModelUnion> auto *obj) noexcept;
|
||||||
friend ModelValue;
|
friend ModelValue;
|
||||||
Vector<UniquePtr<Field>> m_fieldsOrder;
|
Vector<UniquePtr<Field>> m_fieldsOrder;
|
||||||
HashMap<String, Field*> m_fields;
|
HashMap<String, Field*> m_fields;
|
||||||
@ -755,7 +760,7 @@ constexpr std::size_t alignOf(const ModelValue &t) noexcept {
|
|||||||
size = PlatSpec::alignOf(t.get<int64_t>());
|
size = PlatSpec::alignOf(t.get<int64_t>());
|
||||||
break;
|
break;
|
||||||
case ModelValue::Type::String:
|
case ModelValue::Type::String:
|
||||||
size = PlatSpec::alignOf(t.get<ox::String>());
|
size = alignOf<PlatSpec>(t.get<ox::String>());
|
||||||
break;
|
break;
|
||||||
case ModelValue::Type::Object:
|
case ModelValue::Type::Object:
|
||||||
size = alignOf<PlatSpec>(t.get<ox::ModelObject>());
|
size = alignOf<PlatSpec>(t.get<ox::ModelObject>());
|
||||||
|
2
deps/ox/src/ox/model/test/tests.cpp
vendored
2
deps/ox/src/ox/model/test/tests.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/model/typenamecatcher.hpp
vendored
2
deps/ox/src/ox/model/typenamecatcher.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/model/types.hpp
vendored
2
deps/ox/src/ox/model/types.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
4
deps/ox/src/ox/model/walk.hpp
vendored
4
deps/ox/src/ox/model/walk.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/oc/oc.hpp
vendored
2
deps/ox/src/ox/oc/oc.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/oc/read.hpp
vendored
2
deps/ox/src/ox/oc/read.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/oc/test/tests.cpp
vendored
2
deps/ox/src/ox/oc/test/tests.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
6
deps/ox/src/ox/oc/write.hpp
vendored
6
deps/ox/src/ox/oc/write.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@ -27,7 +27,7 @@ class OrganicClawWriter {
|
|||||||
friend Result<Buffer> writeOC(const auto &val) noexcept;
|
friend Result<Buffer> writeOC(const auto &val) noexcept;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Json::Value m_json;
|
Json::Value m_json{Json::Value(Json::objectValue)};
|
||||||
Json::ArrayIndex m_fieldIt = 0;
|
Json::ArrayIndex m_fieldIt = 0;
|
||||||
int m_unionIdx = -1;
|
int m_unionIdx = -1;
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ Error OrganicClawWriter::field(const char *key, const T *val) noexcept {
|
|||||||
OrganicClawWriter w;
|
OrganicClawWriter w;
|
||||||
ModelHandlerInterface<OrganicClawWriter, OpType::Write> handler{&w};
|
ModelHandlerInterface<OrganicClawWriter, OpType::Write> handler{&w};
|
||||||
oxReturnError(model(&handler, val));
|
oxReturnError(model(&handler, val));
|
||||||
if (!w.m_json.isNull()) {
|
if (!w.m_json.empty() || m_json.isArray()) {
|
||||||
value(key) = w.m_json;
|
value(key) = w.m_json;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
9
deps/ox/src/ox/preloader/platspecs.hpp
vendored
9
deps/ox/src/ox/preloader/platspecs.hpp
vendored
@ -1,10 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <ox/std/serialize.hpp>
|
#include <ox/std/serialize.hpp>
|
||||||
|
#include <ox/std/string.hpp>
|
||||||
#include <ox/std/typetraits.hpp>
|
#include <ox/std/typetraits.hpp>
|
||||||
|
|
||||||
#include "alignmentcatcher.hpp"
|
#include "alignmentcatcher.hpp"
|
||||||
@ -47,7 +52,7 @@ constexpr std::size_t alignOf(const T &v) noexcept {
|
|||||||
typename PlatSpec::PtrType p = 0;
|
typename PlatSpec::PtrType p = 0;
|
||||||
return PlatSpec::alignOf(p);
|
return PlatSpec::alignOf(p);
|
||||||
} else {
|
} else {
|
||||||
AlignmentCatcher<NativePlatSpec> c;
|
AlignmentCatcher<PlatSpec> c;
|
||||||
oxAssert(model(c.interface(), &v), "Could not get alignment for type");
|
oxAssert(model(c.interface(), &v), "Could not get alignment for type");
|
||||||
return c.biggestAlignment;
|
return c.biggestAlignment;
|
||||||
}
|
}
|
||||||
|
6
deps/ox/src/ox/preloader/preloader.cpp
vendored
6
deps/ox/src/ox/preloader/preloader.cpp
vendored
@ -1,5 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "preloader.hpp"
|
#include "preloader.hpp"
|
||||||
|
54
deps/ox/src/ox/preloader/preloader.hpp
vendored
54
deps/ox/src/ox/preloader/preloader.hpp
vendored
@ -1,5 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -10,10 +14,12 @@
|
|||||||
#include <ox/std/error.hpp>
|
#include <ox/std/error.hpp>
|
||||||
#include <ox/std/memops.hpp>
|
#include <ox/std/memops.hpp>
|
||||||
#include <ox/std/memory.hpp>
|
#include <ox/std/memory.hpp>
|
||||||
|
#include <ox/std/string.hpp>
|
||||||
#include <ox/std/types.hpp>
|
#include <ox/std/types.hpp>
|
||||||
#include <ox/std/typetraits.hpp>
|
#include <ox/std/typetraits.hpp>
|
||||||
#include <ox/std/units.hpp>
|
#include <ox/std/units.hpp>
|
||||||
#include <ox/model/modelhandleradaptor.hpp>
|
#include <ox/model/modelhandleradaptor.hpp>
|
||||||
|
#include <ox/model/modelvalue.hpp>
|
||||||
|
|
||||||
#include "platspecs.hpp"
|
#include "platspecs.hpp"
|
||||||
|
|
||||||
@ -101,9 +107,9 @@ class Preloader: public ModelHandlerBase<Preloader<PlatSpec>, OpType::Reflect> {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr ox::Error field(CRStringView, const T **val, std::size_t cnt) noexcept;
|
constexpr ox::Error field(CRStringView, const T **val, std::size_t cnt) noexcept;
|
||||||
|
|
||||||
constexpr ox::Result<std::size_t> startAlloc(std::size_t sz) noexcept;
|
constexpr ox::Result<std::size_t> startAlloc(size_t sz, size_t align) noexcept;
|
||||||
|
|
||||||
constexpr ox::Result<std::size_t> startAlloc(std::size_t sz, std::size_t restore) noexcept;
|
constexpr ox::Result<std::size_t> startAlloc(size_t sz, size_t align, std::size_t restore) noexcept;
|
||||||
|
|
||||||
constexpr ox::Error endAlloc() noexcept;
|
constexpr ox::Error endAlloc() noexcept;
|
||||||
|
|
||||||
@ -165,14 +171,16 @@ constexpr ox::Error Preloader<PlatSpec>::field(CRStringView name, const T *val)
|
|||||||
}
|
}
|
||||||
oxReturnError(pad(val));
|
oxReturnError(pad(val));
|
||||||
if constexpr(ox::is_integral_v<T>) {
|
if constexpr(ox::is_integral_v<T>) {
|
||||||
//oxDebugf("Preloader::field(name, val): {}", name);
|
|
||||||
return ox::serialize(&m_writer, PlatSpec::correctEndianness(*val));
|
return ox::serialize(&m_writer, PlatSpec::correctEndianness(*val));
|
||||||
} else if constexpr(ox::is_pointer_v<T>) {
|
} else if constexpr(ox::is_pointer_v<T>) {
|
||||||
const PtrType a = startAlloc(sizeOf<PlatSpec>(*val), m_writer.tellp()) + PlatSpec::RomStart;
|
const PtrType a = startAlloc(sizeOf<PlatSpec>(val), alignOf<PlatSpec>(*val), m_writer.tellp()) + PlatSpec::RomStart;
|
||||||
oxReturnError(field(name, *val));
|
oxReturnError(field(name, *val));
|
||||||
oxReturnError(endAlloc());
|
oxReturnError(endAlloc());
|
||||||
return ox::serialize(&m_writer, PlatSpec::correctEndianness(a));
|
return ox::serialize(&m_writer, PlatSpec::correctEndianness(a));
|
||||||
} else if constexpr(ox::isVector_v<T> || ox::is_same_v<T, ox::ModelValueVector>) {
|
} else if constexpr(ox::isVector_v<T>) {
|
||||||
|
return fieldVector(name, val);
|
||||||
|
} else if constexpr(ox::is_same_v<T, ox::ModelValueVector>) {
|
||||||
|
val->types();
|
||||||
return fieldVector(name, val);
|
return fieldVector(name, val);
|
||||||
} else {
|
} else {
|
||||||
m_unionIdx.emplace_back(-1);
|
m_unionIdx.emplace_back(-1);
|
||||||
@ -218,6 +226,7 @@ constexpr ox::Error Preloader<PlatSpec>::field(CRStringView name, const ox::Arra
|
|||||||
if (!unionCheckAndIt()) {
|
if (!unionCheckAndIt()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
oxReturnError(pad(&(*val)[0]));
|
||||||
// serialize the Array elements
|
// serialize the Array elements
|
||||||
if constexpr(sz) {
|
if constexpr(sz) {
|
||||||
m_unionIdx.emplace_back(-1);
|
m_unionIdx.emplace_back(-1);
|
||||||
@ -235,27 +244,36 @@ constexpr ox::Error Preloader<PlatSpec>::field(CRStringView, const T **val, std:
|
|||||||
if (!unionCheckAndIt()) {
|
if (!unionCheckAndIt()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
// serialize the array
|
if (cnt) {
|
||||||
m_unionIdx.emplace_back(-1);
|
oxReturnError(pad(*val));
|
||||||
for (std::size_t i = 0; i < cnt; ++i) {
|
// serialize the array
|
||||||
oxReturnError(this->interface()->field(nullptr, &val[i]));
|
m_unionIdx.emplace_back(-1);
|
||||||
|
for (std::size_t i = 0; i < cnt; ++i) {
|
||||||
|
oxReturnError(this->interface()->field(nullptr, &val[i]));
|
||||||
|
}
|
||||||
|
m_unionIdx.pop_back();
|
||||||
}
|
}
|
||||||
m_unionIdx.pop_back();
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PlatSpec>
|
template<typename PlatSpec>
|
||||||
constexpr ox::Result<std::size_t> Preloader<PlatSpec>::startAlloc(std::size_t sz) noexcept {
|
constexpr ox::Result<std::size_t> Preloader<PlatSpec>::startAlloc(size_t sz, size_t align) noexcept {
|
||||||
oxRequire(a, ox::allocate(&m_writer, sz));
|
|
||||||
m_allocStack.emplace_back(static_cast<typename PlatSpec::PtrType>(m_writer.tellp()));
|
m_allocStack.emplace_back(static_cast<typename PlatSpec::PtrType>(m_writer.tellp()));
|
||||||
|
oxReturnError(m_writer.seekp(0, ox::ios_base::end));
|
||||||
|
const auto padding = m_writer.tellp() % align;
|
||||||
|
oxRequireM(a, ox::allocate(&m_writer, sz + padding));
|
||||||
|
a += padding;
|
||||||
oxReturnError(m_writer.seekp(a));
|
oxReturnError(m_writer.seekp(a));
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename PlatSpec>
|
template<typename PlatSpec>
|
||||||
constexpr ox::Result<std::size_t> Preloader<PlatSpec>::startAlloc(std::size_t sz, std::size_t restore) noexcept {
|
constexpr ox::Result<std::size_t> Preloader<PlatSpec>::startAlloc(std::size_t sz, size_t align, std::size_t restore) noexcept {
|
||||||
oxRequire(a, ox::allocate(&m_writer, sz));
|
|
||||||
m_allocStack.emplace_back(restore, ox::ios_base::beg);
|
m_allocStack.emplace_back(restore, ox::ios_base::beg);
|
||||||
|
oxReturnError(m_writer.seekp(0, ox::ios_base::end));
|
||||||
|
const auto padding = m_writer.tellp() % align;
|
||||||
|
oxRequireM(a, ox::allocate(&m_writer, sz + padding));
|
||||||
|
a += padding;
|
||||||
oxReturnError(m_writer.seekp(a));
|
oxReturnError(m_writer.seekp(a));
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
@ -327,7 +345,11 @@ constexpr ox::Error Preloader<PlatSpec>::fieldVector(
|
|||||||
// serialize the Vector elements
|
// serialize the Vector elements
|
||||||
if (val->size()) {
|
if (val->size()) {
|
||||||
const auto sz = sizeOf<PlatSpec>(&(*val)[0]) * val->size();
|
const auto sz = sizeOf<PlatSpec>(&(*val)[0]) * val->size();
|
||||||
oxRequire(p, ox::allocate(&m_writer, sz));
|
const auto align = alignOf<PlatSpec>((*val)[0]);
|
||||||
|
oxReturnError(m_writer.seekp(0, ox::ios_base::end));
|
||||||
|
const auto padding = m_writer.tellp() % align;
|
||||||
|
oxRequireM(p, ox::allocate(&m_writer, sz + padding));
|
||||||
|
p += padding;
|
||||||
oxReturnError(m_writer.seekp(p));
|
oxReturnError(m_writer.seekp(p));
|
||||||
m_unionIdx.emplace_back(-1);
|
m_unionIdx.emplace_back(-1);
|
||||||
for (std::size_t i = 0; i < val->size(); ++i) {
|
for (std::size_t i = 0; i < val->size(); ++i) {
|
||||||
|
6
deps/ox/src/ox/preloader/sizecatcher.hpp
vendored
6
deps/ox/src/ox/preloader/sizecatcher.hpp
vendored
@ -1,5 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/algorithm.hpp
vendored
2
deps/ox/src/ox/std/algorithm.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
4
deps/ox/src/ox/std/array.hpp
vendored
4
deps/ox/src/ox/std/array.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/assert.cpp
vendored
2
deps/ox/src/ox/std/assert.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stacktrace.hpp"
|
#include "stacktrace.hpp"
|
||||||
|
2
deps/ox/src/ox/std/assert.hpp
vendored
2
deps/ox/src/ox/std/assert.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/basestringview.hpp
vendored
2
deps/ox/src/ox/std/basestringview.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/std/bit.cpp
vendored
2
deps/ox/src/ox/std/bit.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bit.hpp"
|
#include "bit.hpp"
|
||||||
|
4
deps/ox/src/ox/std/bit.hpp
vendored
4
deps/ox/src/ox/std/bit.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
4
deps/ox/src/ox/std/bounds.hpp
vendored
4
deps/ox/src/ox/std/bounds.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/bstring.hpp
vendored
2
deps/ox/src/ox/std/bstring.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/buffer.cpp
vendored
2
deps/ox/src/ox/std/buffer.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "error.hpp"
|
#include "error.hpp"
|
||||||
|
4
deps/ox/src/ox/std/buffer.hpp
vendored
4
deps/ox/src/ox/std/buffer.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/buildinfo.cpp
vendored
2
deps/ox/src/ox/std/buildinfo.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ox::buildinfo {
|
namespace ox::buildinfo {
|
||||||
|
2
deps/ox/src/ox/std/buildinfo.hpp
vendored
2
deps/ox/src/ox/std/buildinfo.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace ox::buildinfo {
|
namespace ox::buildinfo {
|
||||||
|
2
deps/ox/src/ox/std/byteswap.cpp
vendored
2
deps/ox/src/ox/std/byteswap.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "byteswap.hpp"
|
#include "byteswap.hpp"
|
||||||
|
4
deps/ox/src/ox/std/byteswap.hpp
vendored
4
deps/ox/src/ox/std/byteswap.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/cstringview.hpp
vendored
2
deps/ox/src/ox/std/cstringview.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/std/cstrops.hpp
vendored
2
deps/ox/src/ox/std/cstrops.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
4
deps/ox/src/ox/std/def.hpp
vendored
4
deps/ox/src/ox/std/def.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/defer.hpp
vendored
2
deps/ox/src/ox/std/defer.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/defines.hpp
vendored
2
deps/ox/src/ox/std/defines.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/error.hpp
vendored
2
deps/ox/src/ox/std/error.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/std/fmt.cpp
vendored
2
deps/ox/src/ox/std/fmt.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fmt.hpp"
|
#include "fmt.hpp"
|
||||||
|
2
deps/ox/src/ox/std/fmt.hpp
vendored
2
deps/ox/src/ox/std/fmt.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/hardware.hpp
vendored
2
deps/ox/src/ox/std/hardware.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/hashmap.hpp
vendored
2
deps/ox/src/ox/std/hashmap.hpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
2
deps/ox/src/ox/std/heapmgr.cpp
vendored
2
deps/ox/src/ox/std/heapmgr.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "assert.hpp"
|
#include "assert.hpp"
|
||||||
|
2
deps/ox/src/ox/std/heapmgr.hpp
vendored
2
deps/ox/src/ox/std/heapmgr.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
|
2
deps/ox/src/ox/std/initializerlist.hpp
vendored
2
deps/ox/src/ox/std/initializerlist.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
4
deps/ox/src/ox/std/iterator.hpp
vendored
4
deps/ox/src/ox/std/iterator.hpp
vendored
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2023 gary@drinkingtea.net
|
* Copyright 2015 - 2022 gary@drinkingtea.net
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/math.cpp
vendored
2
deps/ox/src/ox/std/math.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "math.hpp"
|
#include "math.hpp"
|
||||||
|
2
deps/ox/src/ox/std/math.hpp
vendored
2
deps/ox/src/ox/std/math.hpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
2
deps/ox/src/ox/std/memops.cpp
vendored
2
deps/ox/src/ox/std/memops.cpp
vendored
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user