//This code create by CodeEngine ,don't modify using System; using System.Collections.Generic; using System.Collections; using Module.Log; namespace GCGame.Table { public class Tab_StaticFunc{ public const string TAB_FILE_DATA = "StaticFunc"; private const int _varCount = 9; public int GetId() { return Id; } public static bool Validate(string line) { var segments = 0; foreach (char c in line) if (c == '\t') segments++; // Note: skip the 2nd column as it's the description; var result = segments == _varCount; if (!result) LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments)); return result; } public Tab_StaticFunc() { } public Tab_StaticFunc(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); OpenLevel = int.Parse(segments[2]); ClassName = segments[3].Trim(); FunctionName = segments[4].Trim(); Param[0] = segments[5].Trim(); Param[1] = segments[6].Trim(); Param[2] = segments[7].Trim(); Param[3] = segments[8].Trim(); Param[4] = segments[9].Trim(); } public int Id { get; private set; } public int OpenLevel { get; private set; } public string ClassName { get; private set; } public string FunctionName { get; private set; } public readonly string[] Param = new string[5]; public int getParamCount() { return Param.Length; } public string GetParambyIndex(int idx) { if(idx >= 0 && idx < Param.Length) return Param[idx]; return default(string); } } }