78 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C++
		
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C++
		
	
	
	
| #pragma once
 | |
| 
 | |
| 
 | |
| 
 | |
| //构造int类型容器
 | |
| static std::map<std::string, int>Int_STL;
 | |
| //构造float类型容器
 | |
| static std::map<std::string, float>Float_STL;
 | |
| //构造string类型容器
 | |
| static std::map<std::string, std::string>String_STL;
 | |
| //构造bool类型容器
 | |
| static std::map<std::string, bool>Bool_STL;
 | |
| 
 | |
| //构造intarr类型容器
 | |
| static std::map<std::string, std::map<int, int>>IntArr_STL;
 | |
| //构造floatarr类型容器
 | |
| static std::map<std::string, std::map<int, float>>FloatArr_STL;
 | |
| //构造stringarr类型容器
 | |
| static std::map<std::string, std::map<int, std::string>>StringArr_STL;
 | |
| //构造boolarr类型容器
 | |
| static std::map<std::string, std::map<int, bool>>BoolArr_STL;
 | |
| 
 | |
| 
 | |
| //构造 抽奖 类型容器
 | |
| struct Dargonresult
 | |
| {
 | |
| 	int ItemIndex;
 | |
| 	int ItemNum;
 | |
| 	int ItemGrade;
 | |
| };
 | |
| struct DargonMap
 | |
| {
 | |
| 	int LuckyValue;
 | |
| 	Dargonresult Result[10];
 | |
| };
 | |
| static std::map<std::string, DargonMap>DargonState_STL;
 | |
| static std::map<std::string, int>DargonModel_STL;
 | |
| 
 | |
| static std::map<int, int>aod;
 | |
| static std::map<int, float>bod;
 | |
| static std::map<int, std::string>cod;
 | |
| static std::map<int, bool>dod;
 | |
| 
 | |
| 
 | |
| class STL
 | |
| {
 | |
| private:
 | |
| 
 | |
| 
 | |
| public:
 | |
| 
 | |
| 
 | |
| 	//查询指定容器是否存在
 | |
| 	static int Check_STL(std::string name,int Type,int idx = 0);
 | |
| 	//static int Check_STL_Idx(std::string name,int idx);
 | |
| 
 | |
| 
 | |
| 	//构造 Int数组容器
 | |
| 	static void BuildIntArr_STL(std::string name);
 | |
| 	static void BuildFloatArr_STL(std::string name);
 | |
| 	static void BuildStringArr_STL(std::string name);
 | |
| 	static void BuildBoolArr_STL(std::string name);
 | |
| 	
 | |
| 	//设置 Int数组容器
 | |
| 	static void SetIntArr_STL(std::string name,int idx,int value);
 | |
| 	static void SetFloatArr_STL(std::string name,int idx,float value);
 | |
| 	static void SetStringArr_STL(std::string name,int idx,std::string value);
 | |
| 	static void SetBoolArr_STL(std::string name,int idx,bool value);
 | |
| 
 | |
| 	//获取 Int数组容器
 | |
| 	static int GetIntArr_STL(std::string name, int idx);
 | |
| 	static float GetFloatArr_STL(std::string name, int idx);
 | |
| 	static std::string GetStringArr_STL(std::string name, int idx);
 | |
| 	static bool GetBoolArr_STL(std::string name, int idx);
 | |
| 
 | |
| };
 | |
| 
 |