Table of Contents

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

name string

The name identifier for the table item.

items ILuaTable[]

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

index int

The zero-based index of the table element to get.

Property Value

ILuaTable

The ILuaTable at the specified index.

this[string]

Gets the table element with the specified name.

public ILuaTable this[string name] { get; }

Parameters

name string

The name of the table element to get.

Property Value

ILuaTable

The ILuaTable with the specified name.

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

ILuaTable[]

An array of ILuaTable elements.

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.