docs.unity3d.com
    Show / Hide Table of Contents

    Struct TMP_TextProcessingStack<T>

    Structure used to track XML tags of various types.

    Namespace: TMPro
    Syntax
    public struct TMP_TextProcessingStack<T>
    Type Parameters
    Name Description
    T

    Constructors

    TMP_TextProcessingStack(T[])

    Constructor to create a new item stack.

    Declaration
    public TMP_TextProcessingStack(T[] stack)
    Parameters
    Type Name Description
    T[] stack

    TMP_TextProcessingStack(Int32)

    Constructor for a new item stack with the given capacity.

    Declaration
    public TMP_TextProcessingStack(int capacity)
    Parameters
    Type Name Description
    Int32 capacity

    TMP_TextProcessingStack(Int32, Int32)

    Declaration
    public TMP_TextProcessingStack(int capacity, int rolloverSize)
    Parameters
    Type Name Description
    Int32 capacity
    Int32 rolloverSize

    Fields

    index

    Declaration
    public int index
    Field Value
    Type Description
    Int32

    itemStack

    Declaration
    public T[] itemStack
    Field Value
    Type Description
    T[]

    Properties

    Count

    Declaration
    public readonly int Count { get; }
    Property Value
    Type Description
    Int32

    current

    Returns the current item on the stack.

    Declaration
    public readonly T current { get; }
    Property Value
    Type Description
    T

    rolloverSize

    Declaration
    public int rolloverSize { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    Add(T)

    Function to add a new item to the stack.

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    Clear()

    Function to clear and reset stack to first item.

    Declaration
    public void Clear()

    CurrentItem()

    Declaration
    public T CurrentItem()
    Returns
    Type Description
    T

    Peek()

    Declaration
    public T Peek()
    Returns
    Type Description
    T

    Pop()

    Declaration
    public T Pop()
    Returns
    Type Description
    T

    PreviousItem()

    Function to retrieve the previous item without affecting the stack.

    Declaration
    public T PreviousItem()
    Returns
    Type Description
    T

    Push(T)

    Declaration
    public void Push(T item)
    Parameters
    Type Name Description
    T item

    Remove()

    Function to retrieve an item from the stack.

    Declaration
    public T Remove()
    Returns
    Type Description
    T

    SetDefault(T)

    Function to set the first item on the stack and reset index.

    Declaration
    public void SetDefault(T item)
    Parameters
    Type Name Description
    T item
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023