Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ExcelIndex Class Reference

Public Member Functions

 ExcelIndex (ICell titleCell, ICell dataCell)
 
string GetTypeName ()
 

Static Public Member Functions

static List< ExcelIndexGetIndex (ISheet sheet)
 

Public Attributes

string type
 
string name
 
string enumName = ""
 
bool serializable = true
 

Detailed Description

Definition at line 4 of file ExcelIndex.cs.

Constructor & Destructor Documentation

◆ ExcelIndex()

ExcelIndex.ExcelIndex ( ICell  titleCell,
ICell  dataCell 
)
inline

Definition at line 28 of file ExcelIndex.cs.

29 {
30 name = titleCell.StringCellValue;
31 if (dataCell != null)
32 {
33 type = dataCell.StringCellValue;
34 }
35 if (type == "Sprite[]")
36 {
37 serializable = false;
38 }
39 }
bool serializable
Definition: ExcelIndex.cs:12
string type
Definition: ExcelIndex.cs:6
string name
Definition: ExcelIndex.cs:8

References name, serializable, and type.

Member Function Documentation

◆ GetIndex()

static List< ExcelIndex > ExcelIndex.GetIndex ( ISheet  sheet)
inlinestatic

Definition at line 14 of file ExcelIndex.cs.

15 {
16 List<ExcelIndex> list = new List<ExcelIndex>();
17 IRow row = sheet.GetRow(0);
18 IRow row2 = sheet.GetRow(1);
19 for (int i = 0; i < row.LastCellNum; i++)
20 {
21 ICell cell = row2.GetCell(i);
22 ExcelIndex item = new ExcelIndex(row.GetCell(i), cell);
23 list.Add(item);
24 }
25 return list;
26 }

References item.

Referenced by ExcelData.Override().

◆ GetTypeName()

string ExcelIndex.GetTypeName ( )
inline

Definition at line 41 of file ExcelIndex.cs.

42 {
43 if (type == null)
44 {
45 return null;
46 }
47 if (type.StartsWith("#"))
48 {
49 enumName = type.Replace("#", "");
50 return enumName;
51 }
52 if (type == "str")
53 {
54 return "string";
55 }
56 if (type == "element_id")
57 {
58 return "int";
59 }
60 if (type == "elements")
61 {
62 return "int[]";
63 }
64 return type;
65 }
string enumName
Definition: ExcelIndex.cs:10

References enumName, and type.

Member Data Documentation

◆ enumName

string ExcelIndex.enumName = ""

Definition at line 10 of file ExcelIndex.cs.

Referenced by GetTypeName().

◆ name

string ExcelIndex.name

Definition at line 8 of file ExcelIndex.cs.

Referenced by ExcelIndex().

◆ serializable

bool ExcelIndex.serializable = true

Definition at line 12 of file ExcelIndex.cs.

Referenced by ExcelIndex().

◆ type

string ExcelIndex.type

Definition at line 6 of file ExcelIndex.cs.

Referenced by ExcelIndex(), and GetTypeName().


The documentation for this class was generated from the following file: