docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TMP_TextProcessingStack<T>

    Structure used to track XML tags of various types.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: TMPro
    Assembly: Unity.TextMeshPro.dll
    Syntax
    public struct TMP_TextProcessingStack<T>
    Type Parameters
    Name Description
    T

    Constructors

    TMP_TextProcessingStack(int)

    Constructor for a new item stack with the given capacity.

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

    TMP_TextProcessingStack(int, int)

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

    TMP_TextProcessingStack(T[])

    Constructor to create a new item stack.

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

    Fields

    index

    Declaration
    public int index
    Field Value
    Type Description
    int

    itemStack

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

    Properties

    Count

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

    current

    Returns the current item on the stack.

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

    rolloverSize

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

    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
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)