Skip to content

Commit

Permalink
[Implicit] Initializing port types based on the set node configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
3dJan committed Oct 19, 2023
1 parent ecada92 commit 649c738
Show file tree
Hide file tree
Showing 17 changed files with 152 additions and 219 deletions.
7 changes: 1 addition & 6 deletions Autogenerated/Bindings/C/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,7 @@ typedef enum eLib3MFImplicitNodeConfiguration {
eImplicitNodeConfigurationDefault = 1, /** Default */
eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */
eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */
eImplicitNodeConfigurationMatrixToMatrix = 4, /** Matrix -> Matrix */
eImplicitNodeConfigurationScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
eImplicitNodeConfigurationVectorVectorToVector = 6, /** Vector, Vector -> Vector */
eImplicitNodeConfigurationScalarToVector = 8, /** Scalar -> Vector */
eImplicitNodeConfigurationVectorToScalar = 9, /** Vector -> Scalar */
eImplicitNodeConfigurationVectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */
} eLib3MFImplicitNodeConfiguration;

typedef enum eLib3MFEncryptionAlgorithm {
Expand Down
7 changes: 1 addition & 6 deletions Autogenerated/Bindings/CDynamic/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,7 @@ typedef enum eLib3MFImplicitNodeConfiguration {
eImplicitNodeConfigurationDefault = 1, /** Default */
eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */
eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */
eImplicitNodeConfigurationMatrixToMatrix = 4, /** Matrix -> Matrix */
eImplicitNodeConfigurationScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
eImplicitNodeConfigurationVectorVectorToVector = 6, /** Vector, Vector -> Vector */
eImplicitNodeConfigurationScalarToVector = 8, /** Scalar -> Vector */
eImplicitNodeConfigurationVectorToScalar = 9, /** Vector -> Scalar */
eImplicitNodeConfigurationVectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */
} eLib3MFImplicitNodeConfiguration;

typedef enum eLib3MFEncryptionAlgorithm {
Expand Down
7 changes: 1 addition & 6 deletions Autogenerated/Bindings/CSharp/Lib3MF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,7 @@ public enum eImplicitNodeConfiguration {
Default = 1,
ScalarToScalar = 2,
VectorToVector = 3,
MatrixToMatrix = 4,
ScalarScalarToScalar = 5,
VectorVectorToVector = 6,
ScalarToVector = 8,
VectorToScalar = 9,
VectorVectorToScalar = 10
MatrixToMatrix = 4
};

public enum eEncryptionAlgorithm {
Expand Down
7 changes: 1 addition & 6 deletions Autogenerated/Bindings/Cpp/lib3mf_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,7 @@ namespace Lib3MF {
Default = 1, /** Default */
ScalarToScalar = 2, /** Scalar -> Scalar */
VectorToVector = 3, /** Vector -> Vector */
MatrixToMatrix = 4, /** Matrix -> Matrix */
ScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
VectorVectorToVector = 6, /** Vector, Vector -> Vector */
ScalarToVector = 8, /** Scalar -> Vector */
VectorToScalar = 9, /** Vector -> Scalar */
VectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
MatrixToMatrix = 4 /** Matrix -> Matrix */
};

enum class eEncryptionAlgorithm : Lib3MF_int32 {
Expand Down
7 changes: 1 addition & 6 deletions Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,7 @@ namespace Lib3MF {
Default = 1, /** Default */
ScalarToScalar = 2, /** Scalar -> Scalar */
VectorToVector = 3, /** Vector -> Vector */
MatrixToMatrix = 4, /** Matrix -> Matrix */
ScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
VectorVectorToVector = 6, /** Vector, Vector -> Vector */
ScalarToVector = 8, /** Scalar -> Vector */
VectorToScalar = 9, /** Vector -> Scalar */
VectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
MatrixToMatrix = 4 /** Matrix -> Matrix */
};

enum class eEncryptionAlgorithm : Lib3MF_int32 {
Expand Down
5 changes: 0 additions & 5 deletions Autogenerated/Bindings/Go/lib3mf.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions Autogenerated/Bindings/Go/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,7 @@ typedef enum eLib3MFImplicitNodeConfiguration {
eImplicitNodeConfigurationDefault = 1, /** Default */
eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */
eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */
eImplicitNodeConfigurationMatrixToMatrix = 4, /** Matrix -> Matrix */
eImplicitNodeConfigurationScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
eImplicitNodeConfigurationVectorVectorToVector = 6, /** Vector, Vector -> Vector */
eImplicitNodeConfigurationScalarToVector = 8, /** Scalar -> Vector */
eImplicitNodeConfigurationVectorToScalar = 9, /** Vector -> Scalar */
eImplicitNodeConfigurationVectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */
} eLib3MFImplicitNodeConfiguration;

typedef enum eLib3MFEncryptionAlgorithm {
Expand Down
5 changes: 0 additions & 5 deletions Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16826,11 +16826,6 @@ void CLib3MFWrapper::New(const FunctionCallbackInfo<Value>& args)
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_ScalarToScalar"), Integer::New(isolate, 2));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_VectorToVector"), Integer::New(isolate, 3));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_MatrixToMatrix"), Integer::New(isolate, 4));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_ScalarScalarToScalar"), Integer::New(isolate, 5));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_VectorVectorToVector"), Integer::New(isolate, 6));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_ScalarToVector"), Integer::New(isolate, 8));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_VectorToScalar"), Integer::New(isolate, 9));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_VectorVectorToScalar"), Integer::New(isolate, 10));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eEncryptionAlgorithm_AES256_GCM"), Integer::New(isolate, 1));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eWrappingAlgorithm_RSA_OAEP"), Integer::New(isolate, 0));
newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eMgfAlgorithm_MGF1_SHA1"), Integer::New(isolate, 160));
Expand Down
7 changes: 1 addition & 6 deletions Autogenerated/Bindings/NodeJS/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,7 @@ typedef enum eLib3MFImplicitNodeConfiguration {
eImplicitNodeConfigurationDefault = 1, /** Default */
eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */
eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */
eImplicitNodeConfigurationMatrixToMatrix = 4, /** Matrix -> Matrix */
eImplicitNodeConfigurationScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
eImplicitNodeConfigurationVectorVectorToVector = 6, /** Vector, Vector -> Vector */
eImplicitNodeConfigurationScalarToVector = 8, /** Scalar -> Vector */
eImplicitNodeConfigurationVectorToScalar = 9, /** Vector -> Scalar */
eImplicitNodeConfigurationVectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */
} eLib3MFImplicitNodeConfiguration;

typedef enum eLib3MFEncryptionAlgorithm {
Expand Down
17 changes: 1 addition & 16 deletions Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,7 @@ interface
eImplicitNodeConfigurationDefault,
eImplicitNodeConfigurationScalarToScalar,
eImplicitNodeConfigurationVectorToVector,
eImplicitNodeConfigurationMatrixToMatrix,
eImplicitNodeConfigurationScalarScalarToScalar,
eImplicitNodeConfigurationVectorVectorToVector,
eImplicitNodeConfigurationScalarToVector,
eImplicitNodeConfigurationVectorToScalar,
eImplicitNodeConfigurationVectorVectorToScalar
eImplicitNodeConfigurationMatrixToMatrix
);

TLib3MFEncryptionAlgorithm = (
Expand Down Expand Up @@ -8304,11 +8299,6 @@ implementation
eImplicitNodeConfigurationScalarToScalar: Result := 2;
eImplicitNodeConfigurationVectorToVector: Result := 3;
eImplicitNodeConfigurationMatrixToMatrix: Result := 4;
eImplicitNodeConfigurationScalarScalarToScalar: Result := 5;
eImplicitNodeConfigurationVectorVectorToVector: Result := 6;
eImplicitNodeConfigurationScalarToVector: Result := 8;
eImplicitNodeConfigurationVectorToScalar: Result := 9;
eImplicitNodeConfigurationVectorVectorToScalar: Result := 10;
else
raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value');
end;
Expand All @@ -8321,11 +8311,6 @@ implementation
2: Result := eImplicitNodeConfigurationScalarToScalar;
3: Result := eImplicitNodeConfigurationVectorToVector;
4: Result := eImplicitNodeConfigurationMatrixToMatrix;
5: Result := eImplicitNodeConfigurationScalarScalarToScalar;
6: Result := eImplicitNodeConfigurationVectorVectorToVector;
8: Result := eImplicitNodeConfigurationScalarToVector;
9: Result := eImplicitNodeConfigurationVectorToScalar;
10: Result := eImplicitNodeConfigurationVectorVectorToScalar;
else
raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant');
end;
Expand Down
5 changes: 0 additions & 5 deletions Autogenerated/Bindings/Python/Lib3MF.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,11 +784,6 @@ class ImplicitNodeConfiguration(CTypesEnum):
ScalarToScalar = 2
VectorToVector = 3
MatrixToMatrix = 4
ScalarScalarToScalar = 5
VectorVectorToVector = 6
ScalarToVector = 8
VectorToScalar = 9
VectorVectorToScalar = 10
'''Definition of EncryptionAlgorithm
'''
class EncryptionAlgorithm(CTypesEnum):
Expand Down
7 changes: 1 addition & 6 deletions Autogenerated/Source/lib3mf_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,7 @@ namespace Lib3MF {
Default = 1, /** Default */
ScalarToScalar = 2, /** Scalar -> Scalar */
VectorToVector = 3, /** Vector -> Vector */
MatrixToMatrix = 4, /** Matrix -> Matrix */
ScalarScalarToScalar = 5, /** Scalar, Scalar -> Scalar */
VectorVectorToVector = 6, /** Vector, Vector -> Vector */
ScalarToVector = 8, /** Scalar -> Vector */
VectorToScalar = 9, /** Vector -> Scalar */
VectorVectorToScalar = 10 /** Vector, Vector -> Scalar */
MatrixToMatrix = 4 /** Matrix -> Matrix */
};

enum class eEncryptionAlgorithm : Lib3MF_int32 {
Expand Down
5 changes: 0 additions & 5 deletions AutomaticComponentToolkit/lib3mf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1831,11 +1831,6 @@
<option name="ScalarToScalar" description="Scalar -> Scalar" value="2" />
<option name="VectorToVector" description="Vector -> Vector" value="3" />
<option name="MatrixToMatrix" description="Matrix -> Matrix" value="4" />
<option name="ScalarScalarToScalar" description="Scalar, Scalar -> Scalar" value="5" />
<option name="VectorVectorToVector" description="Vector, Vector -> Vector" value="6" />
<option name="ScalarToVector" description="Scalar -> Vector" value="8" />
<option name="VectorToScalar" description="Vector -> Scalar" value="9" />
<option name="VectorVectorToScalar" description="Vector, Vector -> Scalar" value="10" />
</enum>


Expand Down
2 changes: 2 additions & 0 deletions Include/Model/Classes/NMR_ImplicitNodeTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace NMR

struct InputOutputRule
{
Lib3MF::eImplicitNodeConfiguration configuration = Lib3MF::eImplicitNodeConfiguration::Default;
In inputs;
Out outputs;
};
Expand Down Expand Up @@ -89,6 +90,7 @@ namespace NMR
NodeTypesMap const& getTypes() const;

void addExpectedPortsToNode(NMR::CModelImplicitNode& node) const;
void addExpectedPortsToNode(NMR::CModelImplicitNode& node, Lib3MF::eImplicitNodeConfiguration const configuration) const;

void applyInputOutputRuleToNode(NMR::CModelImplicitNode& node,
InputOutputRule const& rule) const;
Expand Down
Loading

0 comments on commit 649c738

Please sign in to comment.