mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-23 15:52:56 +08:00
Update release
This commit is contained in:
@@ -198,10 +198,52 @@ Instruction
|
||||
Unknown,
|
||||
};
|
||||
|
||||
struct WfRuntimeValue
|
||||
{
|
||||
// U8 with ITypeDescriptor* -> enum
|
||||
// Unknown with ITypeDescriptor* -> type
|
||||
// Unknown -> Null
|
||||
WfInsType type = WfInsType::Unknown;
|
||||
reflection::description::ITypeDescriptor* typeDescriptor = nullptr;
|
||||
WString stringValue;
|
||||
union
|
||||
{
|
||||
bool boolValue;
|
||||
vint8_t i1Value;
|
||||
vint16_t i2Value;
|
||||
vint32_t i4Value;
|
||||
vint64_t i8Value;
|
||||
vuint8_t u1Value;
|
||||
vuint16_t u2Value;
|
||||
vuint32_t u4Value;
|
||||
vuint64_t u8Value = 0;
|
||||
float f4Value;
|
||||
double f8Value;
|
||||
};
|
||||
|
||||
WfRuntimeValue() {}
|
||||
WfRuntimeValue(bool value) : type(WfInsType::Bool), boolValue(value) {}
|
||||
WfRuntimeValue(vint8_t value) : type(WfInsType::I1), i1Value(value) {}
|
||||
WfRuntimeValue(vint16_t value) : type(WfInsType::I2), i2Value(value) {}
|
||||
WfRuntimeValue(vint32_t value) : type(WfInsType::I4), i4Value(value) {}
|
||||
WfRuntimeValue(vint64_t value) : type(WfInsType::I8), i8Value(value) {}
|
||||
WfRuntimeValue(vuint8_t value) : type(WfInsType::U1), u1Value(value) {}
|
||||
WfRuntimeValue(vuint16_t value) : type(WfInsType::U2), u2Value(value) {}
|
||||
WfRuntimeValue(vuint32_t value) : type(WfInsType::U4), u4Value(value) {}
|
||||
WfRuntimeValue(vuint64_t value) : type(WfInsType::U8), u8Value(value) {}
|
||||
WfRuntimeValue(float value) : type(WfInsType::F4), f4Value(value) {}
|
||||
WfRuntimeValue(double value) : type(WfInsType::F8), f8Value(value) {}
|
||||
WfRuntimeValue(WString value) : type(WfInsType::String), stringValue(value) {}
|
||||
WfRuntimeValue(vuint64_t value, reflection::description::ITypeDescriptor* enumType)
|
||||
: type(WfInsType::U8), typeDescriptor(enumType), u8Value(value) {}
|
||||
WfRuntimeValue(reflection::description::ITypeDescriptor* td)
|
||||
: type(WfInsType::Unknown), typeDescriptor(td) {}
|
||||
};
|
||||
|
||||
struct WfInstruction
|
||||
{
|
||||
WfInsCode code = WfInsCode::Nop;
|
||||
reflection::description::Value valueParameter;
|
||||
WfRuntimeValue valueParameter;
|
||||
vint countParameter = 0;
|
||||
union
|
||||
{
|
||||
@@ -220,7 +262,7 @@ Instruction
|
||||
WfInstruction();
|
||||
|
||||
#define CTOR(NAME) static WfInstruction NAME();
|
||||
#define CTOR_VALUE(NAME) static WfInstruction NAME(const reflection::description::Value& value);
|
||||
#define CTOR_VALUE(NAME) static WfInstruction NAME(const WfRuntimeValue& value);
|
||||
#define CTOR_FUNCTION(NAME) static WfInstruction NAME(vint function);
|
||||
#define CTOR_FUNCTION_COUNT(NAME) static WfInstruction NAME(vint function, vint count);
|
||||
#define CTOR_VARIABLE(NAME) static WfInstruction NAME(vint variable);
|
||||
@@ -300,6 +342,7 @@ namespace vl
|
||||
|
||||
namespace reflection
|
||||
{
|
||||
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
|
||||
#define DEFINE_DESCRIPTION(TYPE)\
|
||||
template<>\
|
||||
class Description<workflow::typeimpl::TYPE> : public virtual DescriptableObject\
|
||||
@@ -318,6 +361,7 @@ namespace vl
|
||||
DEFINE_DESCRIPTION(WfInterfaceInstance)
|
||||
|
||||
#undef DEFINE_DESCRIPTION
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace workflow
|
||||
@@ -935,6 +979,8 @@ Interfaces:
|
||||
#define VCZH_WORKFLOW_RUNTIME_WFRUNTIMECONSTRUCTIONS
|
||||
|
||||
|
||||
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace workflow
|
||||
@@ -1037,7 +1083,7 @@ InterfaceInstance
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
.\WFRUNTIMEDEBUGGER.H
|
||||
@@ -1054,6 +1100,8 @@ Interfaces:
|
||||
#define VCZH_WORKFLOW_RUNTIME_WFRUNTIMEDEBUGGER
|
||||
|
||||
|
||||
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace workflow
|
||||
@@ -1448,7 +1496,7 @@ Debugger
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
.\WFRUNTIME.H
|
||||
@@ -1465,6 +1513,8 @@ Interfaces:
|
||||
#define VCZH_WORKFLOW_RUNTIME_WFRUNTIME
|
||||
|
||||
|
||||
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace workflow
|
||||
@@ -1716,6 +1766,7 @@ RuntimeThreadContext
|
||||
WfRuntimeTrapFrame& GetCurrentTrapFrame();
|
||||
WfRuntimeThreadContextError PushTrapFrame(vint instructionIndex);
|
||||
WfRuntimeThreadContextError PopTrapFrame(vint saveStackPatternCount);
|
||||
WfRuntimeThreadContextError PushRuntimeValue(const WfRuntimeValue& value);
|
||||
WfRuntimeThreadContextError PushValue(const reflection::description::Value& value);
|
||||
WfRuntimeThreadContextError PopValue(reflection::description::Value& value);
|
||||
WfRuntimeThreadContextError RaiseException(const WString& exception, bool fatalError, bool skipDebugger = false);
|
||||
@@ -1764,4 +1815,5 @@ Helper Functions
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user