refactor: migrate old code
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
#include "stdafx.hpp"
|
||||
#include "GenericDataTypes.hpp"
|
||||
|
||||
namespace VSW::Materializer::DataTypes {
|
||||
|
||||
namespace Script {
|
||||
|
||||
|
||||
struct Table_script {
|
||||
CK_ID thisobj;
|
||||
std::string host_name;
|
||||
@@ -73,10 +74,10 @@ namespace VSW::Materializer::DataTypes {
|
||||
|
||||
// additional field
|
||||
CK_ID input_obj;
|
||||
bLinkInputOutputType input_type;
|
||||
VSW::DataTypes::BehaviorLinkIOType input_type;
|
||||
int input_index;
|
||||
CK_ID output_obj;
|
||||
bLinkInputOutputType output_type;
|
||||
VSW::DataTypes::BehaviorLinkIOType output_type;
|
||||
int output_index;
|
||||
};
|
||||
|
||||
@@ -103,11 +104,11 @@ namespace VSW::Materializer::DataTypes {
|
||||
|
||||
//additional field
|
||||
CK_ID input_obj;
|
||||
pLinkInputOutputType input_type;
|
||||
VSW::DataTypes::ParameterLinkIOType input_type;
|
||||
BOOL input_is_bb;
|
||||
int input_index;
|
||||
CK_ID output_obj;
|
||||
pLinkInputOutputType output_type;
|
||||
VSW::DataTypes::ParameterLinkIOType output_type;
|
||||
BOOL output_is_bb;
|
||||
int output_index;
|
||||
};
|
||||
@@ -133,9 +134,37 @@ namespace VSW::Materializer::DataTypes {
|
||||
CK_ID parent;
|
||||
};
|
||||
|
||||
class DataCache {
|
||||
public:
|
||||
DataCache() :
|
||||
script(), behavior(),
|
||||
bIn(), bOut(), bLink(),
|
||||
pOper(),
|
||||
pIn(), pOut(), pLocal(), pAttr(), pTarget(), pLink(),
|
||||
eLink(),
|
||||
data() {}
|
||||
~DataCache() {}
|
||||
|
||||
public:
|
||||
Table_script script;
|
||||
Table_behavior behavior;
|
||||
Table_bIn bIn;
|
||||
Table_bOut bOut;
|
||||
Table_pIn pIn;
|
||||
Table_pOut pOut;
|
||||
Table_bLink bLink;
|
||||
Table_pLocal pLocal;
|
||||
Table_pAttr pAttr;
|
||||
Table_pLink pLink;
|
||||
Table_pOper pOper;
|
||||
Table_eLink eLink;
|
||||
Table_pTarget pTarget;
|
||||
Table_data data;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Context {
|
||||
namespace Document {
|
||||
|
||||
struct Table_msg {
|
||||
CKMessageType index;
|
||||
@@ -149,39 +178,49 @@ namespace VSW::Materializer::DataTypes {
|
||||
std::string classtype;
|
||||
};
|
||||
|
||||
class DataCache {
|
||||
public:
|
||||
DataCache() : msg(), obj() {}
|
||||
~DataCache() {}
|
||||
|
||||
public:
|
||||
Table_msg msg;
|
||||
Table_obj obj;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Environment {
|
||||
|
||||
|
||||
struct Table_op {
|
||||
CK_PARAMETEROPERATION funcPtr;
|
||||
std::string in1_guid;
|
||||
std::string in2_guid;
|
||||
std::string out_guid;
|
||||
std::string op_guid;
|
||||
std::string func_ptr;
|
||||
int64_t in1_guid;
|
||||
int64_t in2_guid;
|
||||
int64_t out_guid;
|
||||
int64_t op_guid;
|
||||
std::string op_name;
|
||||
CKOperationType op_code;
|
||||
};
|
||||
|
||||
struct Table_param {
|
||||
CKParameterType index;
|
||||
std::string guid;
|
||||
std::string derived_from;
|
||||
int64_t guid;
|
||||
int64_t derived_from;
|
||||
std::string type_name;
|
||||
int default_size;
|
||||
CK_PARAMETERCREATEDEFAULTFUNCTION func_CreateDefault;
|
||||
CK_PARAMETERDELETEFUNCTION func_Delete;
|
||||
CK_PARAMETERSAVELOADFUNCTION func_SaveLoad;
|
||||
CK_PARAMETERCHECKFUNCTION func_Check;
|
||||
CK_PARAMETERCOPYFUNCTION func_Copy;
|
||||
CK_PARAMETERSTRINGFUNCTION func_String;
|
||||
CK_PARAMETERUICREATORFUNCTION func_UICreator;
|
||||
std::string func_CreateDefault;
|
||||
std::string func_Delete;
|
||||
std::string func_SaveLoad;
|
||||
std::string func_Check;
|
||||
std::string func_Copy;
|
||||
std::string func_String;
|
||||
std::string func_UICreator;
|
||||
int creator_dll_index;
|
||||
int creator_plugin_index;
|
||||
CKDWORD dw_param;
|
||||
CKDWORD dw_flags;
|
||||
CKDWORD cid;
|
||||
std::string saver_manager;
|
||||
int64_t saver_manager;
|
||||
};
|
||||
|
||||
struct Table_attr {
|
||||
@@ -201,24 +240,43 @@ namespace VSW::Materializer::DataTypes {
|
||||
int plugin_index;
|
||||
std::string category;
|
||||
CKBOOL active;
|
||||
std::string guid;
|
||||
int64_t guid;
|
||||
std::string desc;
|
||||
std::string author;
|
||||
std::string summary;
|
||||
DWORD version;
|
||||
CK_INITINSTANCEFCT func_init;
|
||||
CK_EXITINSTANCEFCT func_exit;
|
||||
std::string func_init;
|
||||
std::string func_exit;
|
||||
};
|
||||
|
||||
#if defined(VIRTOOLS_21)
|
||||
using GenericVarType_t = int;
|
||||
#else
|
||||
using GenericVarType_t = CKVariableManager::Variable::Type;
|
||||
#endif
|
||||
struct Table_variable {
|
||||
std::string name;
|
||||
std::string desciption;
|
||||
XWORD flags;
|
||||
UNIVERSAL_VAR_TYPE type;
|
||||
GenericVarType_t type;
|
||||
std::string representation;
|
||||
std::string data;
|
||||
};
|
||||
|
||||
class DataCache {
|
||||
public:
|
||||
DataCache() :
|
||||
op(), param(), attr(), plugin(), variable() {}
|
||||
~DataCache() {}
|
||||
|
||||
public:
|
||||
Table_op op;
|
||||
Table_param param;
|
||||
Table_attr attr;
|
||||
Table_plugin plugin;
|
||||
Table_variable variable;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user