Files
SuperScriptMaterializer/materializer/DataTypes.hpp

309 lines
5.9 KiB
C++
Raw Normal View History

2024-08-01 22:38:55 +08:00
#pragma once
#include "stdafx.hpp"
#include <GenericHelper.hpp>
2024-08-01 22:38:55 +08:00
namespace VSW::Materializer::DataTypes {
2024-08-08 17:47:27 +08:00
struct BlobDescriptor {
const void* ptr;
int length;
};
2024-08-01 22:38:55 +08:00
namespace Script {
2024-08-02 17:04:37 +08:00
2024-08-01 22:38:55 +08:00
struct Table_script {
CK_ID beobj;
YYCC::yycc_u8string beobj_name;
int behavior_index;
2024-08-01 22:38:55 +08:00
CK_ID behavior;
};
struct Table_behavior {
CK_ID thisobj;
YYCC::yycc_u8string name;
2024-08-01 22:38:55 +08:00
CK_BEHAVIOR_TYPE type;
YYCC::yycc_u8string proto_name;
int64_t proto_guid;
2024-08-01 22:38:55 +08:00
CK_BEHAVIOR_FLAGS flags;
int priority;
CKDWORD version;
int pin_count_ptarget;
int pin_count_pin;
int pin_count_pout;
int pin_count_bin;
int pin_count_bout;
2024-08-01 22:38:55 +08:00
CK_ID parent;
};
struct Table_bIO {
CK_ID thisobj;
int index;
YYCC::yycc_u8string name;
2024-08-01 22:38:55 +08:00
CK_ID parent;
};
struct Table_bIn : public Table_bIO {};
struct Table_bOut : public Table_bIO {};
struct Table_pTarget {
CK_ID thisobj;
YYCC::yycc_u8string name;
int64_t type;
2024-08-01 22:38:55 +08:00
CK_ID parent;
CK_ID direct_source;
CK_ID shared_source;
};
struct Table_pIn {
CK_ID thisobj;
int index;
YYCC::yycc_u8string name;
int64_t type;
2024-08-01 22:38:55 +08:00
CK_ID parent;
CK_ID direct_source;
CK_ID shared_source;
};
struct Table_pOut {
CK_ID thisobj;
int index;
YYCC::yycc_u8string name;
int64_t type;
2024-08-01 22:38:55 +08:00
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;
YYCC::yycc_u8string name;
int64_t type;
bool is_setting;
2024-08-01 22:38:55 +08:00
CK_ID parent;
};
struct Table_pAttr {
CK_ID thisobj;
YYCC::yycc_u8string name;
int64_t type;
CK_ID owner;
2024-08-01 22:38:55 +08:00
};
struct Table_pLink {
// Basic infos
2024-08-01 22:38:55 +08:00
CK_ID parent;
// Input infos
CK_ID input;
2024-08-01 22:38:55 +08:00
CK_ID input_obj;
2024-08-02 17:04:37 +08:00
VSW::DataTypes::ParameterLinkIOType input_type;
bool input_is_bb;
2024-08-01 22:38:55 +08:00
int input_index;
// Output infos
CK_ID output;
2024-08-01 22:38:55 +08:00
CK_ID output_obj;
2024-08-02 17:04:37 +08:00
VSW::DataTypes::ParameterLinkIOType output_type;
bool output_is_bb;
2024-08-01 22:38:55 +08:00
int output_index;
};
struct Table_pOper {
CK_ID thisobj;
int64_t op;
2024-08-01 22:38:55 +08:00
CK_ID parent;
};
struct Table_eLink {
CK_ID export_obj;
CK_ID internal_obj;
bool is_in;
2024-08-01 22:38:55 +08:00
int index;
CK_ID parent;
};
struct Table_data {
YYCC::yycc_u8string field;
2024-08-08 17:47:27 +08:00
BlobDescriptor data;
2024-08-01 22:38:55 +08:00
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;
YYCC::yycc_u8string name;
2024-08-01 22:38:55 +08:00
};
struct Table_obj {
CK_ID id;
YYCC::yycc_u8string name;
2024-08-01 22:38:55 +08:00
CK_CLASSID classid;
YYCC::yycc_u8string classid_name;
2024-08-01 22:38:55 +08:00
};
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 {
YYCC::yycc_u8string func_ptr;
2024-08-02 17:04:37 +08:00
int64_t in1_guid;
int64_t in2_guid;
int64_t out_guid;
int64_t op_guid;
YYCC::yycc_u8string op_name;
2024-08-01 22:38:55 +08:00
CKOperationType op_code;
};
struct Table_param {
// Parameter infos
2024-08-01 22:38:55 +08:00
CKParameterType index;
2024-08-02 17:04:37 +08:00
int64_t guid;
int64_t derived_from;
YYCC::yycc_u8string name;
2024-08-01 22:38:55 +08:00
int default_size;
YYCC::yycc_u8string func_CreateDefault;
YYCC::yycc_u8string func_Delete;
YYCC::yycc_u8string func_SaveLoad;
YYCC::yycc_u8string func_Check;
YYCC::yycc_u8string func_Copy;
YYCC::yycc_u8string func_String;
YYCC::yycc_u8string func_UICreator;
// Dll infos
YYCC::yycc_u8string dll_name;
int dll_index;
int position_in_dll;
// Misc
CKDWORD flags;
2024-08-01 22:38:55 +08:00
CKDWORD dw_param;
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;
YYCC::yycc_u8string name;
2024-08-01 22:38:55 +08:00
CKAttributeCategory category_index;
YYCC::yycc_u8string category_name;
2024-08-01 22:38:55 +08:00
CK_ATTRIBUT_FLAGS flags;
CKParameterType param_index;
int64_t param_guid;
2024-08-01 22:38:55 +08:00
CK_CLASSID compatible_classid;
YYCC::yycc_u8string default_value;
2024-08-01 22:38:55 +08:00
};
struct Table_plugin {
// Category
YYCC::yycc_u8string category_name;
int category_index;
// Dll infos
YYCC::yycc_u8string dll_name;
int dll_index;
int position_in_dll;
// Plugin infos
int index;
2024-08-02 17:04:37 +08:00
int64_t guid;
YYCC::yycc_u8string desc;
YYCC::yycc_u8string author;
YYCC::yycc_u8string summary;
2024-08-01 22:38:55 +08:00
DWORD version;
CK_PLUGIN_TYPE type;
YYCC::yycc_u8string func_init;
YYCC::yycc_u8string func_exit;
// Reader specific
YYCC::yycc_u8string reader_fct;
int reader_opt_count;
CK_DATAREADER_FLAGS reader_flags;
int64_t reader_setting_param_guid;
YYCC::yycc_u8string reader_file_ext;
// Manager and Render Engine specific
bool manager_active;
// Behavior specific
YYCC::yycc_u8string behavior_guids;
2024-08-01 22:38:55 +08:00
};
2024-08-02 17:04:37 +08:00
#if defined(VIRTOOLS_21)
// Virtools 2.1 doesn't have Variable Manager
// We use a normal type as a placeholder.
2024-08-02 17:04:37 +08:00
using GenericVarType_t = int;
#else
using GenericVarType_t = CKVariableManager::Variable::Type;
#endif
2024-08-01 22:38:55 +08:00
struct Table_variable {
YYCC::yycc_u8string name;
YYCC::yycc_u8string desciption;
2024-08-01 22:38:55 +08:00
XWORD flags;
2024-08-02 17:04:37 +08:00
GenericVarType_t type;
YYCC::yycc_u8string representation;
YYCC::yycc_u8string data;
2024-08-01 22:38:55 +08:00
};
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
}
}