Files
SuperScriptMaterializer/materializer/DataTypes.hpp

283 lines
5.0 KiB
C++
Raw Normal View History

2024-08-01 22:38:55 +08:00
#pragma once
#include "stdafx.hpp"
2024-08-02 17:04:37 +08:00
#include "GenericDataTypes.hpp"
2024-08-01 22:38:55 +08:00
namespace VSW::Materializer::DataTypes {
namespace Script {
2024-08-02 17:04:37 +08:00
2024-08-01 22:38:55 +08:00
struct Table_script {
CK_ID thisobj;
std::string host_name;
int index;
CK_ID behavior;
};
struct Table_behavior {
CK_ID thisobj;
std::string name;
CK_BEHAVIOR_TYPE type;
std::string proto_name;
std::string proto_guid;
CK_BEHAVIOR_FLAGS flags;
int priority;
CKDWORD version;
//pTarget, pIn, pOut, bIn, bOut
std::string pin_count;
CK_ID parent;
};
struct Table_bIO {
CK_ID thisobj;
int index;
std::string name;
CK_ID parent;
};
struct Table_bIn : public Table_bIO {};
struct Table_bOut : public Table_bIO {};
struct Table_pTarget {
CK_ID thisobj;
std::string name;
std::string type;
std::string type_guid;
CK_ID parent;
CK_ID direct_source;
CK_ID shared_source;
};
struct Table_pIn {
CK_ID thisobj;
int index;
std::string name;
std::string type;
std::string type_guid;
CK_ID parent;
CK_ID direct_source;
CK_ID shared_source;
};
struct Table_pOut {
CK_ID thisobj;
int index;
std::string name;
std::string type;
std::string type_guid;
CK_ID parent;
};
struct Table_bLink {
CK_ID input;
CK_ID output;
int delay;
CK_ID parent;
// additional field
CK_ID input_obj;
2024-08-02 17:04:37 +08:00
VSW::DataTypes::BehaviorLinkIOType input_type;
2024-08-01 22:38:55 +08:00
int input_index;
CK_ID output_obj;
2024-08-02 17:04:37 +08:00
VSW::DataTypes::BehaviorLinkIOType output_type;
2024-08-01 22:38:55 +08:00
int output_index;
};
struct Table_pLocal {
CK_ID thisobj;
std::string name;
std::string type;
std::string type_guid;
BOOL is_setting;
CK_ID parent;
};
struct Table_pAttr {
CK_ID thisobj;
std::string name;
std::string type;
std::string type_guid;
};
struct Table_pLink {
CK_ID input;
CK_ID output;
CK_ID parent;
//additional field
CK_ID input_obj;
2024-08-02 17:04:37 +08:00
VSW::DataTypes::ParameterLinkIOType input_type;
2024-08-01 22:38:55 +08:00
BOOL input_is_bb;
int input_index;
CK_ID output_obj;
2024-08-02 17:04:37 +08:00
VSW::DataTypes::ParameterLinkIOType output_type;
2024-08-01 22:38:55 +08:00
BOOL output_is_bb;
int output_index;
};
struct Table_pOper {
CK_ID thisobj;
std::string op;
std::string op_guid;
CK_ID parent;
};
struct Table_eLink {
CK_ID export_obj;
CK_ID internal_obj;
BOOL is_in;
int index;
CK_ID parent;
};
struct Table_data {
std::string field;
std::string data;
CK_ID parent;
};
2024-08-02 17:04:37 +08:00
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;
};
2024-08-01 22:38:55 +08:00
}
2024-08-02 17:04:37 +08:00
namespace Document {
2024-08-01 22:38:55 +08:00
struct Table_msg {
CKMessageType index;
std::string name;
};
struct Table_obj {
CK_ID id;
std::string name;
CK_CLASSID classid;
std::string classtype;
};
2024-08-02 17:04:37 +08:00
class DataCache {
public:
DataCache() : msg(), obj() {}
~DataCache() {}
public:
Table_msg msg;
Table_obj obj;
};
2024-08-01 22:38:55 +08:00
}
namespace Environment {
2024-08-02 17:04:37 +08:00
2024-08-01 22:38:55 +08:00
struct Table_op {
2024-08-02 17:04:37 +08:00
std::string func_ptr;
int64_t in1_guid;
int64_t in2_guid;
int64_t out_guid;
int64_t op_guid;
2024-08-01 22:38:55 +08:00
std::string op_name;
CKOperationType op_code;
};
struct Table_param {
CKParameterType index;
2024-08-02 17:04:37 +08:00
int64_t guid;
int64_t derived_from;
2024-08-01 22:38:55 +08:00
std::string type_name;
int default_size;
2024-08-02 17:04:37 +08:00
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;
2024-08-01 22:38:55 +08:00
int creator_dll_index;
int creator_plugin_index;
CKDWORD dw_param;
CKDWORD dw_flags;
CKDWORD cid;
2024-08-02 17:04:37 +08:00
int64_t saver_manager;
2024-08-01 22:38:55 +08:00
};
struct Table_attr {
CKAttributeType index;
std::string name;
CKAttributeCategory category_index;
std::string category_name;
CK_ATTRIBUT_FLAGS flags;
CKParameterType param_index;
CK_CLASSID compatible_classid;
std::string default_value;
};
struct Table_plugin {
int dll_index;
std::string dll_name;
int plugin_index;
std::string category;
CKBOOL active;
2024-08-02 17:04:37 +08:00
int64_t guid;
2024-08-01 22:38:55 +08:00
std::string desc;
std::string author;
std::string summary;
DWORD version;
2024-08-02 17:04:37 +08:00
std::string func_init;
std::string func_exit;
2024-08-01 22:38:55 +08:00
};
2024-08-02 17:04:37 +08:00
#if defined(VIRTOOLS_21)
using GenericVarType_t = int;
#else
using GenericVarType_t = CKVariableManager::Variable::Type;
#endif
2024-08-01 22:38:55 +08:00
struct Table_variable {
std::string name;
std::string desciption;
XWORD flags;
2024-08-02 17:04:37 +08:00
GenericVarType_t type;
2024-08-01 22:38:55 +08:00
std::string representation;
std::string data;
};
2024-08-02 17:04:37 +08:00
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;
};
2024-08-01 22:38:55 +08:00
}
}