Skip to content

Commit a7a0cd9

Browse files
committed
Updated Pipe
1 parent daf8a21 commit a7a0cd9

40 files changed

Lines changed: 557 additions & 570 deletions

Libs/AST/Include/AST/Components/Expressions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace rift::ast
7777
struct CExprCallId : public CExpression
7878
{
7979
using Super = CExpression;
80-
P_STRUCT(CExprCallId, p::TF_NotSerialized)
80+
P_STRUCT(CExprCallId, p::TF_NotSerialized || p::TF_ECS_AutoModify)
8181

8282
// Id pointing to the function declaration
8383
P_PROP(functionId)

Libs/AST/Include/AST/Components/Tags/CDirty.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "AST/Components/CFileRef.h"
55
#include "AST/Components/Expressions.h"
66

7+
#include <PipeECS.h>
78
#include <PipeReflect.h>
89

910

@@ -17,11 +18,9 @@ namespace rift::ast
1718
P_STRUCT(TDirty<T>, p::TF_NotSerialized)
1819
};
1920

20-
using CDirty = TDirty<void>;
21+
using CDirty = p::CMdfd<void>;
2122

2223
// Marks a type as dirty, meaning is has been modified
23-
using CFileDirty = TDirty<CFileRef>;
24+
using CFileDirty = p::CMdfd<CFileRef>;
2425

25-
// Marks a type as dirty, meaning is has been modified
26-
using CCallDirty = TDirty<CExprCallId>;
2726
} // namespace rift::ast

Libs/AST/Include/AST/Systems/FunctionsSystem.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ namespace rift::ast::FunctionsSystem
2222
{};
2323

2424
void Init(Tree& ast);
25-
void ResolveCallFunctionIds(
26-
p::TAccessRef<p::TWrite<CExprCallId>, CExprCall, CDeclFunction, CNamespace, CParent, CChild>
27-
access);
28-
void PushInvalidPinsBack(
29-
p::TAccessRef<p::TWrite<CExprInputs>, p::TWrite<CExprOutputs>, CInvalid> access);
25+
void ResolveCallFunctionIds(p::TIdScopeRef<p::Writes<CExprCallId>, CExprCall, CDeclFunction,
26+
CNamespace, CParent, CChild>
27+
scope);
28+
void PushInvalidPinsBack(p::TIdScopeRef<p::Writes<CExprInputs, CExprOutputs>, CInvalid> scope);
3029

3130
// Marks calls referencing dirty functions as dirty theirselfs
3231
void PropagateDirtyIntoCalls(Tree& ast);
3332
void SyncCallPinsFromFunction(Tree& ast);
34-
using InvalidDisconnectedPinAccess = p::TAccessRef<CInvalid, CExprInputs,
35-
p::TWrite<CTmpInvalidKeep>, p::TWrite<CChild>, p::TWrite<CParent>>;
36-
void RemoveInvalidDisconnectedArgs(InvalidDisconnectedPinAccess access);
33+
using InvalidDisconnectedPinAccess =
34+
p::TIdScopeRef<p::Writes<CTmpInvalidKeep, CChild, CParent>, CInvalid, CExprInputs>;
35+
void RemoveInvalidDisconnectedArgs(InvalidDisconnectedPinAccess scope);
3736
void ClearAddedTags(Tree& ast);
3837
} // namespace rift::ast::FunctionsSystem

Libs/AST/Include/AST/Systems/LoadSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace rift::ast::LoadSystem
4141
Tree& ast, p::TView<ModuleTypePaths> pathsByModule, p::TArray<Id>& ids);
4242

4343
void LoadFileStrings(
44-
p::TAccessRef<CFileRef> access, p::TView<Id> nodes, p::TArray<p::String>& strings);
44+
p::TIdScopeRef<CFileRef> scope, p::TView<Id> nodes, p::TArray<p::String>& strings);
4545

4646
void DeserializeModules(Tree& ast, p::TView<Id> moduleIds, p::TView<p::String> strings);
4747
void DeserializeTypes(Tree& ast, p::TView<Id> typeIds, p::TView<p::String> strings);

Libs/AST/Include/AST/Systems/TypeSystem.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ namespace rift::ast::TypeSystem
1717
{
1818
void Init(Tree& ast);
1919

20-
using PropagateVariableTypesAccess =
21-
p::TAccessRef<CExprDeclRefId, CDeclVariable, p::TWrite<CExprTypeId>>;
22-
void PropagateVariableTypes(PropagateVariableTypesAccess access);
20+
using PropagateVariableTypesScope =
21+
p::TIdScopeRef<p::Writes<CExprTypeId>, CExprDeclRefId, CDeclVariable>;
22+
void PropagateVariableTypes(PropagateVariableTypesScope scope);
2323

24-
using PropagateExpressionTypesAccess = p::TAccessRef<CDeclType, CChanged, CExprInputs,
25-
CExprOutputs, p::TWrite<CExprTypeId>, CExprUnaryOperator, CExprBinaryOperator, p::CParent>;
26-
void PropagateExpressionTypes(PropagateExpressionTypesAccess access);
24+
using PropagateExpressionTypesScope = p::TIdScopeRef<p::Writes<CExprTypeId>, CDeclType,
25+
CChanged, CExprInputs, CExprOutputs, CExprUnaryOperator, CExprBinaryOperator, p::CParent>;
26+
void PropagateExpressionTypes(PropagateExpressionTypesScope scope);
2727

2828
void ResolveExprTypeIds(
29-
p::TAccessRef<p::TWrite<CExprTypeId>, CExprType, CNamespace, p::CParent, p::CChild> access);
29+
p::TIdScopeRef<p::Writes<CExprTypeId>, CExprType, CNamespace, p::CParent, p::CChild> scope);
3030
} // namespace rift::ast::TypeSystem

Libs/AST/Include/AST/Tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace rift::ast
2929
};
3030

3131

32-
struct Tree : public p::EntityContext
32+
struct Tree : public p::IdContext
3333
{
3434
private:
3535
static p::TBroadcast<Tree&> onInit;

Libs/AST/Include/AST/Utils/Expressions.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
// NOTE: In expression graphs, the Link Id is the Input Pin Id
1414
namespace rift::ast
1515
{
16-
bool CanConnectExpr(p::TAccessRef<CExprInputs, CExprOutputs, CExprTypeId> access,
16+
bool CanConnectExpr(p::TIdScopeRef<CExprInputs, CExprOutputs, CExprTypeId> scope,
1717
ExprOutput output, ExprInput input);
1818

19-
bool TryConnectExpr(p::TAccessRef<p::TWrite<CExprInputs>, CExprOutputs, CExprTypeId> access,
19+
bool TryConnectExpr(p::TIdScopeRef<p::Writes<CExprInputs>, CExprOutputs, CExprTypeId> scope,
2020
ExprOutput output, ExprInput input);
2121
// Disconnects a particular link. (Note: link ids are the same as input nodes)
2222
bool DisconnectExpr(Tree& ast, ExprInput input);
@@ -29,10 +29,10 @@ namespace rift::ast
2929
*/
3030
void DisconnectAllExprDeep(Tree& ast, p::TView<const Id> ids, bool ignoreRoot = false);
3131

32-
bool RemoveExprInputPin(p::TAccessRef<CExprInputs, p::TWrite<CInvalid>> access, ExprInput id);
32+
bool RemoveExprInputPin(p::TIdScopeRef<p::Writes<CInvalid>, CExprInputs> scope, ExprInput id);
3333
bool RemoveExprOutputPin(
34-
p::TAccessRef<CExprOutputs, p::TWrite<CInvalid>> access, ExprOutput id);
34+
p::TIdScopeRef<p::Writes<CInvalid>, CExprOutputs> scope, ExprOutput id);
3535

36-
ExprInput GetExprInputFromPin(p::TAccessRef<CExprInputs, CChild> access, Id pinId);
37-
ExprOutput GetExprOutputFromPin(p::TAccessRef<CExprOutputs, CChild> access, Id pinId);
36+
ExprInput GetExprInputFromPin(p::TIdScopeRef<CExprInputs, CChild> scope, Id pinId);
37+
ExprOutput GetExprOutputFromPin(p::TIdScopeRef<CExprOutputs, CChild> scope, Id pinId);
3838
} // namespace rift::ast

Libs/AST/Include/AST/Utils/ModuleUtils.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ namespace rift::ast
4545

4646
Id CreateModule(Tree& ast, p::StringView path);
4747

48-
Id GetProjectId(p::TAccessRef<CProject> access);
48+
Id GetProjectId(p::TIdScopeRef<CProject> scope);
4949

50-
p::Tag GetProjectName(p::TAccessRef<CProject, CNamespace, CFileRef> access);
51-
p::StringView GetProjectPath(p::TAccessRef<CFileRef, CProject> access);
52-
CModule* GetProjectModule(p::TAccessRef<CProject, p::TWrite<CModule>> access);
50+
p::Tag GetProjectName(p::TIdScopeRef<CProject, CNamespace, CFileRef> scope);
51+
p::StringView GetProjectPath(p::TIdScopeRef<CFileRef, CProject> scope);
52+
CModule* GetProjectModule(p::TIdScopeRef<p::Writes<CModule>, CProject> scope);
5353

5454
bool HasProject(Tree& ast);
5555

5656
// Resolve a module's name
57-
p::Tag GetModuleName(p::TAccessRef<CNamespace, CFileRef> access, Id moduleId);
57+
p::Tag GetModuleName(p::TIdScopeRef<CNamespace, CFileRef> scope, Id moduleId);
5858

5959
// Resolve a module's name
60-
p::StringView GetModulePath(p::TAccessRef<CFileRef> access, Id moduleId);
60+
p::StringView GetModulePath(p::TIdScopeRef<CFileRef> scope, Id moduleId);
6161

6262
void SerializeModule(ast::Tree& ast, ast::Id id, p::String& data);
6363
void DeserializeModule(ast::Tree& ast, ast::Id id, const p::String& data);

Libs/AST/Include/AST/Utils/Namespaces.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212

1313
namespace rift::ast
1414
{
15-
Namespace GetNamespace(p::TAccessRef<CNamespace, CChild, CModule> access, Id id);
16-
Namespace GetParentNamespace(p::TAccessRef<CNamespace, CChild, CModule> access, Id id);
15+
Namespace GetNamespace(p::TIdScopeRef<CNamespace, CChild, CModule> scope, Id id);
16+
Namespace GetParentNamespace(p::TIdScopeRef<CNamespace, CChild, CModule> scope, Id id);
1717

1818
/**
1919
* Find an id from a given namespace
20-
* @param access access to the needed components
20+
* @param scope scope to the needed components
2121
* @param ns namespace to find the id to
2222
* @param rootIds entity ids. If nullptr, roots are resolved from ecs context.
2323
* @return Id found or NoId
2424
*/
25-
Id FindIdFromNamespace(p::TAccessRef<CNamespace, CChild, CParent> access, const Namespace& ns,
25+
Id FindIdFromNamespace(p::TIdScopeRef<CNamespace, CChild, CParent> scope, const Namespace& ns,
2626
const p::TArray<Id>* rootIds = nullptr);
2727

28-
p::Tag GetName(p::TAccessRef<CNamespace> access, Id id);
29-
p::Tag GetNameUnsafe(p::TAccessRef<CNamespace> access, Id id);
30-
p::String GetFullName(p::TAccessRef<CNamespace, CChild, CModule> access, Id id,
28+
p::Tag GetName(p::TIdScopeRef<CNamespace> scope, Id id);
29+
p::Tag GetNameUnsafe(p::TIdScopeRef<CNamespace> scope, Id id);
30+
p::String GetFullName(p::TIdScopeRef<CNamespace, CChild, CModule> scope, Id id,
3131
bool localNamespace = false, char separator = '.');
3232
} // namespace rift::ast
3333

0 commit comments

Comments
 (0)