-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Runtime/Flow/Utilities/Libraries/DataDrivenExecutableLibrary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Ceres.Annotations; | ||
using Ceres.Graph.Flow.Annotations; | ||
using Chris.DataDriven; | ||
using Chris.Serialization; | ||
|
||
namespace Ceres.Graph.Flow.Utilities | ||
{ | ||
/// <summary> | ||
/// Executable function library for Chris.DataDriven | ||
/// </summary> | ||
[CeresGroup("DataDriven")] | ||
public partial class DataDrivenExecutableLibrary: ExecutableFunctionLibrary | ||
{ | ||
[ExecutableFunction] | ||
public static DataTableManager Flow_GetDataTableManager( | ||
[ResolveReturn] SerializedType<DataTableManager> managerType) | ||
{ | ||
return DataTableManager.GetOrCreateDataTableManager(managerType); | ||
} | ||
|
||
[ExecutableFunction(IsScriptMethod = true), CeresLabel("Get DataTable")] | ||
public static DataTable Flow_DataTableManagerGetDataTable(DataTableManager dataTableManager, string name) | ||
{ | ||
return dataTableManager.GetDataTable(name); | ||
} | ||
|
||
[ExecutableFunction(IsScriptMethod = true), CeresLabel("Get Row")] | ||
public static IDataTableRow Flow_DataTableGetRow(DataTable dataTable, string rowId, | ||
[ResolveReturn] SerializedType<IDataTableRow> rowType) | ||
{ | ||
return dataTable.GetRow(rowId); | ||
} | ||
|
||
[ExecutableFunction(IsScriptMethod = true), CeresLabel("Get Row by Index")] | ||
public static IDataTableRow Flow_DataTableGetRowByIndex(DataTable dataTable, int index, | ||
[ResolveReturn] SerializedType<IDataTableRow> rowType) | ||
{ | ||
return dataTable.GetRow(index); | ||
} | ||
|
||
[ExecutableFunction(IsScriptMethod = true), CeresLabel("Get All Rows")] | ||
public static IDataTableRow[] Flow_DataTableGetAllRows(DataTable dataTable) | ||
{ | ||
return dataTable.GetAllRows(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Runtime/Flow/Utilities/Libraries/DataDrivenExecutableLibrary.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.