Skip to content

Commit b6dfa8b

Browse files
committed
macros in modules
1 parent 44c04ec commit b6dfa8b

Some content is hidden

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

46 files changed

+95
-60
lines changed

sources/Core/Data/Data.ixx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
module;
2-
3-
#include "utils/utils_macros.h"
42
#include "Serialization/serialization_defines.h"
53

64
export module Data;

sources/Core/FileSystem/FileDepender.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22

3-
#include "utils/utils_macros.h"
3+
44
export module FileDepender;
55

66
import Utils;

sources/Core/FileSystem/FileSystem.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22

3-
#include "utils/utils_macros.h"
3+
44
export module FileSystem;
55

66
import Utils;

sources/Core/FileSystem/ResourceManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include "utils/utils_macros.h"
2+
33

44
#include "Serialization/Serializer.h"
55
import Utils;

sources/Core/FlowGraph/FlowGraph.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import FlowGraph;
2+
import serialization;
3+
4+
BOOST_CLASS_EXPORT_KEY(FlowGraph::window);
5+
BOOST_CLASS_EXPORT_KEY(FlowGraph::Node);
6+
BOOST_CLASS_EXPORT_KEY(FlowGraph::input);
7+
BOOST_CLASS_EXPORT_KEY(FlowGraph::output);
8+
BOOST_CLASS_EXPORT_KEY(FlowGraph::graph);
9+
BOOST_CLASS_EXPORT_KEY(FlowGraph::graph_input);
10+
BOOST_CLASS_EXPORT_KEY(FlowGraph::graph_output);
11+
BOOST_CLASS_EXPORT_KEY(FlowGraph::parameter_type);
12+
BOOST_CLASS_EXPORT_KEY(FlowGraph::strict_parameter);
13+
14+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::window);
15+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::Node);
16+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::input);
17+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::output);
18+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::graph);
19+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::graph_input);
20+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::graph_output);
21+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::parameter_type);
22+
BOOST_CLASS_EXPORT_IMPLEMENT(FlowGraph::strict_parameter);

sources/Core/FlowGraph/FlowGraph.ixx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,17 @@ export
831831

832832
}
833833

834+
/*
835+
BOOST_CLASS_EXPORT_KEY(FlowGraph::window);
836+
BOOST_CLASS_EXPORT_KEY(FlowGraph::Node);
837+
BOOST_CLASS_EXPORT_KEY(FlowGraph::input);
838+
BOOST_CLASS_EXPORT_KEY(FlowGraph::output);
839+
BOOST_CLASS_EXPORT_KEY(FlowGraph::graph);
840+
BOOST_CLASS_EXPORT_KEY(FlowGraph::graph_input);
841+
BOOST_CLASS_EXPORT_KEY(FlowGraph::graph_output);
842+
BOOST_CLASS_EXPORT_KEY(FlowGraph::parameter_type);
843+
BOOST_CLASS_EXPORT_KEY(FlowGraph::strict_parameter);
844+
*/
834845
module:private;
835846

836847
namespace FlowGraph
@@ -1776,20 +1787,3 @@ namespace FlowGraph
17761787
}
17771788

17781789

1779-
1780-
BOOST_CLASS_EXPORT(FlowGraph::window);
1781-
1782-
BOOST_CLASS_EXPORT(FlowGraph::Node);
1783-
BOOST_CLASS_EXPORT(FlowGraph::input);
1784-
BOOST_CLASS_EXPORT(FlowGraph::output);
1785-
1786-
BOOST_CLASS_EXPORT(FlowGraph::graph);
1787-
1788-
BOOST_CLASS_EXPORT(FlowGraph::graph_input);
1789-
BOOST_CLASS_EXPORT(FlowGraph::graph_output);
1790-
1791-
BOOST_CLASS_EXPORT(FlowGraph::parameter_type);
1792-
1793-
1794-
BOOST_CLASS_EXPORT(FlowGraph::strict_parameter);
1795-

sources/Core/Math/Math.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "Math.h"
2+
import serialization;
3+
4+
BOOST_CLASS_EXPORT_KEY(AABB)
5+
BOOST_CLASS_EXPORT_KEY(Frustum)
6+
BOOST_CLASS_EXPORT_KEY(Plane)
7+
BOOST_CLASS_EXPORT_KEY(Primitive)
8+
BOOST_CLASS_EXPORT_KEY(Ray)
9+
BOOST_CLASS_EXPORT_KEY(Sphere)
10+
11+
12+
BOOST_CLASS_EXPORT_IMPLEMENT(AABB)
13+
BOOST_CLASS_EXPORT_IMPLEMENT(Frustum)
14+
BOOST_CLASS_EXPORT_IMPLEMENT(Plane)
15+
BOOST_CLASS_EXPORT_IMPLEMENT(Primitive)
16+
BOOST_CLASS_EXPORT_IMPLEMENT(Ray)
17+
BOOST_CLASS_EXPORT_IMPLEMENT(Sphere)

sources/Core/Math/Primitives/AABB.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private:
4646
module: private;
4747

4848

49-
//BOOST_CLASS_EXPORT(AABB)
49+
5050

5151

5252
AABB::AABB(Primitive* other) :min(other->get_min()), max(other->get_max())

sources/Core/Math/Primitives/Frustum.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,5 @@ std::shared_ptr<Primitive> Frustum::clone()
146146
return std::shared_ptr<Primitive>(new Frustum(*this));
147147
};
148148

149-
//BOOST_CLASS_EXPORT(Frustum)
149+
150150

sources/Core/Math/Primitives/Plane.ixx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ Plane::operator Vector<vec4_t<float>>() const
8585
return vec4(n, d);
8686
}
8787

88-
//BOOST_CLASS_EXPORT(Plane)

sources/Core/Math/Primitives/Primitive.ixx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,3 @@ void Primitive::apply_transform(ptr, mat4x4&)
6464
void Primitive::set(Primitive*, mat4x4&)
6565
{}
6666

67-
68-
//BOOST_CLASS_EXPORT(Primitive)
69-

sources/Core/Math/Primitives/Ray.ixx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ inline bool Ray::intersect(Plane& p, vec3& res)
5656
inline Ray::Ray() = default;
5757

5858

59-
//BOOST_CLASS_EXPORT(Ray)

sources/Core/Math/Primitives/Sphere.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private:
6262
}
6363
};
6464

65-
//BOOST_CLASS_EXPORT(Sphere)
65+
6666

6767
module: private;
6868

sources/Core/Serialization/serialization.ixx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module;
2-
#include "serialization_defines.h"
2+
33
export module serialization;
4+
export import "serialization_defines.h";
45
export import boost.serialization;
56
export import stl.core;
67
export import stl.threading;

sources/Core/Utils/Allocators/Allocators.ixx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ export module Allocators;
22

33

44
import Debug;
5+
import Utils;
56
import Constants;
67
import stl.core;
78
import stl.threading;
8-
#include "Utils/utils_macros.h"
9+
910

1011

1112
export

sources/Core/Utils/utils.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module;
2-
#include "utils/utils_macros.h"
32
export module Utils;
43

4+
export import "utils/utils_macros.h";
55
export import stl.core;
66
export import magic_enum;
77
import crossguid;

sources/Core/Utils/utils_macros.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@
4444
#define THREAD_SCOPE(x) ;
4545
#define CHECK_THREAD(x) ;
4646
#endif
47-
48-
#include "Serialization/serialization_defines.h"

sources/DirectXFramework/D3D/Shaders.ixx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
module;
22

3-
#include "utils/utils_macros.h"
3+
44
export module D3D.Shaders;
55

66
import Singleton;
77
import FileSystem;
88
import FileDepender;
99
import DXCompiler;
1010
import serialization;
11+
import Utils;
1112

1213
export
1314
{

sources/DirectXFramework/DX12/CommandList.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
#include "utils/utils_macros.h"
2+
33
#include "dx12_types.h"
44
export module CommandList;
55

sources/DirectXFramework/DX12/CommandListCompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "pch_dx.h"
2-
#include "utils/utils_macros.h"
2+
33

44
import CommandListCompiler;
55
import Device;

sources/DirectXFramework/DX12/CommandListCompiler.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22
#include "pch_dx.h"
3-
#include "Utils/utils_macros.h"
3+
44
export module CommandListCompiler;
55

66
import Vectors;

sources/DirectXFramework/DX12/Descriptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "pch_dx.h"
2-
#include "utils/utils_macros.h"
2+
//
33
import Device;
44
import Resource;
55
import Descriptors;

sources/DirectXFramework/DX12/Descriptors.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
#include "utils/utils_macros.h"
2+
33
export module Descriptors;
44

55

sources/DirectXFramework/DX12/Device12.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
#include "utils/utils_macros.h"
2+
33
#include "helper.h"
44

55
#include "dx12_types.h"

sources/DirectXFramework/DX12/Fence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "pch_dx.h"
2-
#include "Utils/utils_macros.h"
2+
33
import Device;
44
import Profiling;
55
import Fence;

sources/DirectXFramework/DX12/IndirectCommand.ixx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
module;
22
#include "pch_dx.h"
3-
#include "Utils/utils_macros.h"
3+
44
export module IndirectCommand;
55

66
import RootSignature;
77
import Device;
88
import d3d12;
9+
import Utils;
910

1011
export
1112
{

sources/DirectXFramework/DX12/Memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "pch_dx.h"
2-
#include "utils/utils_macros.h"
2+
33
#include "Memory.h"
44
import Device;
55
import Resource;

sources/DirectXFramework/DX12/Memory.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
#include "Utils/utils_macros.h"
2+
33
#include "dx12_types.h"
44
export module Memory;
55

sources/DirectXFramework/DX12/Resource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "pch_dx.h"
22

3-
#include "utils/utils_macros.h"
3+
44

55
#include "helper.h"
66
import Resource;

sources/DirectXFramework/DX12/Resource.ixx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22

3-
#include "utils/utils_macros.h"
3+
44
export module Resource;
55

66
export import Memory;
@@ -10,6 +10,7 @@ export import States;
1010
export import Device;
1111
import d3d12;
1212
import stl.memory;
13+
import Utils;
1314
export
1415
{
1516
namespace DX12

sources/DirectXFramework/DX12/RootSignature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "pch_dx.h"
2-
#include "utils/utils_macros.h"
2+
33

44
import RootSignature;
55
import Log;

sources/DirectXFramework/DX12/States.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22
#include "pch_dx.h"
3-
#include "Utils/utils_macros.h"
3+
44

55
#include "dx12_types.h"
66
export module States;

sources/DirectXFramework/DX12/Tiling.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22
#include "pch_dx.h"
3-
#include "Utils/utils_macros.h"
3+
44
#include "dx12_types.h"
55
export module Tiling;
66

sources/DirectXFramework/Resource/TextureData.ixx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export module TextureData;
66

77
import FileSystem;
88
import serialization;
9+
import Utils;
910

1011
export
1112
{

sources/DirectXFramework/SIG/PSO.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module;
22
#include "DX12/dx12_types.h"
33
#include "DX12/PipelineState.h"
4-
#include "utils/utils_macros.h"
4+
55
export module PSO;
66

77
import Data;

sources/DirectXFramework/SIG/PSO_sig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "pch_dx.h"
22
#include "DX12/dx12_types.h"
33
#include "DX12/PipelineState.h"
4-
#include "utils/utils_macros.h"
4+
55
import Enums;
66
import PSO;
77
import Data;

sources/DirectXFramework/SIG/SIG.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22

3-
#include "Utils/utils_macros.h"
3+
44

55
export module SIG;
66
import stl.core;

sources/DirectXFramework/autogen/enums.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
#include "utils/utils_macros.h"
2+
33
export module Enums;
44

55
import crc32;

sources/DirectXFramework/d3d12_types.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
#include "utils/utils_macros.h"
2+
33

44
export module d3d12_types;
55

sources/DirectXFramework/helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Singleton;
44
import d3d12;
55

6-
#include "utils/utils_macros.h"
6+
import Utils;
77
import serialization;
88

99
typedef ComPtr<IDXGISwapChain1> DXGI_SwapChain;

sources/DirectXFramework/pch_dx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
#include "pch_core.h"
3-
#include "utils/utils_macros.h"
3+
44

55
import d3d12;
66

0 commit comments

Comments
 (0)