Struct LuaTableItem
- Namespace
- Cobilas.GodotEngine.GDLua
- Assembly
- com.cobilas.godot.lua.dll
Represents a Lua table item that can contain multiple table elements and supports enumeration.
public readonly struct LuaTableItem : ILuaTableItem, ILuaTable, IEnumerable<ILuaTable>, IEnumerable
- Implements
- Inherited Members
Remarks
This structure implements ILuaTableItem to provide collection capabilities for Lua table structures with hierarchical organization and string representation.
Constructors
LuaTableItem(string, params ILuaTable[])
Represents a Lua table item that can contain multiple table elements and supports enumeration.
public LuaTableItem(string name, params ILuaTable[] items)
Parameters
namestringThe name identifier for the table item.
itemsILuaTable[]The array of Lua table elements to initialize the table with.
Remarks
This structure implements ILuaTableItem to provide collection capabilities for Lua table structures with hierarchical organization and string representation.
Properties
Count
Gets the number of table elements contained in this table item.
public long Count { get; }
Property Value
- long
The total count of table elements.
this[int]
Gets the table element at the specified index.
public ILuaTable this[int index] { get; }
Parameters
indexintThe zero-based index of the table element to get.
Property Value
this[string]
Gets the table element with the specified name.
public ILuaTable this[string name] { get; }
Parameters
namestringThe name of the table element to get.
Property Value
Name
Gets the name of the Lua table element.
public string Name { get; }
Property Value
- string
The name identifier of the table element.
Tables
Gets an array of all table elements contained in this table item.
public ILuaTable[] Tables { get; }
Property Value
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<ILuaTable> GetEnumerator()
Returns
- IEnumerator<ILuaTable>
An enumerator that can be used to iterate through the collection.
ToString()
Returns a string representation of the Lua table hierarchy.
public override string ToString()
Returns
- string
A formatted string showing the table structure with proper indentation.