Package ghidra.app.decompiler

# Interface ClangNode

All Known Implementing Classes:
  `ClangBreak`, `ClangCaseToken`, `ClangCommentToken`, `ClangFieldToken`, `ClangFuncNameToken`, `ClangFuncProto`, `ClangFunction`, `ClangLabelToken`, `ClangOpToken`, `ClangReturnType`, `ClangStatement`, `ClangSyntaxToken`, `ClangToken`, `ClangTokenGroup`, `ClangTypeToken`, `ClangVariableDecl`, `ClangVariableToken`

public interface ClangNode
A collection of source code text elements, with associated attributes, grouped in a tree structure.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClangNode`
  `Child(int i)`
  Get the i-th child grouping
  `void`
  `flatten(List<ClangNode> list)`
  Flatten this text into a list of tokens (see ClangToken)
  `ClangFunction`
  `getClangFunction()`
  Get the text representing an entire function of which this is part.
  `Address`
  `getMaxAddress()`
  Get the biggest Program address associated with the code that this text represents
  `Address`
  `getMinAddress()`
  Get the smallest Program address associated with the code that this text represents
  `int`
  `numChildren()`
  Return the number of immediate groupings this text breaks up into
  `ClangNode`
  `Parent()`
  Get the immediate grouping (parent) containing this text element.
  `void`
  `setHighlight(Color c)`
  Set a highlighting background color for all text elements

- ## Method Details

  - ### Parent

    ClangNode Parent()
    Get the immediate grouping (parent) containing this text element. If this is a complete document, null is returned.
    Returns:
      the parent grouping or null

  - ### getMinAddress

    Address getMinAddress()
    Get the smallest Program address associated with the code that this text represents
    Returns:
      the smallest Address

  - ### getMaxAddress

    Address getMaxAddress()
    Get the biggest Program address associated with the code that this text represents
    Returns:
      the biggest Address

  - ### setHighlight

    void setHighlight(Color c)
    Set a highlighting background color for all text elements
    Parameters:
      `c` - is the color to set

  - ### numChildren

    int numChildren()
    Return the number of immediate groupings this text breaks up into
    Returns:
      the number of child groupings

  - ### Child

    ClangNode Child(int i)
    Get the i-th child grouping
    Parameters:
      `i` - is the index selecting the grouping
    Returns:
      the selected grouping

  - ### getClangFunction

    ClangFunction getClangFunction()
    Get the text representing an entire function of which this is part.
    Returns:
      text for the whole function

  - ### flatten

    void flatten(List<ClangNode> list)
    Flatten this text into a list of tokens (see ClangToken)
    Parameters:
      `list` - is the container that will contain the tokens