⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 templateex.h

📁 概述:数据的纵向收集
💻 H
字号:
//sunwangme@hotmail.com
#pragma once
#include <atlstr.h>
#include <vector>

#define SCRIPT_INIT_FOO "init"

struct CCallBackTag
{
	CString strPattern;
	CString strFunction;
};

class CTemplateEx
{
	//将脚本和相关回调全部准备在内存
public:
	static void Load(const CString& strPath);
	static void LoadScript(const CString& strPath);
	static void SetStoreCallback(LPCSTR lpszPattern,LPCSTR lpszFoo)
	{
		CCallBackTag tag;
		tag.strFunction=lpszFoo;
		tag.strPattern=lpszPattern;
		s_arrStoreCallback.push_back(tag);
	}
	static void SetStoreCallbackEx(LPCSTR lpszPattern,LPCSTR lpszFoo)
	{
		CCallBackTag tag;
		tag.strFunction=lpszFoo;
		tag.strPattern=lpszPattern;
		s_arrStoreCallbackEx.push_back(tag);
	}
    static void SetStoreCallbackEx2(LPCSTR lpszPattern,LPCSTR lpszFoo)
    {
		CCallBackTag tag;
		tag.strFunction=lpszFoo;
		tag.strPattern=lpszPattern;
		s_arrStoreCallbackEx2.push_back(tag);
    }
	//每次回调首先初始一个独立的vm,然后在vm将函数注册然后执行回调
public:
	static void CallStoreCallback(LPCSTR lpszTask);
	static void CallStoreCallbackEx(LPCSTR lpszTask,LPCSTR lpszContent);
	static void CallInit();
	//保存脚本到内存
private:
	static CString s_strScript;
	static std::vector<CCallBackTag> s_arrStoreCallback;
	static std::vector<CCallBackTag> s_arrStoreCallbackEx;
	static std::vector<CCallBackTag> s_arrStoreCallbackEx2;
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -