Skip to content

Commit

Permalink
StatementData添加一些几个方便使用的接口
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamanlan committed Sep 5, 2016
1 parent 2e27908 commit 5d6e180
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion Dsl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,32 @@ public override string ToScriptString(bool includeComment)
return ToString();
#endif
}

public int GetFunctionNum()
{
return m_Functions.Count;
}
public void SetFunction(int index, FunctionData funcData)
{
if (index < 0 || index >= m_Functions.Count)
return;
m_Functions[index] = funcData;
}
public FunctionData GetFunction(int index)
{
if (index < 0 || index >= m_Functions.Count)
return FunctionData.NullFunctionData;
return m_Functions[index];
}
public string GetFunctionId(int index)
{
if (index < 0 || index >= m_Functions.Count)
return string.Empty;
return m_Functions[index].GetId();
}
public void AddFunction(FunctionData funcData)
{
m_Functions.Add(funcData);
}
public List<FunctionData> Functions
{
get { return m_Functions; }
Expand Down
Binary file modified DslLib/bin/Debug/Dsl.dll
Binary file not shown.
Binary file modified DslLib/bin/Debug/Dsl.pdb
Binary file not shown.
Binary file modified bin/Debug/Dsl.exe
Binary file not shown.
Binary file modified bin/Debug/Dsl.pdb
Binary file not shown.

0 comments on commit 5d6e180

Please sign in to comment.