Package ghidra.app.util.bin.format.pe.resource

# Class VS_VERSION_CHILD

java.lang.Object
ghidra.app.util.bin.format.pe.resource.VS_VERSION_CHILD

All Implemented Interfaces:
  `StructConverter`

public class VS_VERSION_CHILD extends Object implements StructConverter
A class to represent the VS_VERSION_CHILD data structure which generally corresponds to either StringFileInfo or VarFileInfo. Only a single instance of each childName is expected.

- ## Field Summary

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getChildName()`
  Returns the version child name.
  `VS_VERSION_CHILD[]`
  `getChildren()`
  Returns the array of children
  `short`
  `getChildSize()`
  Returns the version child size.
  `long`
  `getNameRelativeOffset()`
  Return unicode name string offset relative to parent structure start
  `long`
  `getRelativeOffset()`
  Return structure offset relative to parent structure start
  `long`
  `getValueRelativeOffset()`
  Return value offset relative to parent structure start.
  `boolean`
  `hasChildren()`
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.
  `boolean`
  `valueIsDWord()`
  `boolean`
  `valueIsUnicodeString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### toDataType

    public DataType toDataType() throws DuplicateNameException
    Description copied from interface: `StructConverter`
    Returns a structure datatype representing the contents of the implementor of this interface.

    For example, given:

         class A {
             int foo;
             double bar;
         }

    The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

    Specified by:
      `toDataType` in interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
    See Also:
      - `StructureDataType`

  - ### getChildren

    public VS_VERSION_CHILD[] getChildren()
    Returns the array of children
    Returns:
      the array of children

  - ### getRelativeOffset

    public long getRelativeOffset()
    Return structure offset relative to parent structure start
    Returns:
      relative offset

  - ### getChildName

    public String getChildName()
    Returns the version child name.
    Returns:
      the version child name

  - ### getChildSize

    public short getChildSize()
    Returns the version child size.
    Returns:
      the version child size

  - ### getValueRelativeOffset

    public long getValueRelativeOffset()
    Return value offset relative to parent structure start.
    Returns:
      relative value offset or 0 if no value exists

  - ### getNameRelativeOffset

    public long getNameRelativeOffset()
    Return unicode name string offset relative to parent structure start
    Returns:
      relative name offset or 0 if data type is unknown

  - ### valueIsUnicodeString

    public boolean valueIsUnicodeString()
    Returns:
      true if value is unicode string

  - ### valueIsDWord

    public boolean valueIsDWord()
    Returns:
      true if value is 4-byte integer value in memory while string value return by `DataType.getValue(MemBuffer, Settings, int)` is a numeric hex string.

  - ### hasChildren

    public boolean hasChildren()
    Returns:
      true if this child has children