Skip to content

Commit

Permalink
Moved lots of code into an implementation folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawoodoz committed Jan 31, 2025
1 parent d166dd9 commit f27f454
Show file tree
Hide file tree
Showing 112 changed files with 139 additions and 137 deletions.
2 changes: 1 addition & 1 deletion Source/DFPSR/api/bufferAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <fstream>
#include "bufferAPI.h"
#include "stringAPI.h"
#include "../math/scalar.h"
#include "../implementation/math/scalar.h"
#include "../base/SafePointer.h"

namespace dsr {
Expand Down
4 changes: 2 additions & 2 deletions Source/DFPSR/api/drawAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
// distribution.

#include "imageAPI.h"
#include "../math/scalar.h"
#include "../image/PackOrder.h"
#include "../implementation/math/scalar.h"
#include "../implementation/image/PackOrder.h"
#include <limits>

namespace dsr {
Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/api/drawAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef DFPSR_API_DRAW
#define DFPSR_API_DRAW

#include "../image/Image.h"
#include "../implementation/image/Image.h"

namespace dsr {

Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/api/filterAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "filterAPI.h"
#include "imageAPI.h"
#include "drawAPI.h"
#include "../image/PackOrder.h"
#include "../implementation/image/PackOrder.h"
#include "../base/simd.h"

namespace dsr {
Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/api/filterAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef DFPSR_API_FILTER
#define DFPSR_API_FILTER

#include "../image/Image.h"
#include "../implementation/image/Image.h"
#include <functional>

namespace dsr {
Expand Down
4 changes: 2 additions & 2 deletions Source/DFPSR/api/fontAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#include "fontAPI.h"
#include "imageAPI.h"
#include "../font/Font.h"
#include "../font/defaultFont.h"
#include "../implementation/font/Font.h"
#include "../implementation/font/defaultFont.h"

namespace dsr {

Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/api/fontAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef DFPSR_API_FONT
#define DFPSR_API_FONT

#include "../image/Image.h"
#include "../implementation/image/Image.h"
#include "stringAPI.h"

namespace dsr {
Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/api/guiAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "guiAPI.h"
#include "timeAPI.h"
#include "../gui/DsrWindow.h"
#include "../implementation/gui/DsrWindow.h"
#include "fileAPI.h"

using namespace dsr;
Expand Down
6 changes: 3 additions & 3 deletions Source/DFPSR/api/guiAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

#include "../base/Handle.h"
#include "../api/stringAPI.h"
#include "../image/Image.h"
#include "../gui/InputEvent.h"
#include "../gui/VisualTheme.h"
#include "../implementation/image/Image.h"
#include "../implementation/gui/InputEvent.h"
#include "../implementation/gui/VisualTheme.h"

// createBackendWindow should be implemented outside of the core framework
// Choose one of the window backends in SDK/native to compile and link with your application.
Expand Down
4 changes: 2 additions & 2 deletions Source/DFPSR/api/imageAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "imageAPI.h"
#include "drawAPI.h"
#include "fileAPI.h"
#include "../image/stbImage/stbImageWrapper.h"
#include "../math/scalar.h"
#include "../implementation/image/stbImage/stbImageWrapper.h"
#include "../implementation/math/scalar.h"
#include "../settings.h"

namespace dsr {
Expand Down
6 changes: 3 additions & 3 deletions Source/DFPSR/api/imageAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
#ifndef DFPSR_API_IMAGE
#define DFPSR_API_IMAGE

#include "../image/Image.h"
#include "../image/Color.h"
#include "../implementation/image/Image.h"
#include "../implementation/image/Color.h"
#include "../implementation/math/scalar.h"
#include "../base/heap.h"
#include "../math/scalar.h"

namespace dsr {

Expand Down
4 changes: 2 additions & 2 deletions Source/DFPSR/api/mediaMachineAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#define DSR_INTERNAL_ACCESS

#include "mediaMachineAPI.h"
#include "../machine/VirtualMachine.h"
#include "../machine/mediaFilters.h"
#include "../implementation/machine/VirtualMachine.h"
#include "../implementation/machine/mediaFilters.h"
#include "../api/imageAPI.h"
#include "../api/drawAPI.h"
#include "../api/filterAPI.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/api/mediaMachineAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef DFPSR_API_MEDIA_MACHINE
#define DFPSR_API_MEDIA_MACHINE

#include "../image/Image.h"
#include "../implementation/image/Image.h"
#include "../base/Handle.h"
#include "../math/FixedPoint.h"

Expand Down
4 changes: 2 additions & 2 deletions Source/DFPSR/api/modelAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include "modelAPI.h"
#include "imageAPI.h"
#include "drawAPI.h"
#include "../render/model/Model.h"
#include <limits>
#include "../implementation/render/model/Model.h"
#include "../base/virtualStack.h"
#include <limits>

#define MUST_EXIST(OBJECT, METHOD) if (OBJECT.isNull()) { throwError("The " #OBJECT " handle was null in " #METHOD "\n"); }

Expand Down
8 changes: 4 additions & 4 deletions Source/DFPSR/api/modelAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#define DFPSR_API_MODEL

#include "../math/FVector.h"
#include "../image/Texture.h"
#include "../render/Camera.h"
#include "../render/ResourcePool.h"
#include "../implementation/image/Texture.h"
#include "../implementation/render/Camera.h"
#include "../implementation/render/ResourcePool.h"

// TODO: Create a folder with types.
namespace dsr {
Expand All @@ -36,7 +36,7 @@ namespace dsr {
using Model = Handle<ModelImpl>;
}

#include "../render/model/format/dmf1.h"
#include "../implementation/render/model/format/dmf1.h"

namespace dsr {
// A handle to a multi-threaded rendering context.
Expand Down
1 change: 0 additions & 1 deletion Source/DFPSR/api/textureAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "textureAPI.h"
#include "imageAPI.h"
#include "filterAPI.h"
#include "drawAPI.h"

namespace dsr {

Expand Down
4 changes: 2 additions & 2 deletions Source/DFPSR/api/textureAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
#ifndef DFPSR_API_TEXTURE
#define DFPSR_API_TEXTURE

#include "../image/Texture.h"
#include "../image/Image.h"
#include "../implementation/image/Texture.h"
#include "../implementation/image/Image.h"
#ifndef NDEBUG
#include "../api/stringAPI.h"
#endif
Expand Down
2 changes: 2 additions & 0 deletions Source/DFPSR/base/simd3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
// 3. This notice may not be removed or altered from any source
// distribution.

// TODO: Replace simd3D.h with templates in the math folder using noSimd.h.

#include "simd.h"
#include "../math/FVector.h"

Expand Down
2 changes: 1 addition & 1 deletion Source/DFPSR/base/threading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "threading.h"
#include "virtualStack.h"
#include "../math/scalar.h"
#include "../implementation/math/scalar.h"

// Get settings from here.
#include "../settings.h"
Expand Down
3 changes: 3 additions & 0 deletions Source/DFPSR/implementation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The implementation folder
To clearly define what is a part of the external interface to the framework, the code that is mainly for internal use is placed within this implementation folder.
While you can include headers directly from the implementation by controlling exactly which version of the library you use, it should be kept to a minimum because it may break backward compatibility without warning in new releases.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#include <cstdint>
#include "Font.h"
#include "../api/imageAPI.h"
#include "../api/drawAPI.h"
#include "../../api/imageAPI.h"
#include "../../api/drawAPI.h"

using namespace dsr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#ifndef DFPSR_GUI_FONT
#define DFPSR_GUI_FONT

#include "../base/Handle.h"
#include "../api/stringAPI.h"
#include "../api/imageAPI.h"
#include "../math/IRect.h"
#include "../math/IVector.h"
#include "../../base/Handle.h"
#include "../../api/stringAPI.h"
#include "../../api/imageAPI.h"
#include "../../math/IRect.h"
#include "../../math/IVector.h"

namespace dsr {

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#include <cstdint>
#include <memory>
#include "InputEvent.h"
#include "../api/imageAPI.h"
#include "../api/stringAPI.h"
#include "../collection/List.h"
#include "../../api/imageAPI.h"
#include "../../api/stringAPI.h"
#include "../../collection/List.h"

namespace dsr {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
// <<<< Include new components here

#include "../math/scalar.h"
#include "../math/IVector.h"
#include "../api/imageAPI.h"
#include "../api/filterAPI.h"
#include "../../math/IVector.h"
#include "../../api/imageAPI.h"
#include "../../api/filterAPI.h"

using namespace dsr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#ifndef DFPSR_GUI_DSRWINDOW
#define DFPSR_GUI_DSRWINDOW

#include "../gui/VisualComponent.h"
#include "../gui/BackendWindow.h"
#include "../api/stringAPI.h"
#include "VisualComponent.h"
#include "BackendWindow.h"
#include "../../api/stringAPI.h"

// The DSR window is responsible for connecting visual interfaces with the backend window.
// An optional depth buffer is allocated on demand when requested, and kept until the window resizes.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#define DFPSR_GUI_FLEXREGION

#include <cstdint>
#include "../math/IVector.h"
#include "../math/IRect.h"
#include "../../math/IVector.h"
#include "../../math/IRect.h"
#include "../math/scalar.h"
#include "../api/stringAPI.h"
#include "../../api/stringAPI.h"
#include "../persistent/ClassFactory.h"

namespace dsr {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef DFPSR_GUI_INPUT_EVENT
#define DFPSR_GUI_INPUT_EVENT

#include "../math/IVector.h"
#include "../../math/IVector.h"
#include <functional>

namespace dsr {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include "InputEvent.h"
#include "componentStates.h"
#include "VisualTheme.h"
#include "../api/imageAPI.h"
#include "../api/drawAPI.h"
#include "../../api/imageAPI.h"
#include "../../api/drawAPI.h"

namespace dsr {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

#include <cstdint>
#include "VisualTheme.h"
#include "../api/fileAPI.h"
#include "../api/imageAPI.h"
#include "../api/drawAPI.h"
#include "../api/mediaMachineAPI.h"
#include "../api/configAPI.h"
#include "../../api/fileAPI.h"
#include "../../api/imageAPI.h"
#include "../../api/drawAPI.h"
#include "../../api/mediaMachineAPI.h"
#include "../../api/configAPI.h"
#include "../persistent/atomic/PersistentImage.h"

namespace dsr {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef DFPSR_GUI_VISUALTHEME
#define DFPSR_GUI_VISUALTHEME

#include "../api/mediaMachineAPI.h"
#include "../../api/mediaMachineAPI.h"
#include "componentStates.h"

namespace dsr {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define DFPSR_GUI_COMPONENT_BUTTON

#include "../VisualComponent.h"
#include "../../api/fontAPI.h"
#include "../../../api/fontAPI.h"

namespace dsr {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define DFPSR_GUI_COMPONENT_LABEL

#include "../VisualComponent.h"
#include "../../api/fontAPI.h"
#include "../../../api/fontAPI.h"

namespace dsr {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "../VisualComponent.h"
#include "helpers/ScrollBarImpl.h"
#include "../../api/fontAPI.h"
#include "../../../api/fontAPI.h"

namespace dsr {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define DFPSR_GUI_COMPONENT_MENU

#include "../VisualComponent.h"
#include "../../api/fontAPI.h"
#include "../../../api/fontAPI.h"

namespace dsr {

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// distribution.

#include "Picture.h"
#include "../../api/filterAPI.h"
#include "../../../api/filterAPI.h"

using namespace dsr;

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

#include "../VisualComponent.h"
#include "helpers/ScrollBarImpl.h"
#include "../../api/fontAPI.h"
#include "../../math/LVector.h"
#include "../../../api/fontAPI.h"
#include "../../../math/LVector.h"

namespace dsr {

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f27f454

Please sign in to comment.