Interface DataContext

    • Field Detail

    • Method Detail

      • getParentDataCtx

        DataContext getParentDataCtx()
        Get the next outer DataContext from the current context.
        Returns:
        The containing DataContext, or null if the current context is the root context.
      • getNamedDef

        AnonStructSeg getNamedDef​(java.lang.String typeName)
        Look up a named type for use expanding a stub definition or to apply to a different context.
      • getTypeByName

        StructDef getTypeByName​(java.lang.String typeName)
        Look up a named type for use constructing nested elements of a structure.
        Parameters:
        typeName - The type name to look up in the predefined names.
        Returns:
        The type suitable for use with CipStruct and/or StructMember.
      • getTypesImpl

        java.util.ArrayList<StructDef> getTypesImpl()
      • getTypes

        default java.util.List<StructDef> getTypes()
        Enumerate all known (named) types in the context.
        Returns:
      • getTypeByCRC

        java.lang.String getTypeByCRC​(int crc)
        Look up a named type by CRC for use directly by a StructureDefSeg or indirectly by an AnonTypeSeg.
        Parameters:
        crc -
        Returns:
        The type suitable for use with CipStruct and/or StructMember.
      • getCtxDataImpl

        BaseDataType<?> getCtxDataImpl​(java.util.List<PathSegment> reference)
        Look up reference data within this current context for use in indirection of various kinds, as described for getCtxData(), which uses this implementation and handles delegation to outer contexts.
        Parameters:
        reference - The path to a data item.
        Returns:
        A data object
      • getCtxData

        default BaseDataType<?> getCtxData​(java.util.List<PathSegment> reference)
        Look up reference data for use in indirection of various kinds, including array dimensions and array member/bit numbers. These latter should yield an integer elementary type that implements the .intValue() method.

        Implementations are expected to delegate to a parent DataContext if the current context cannot resolve the reference.

        Parameters:
        reference - The path to a data item.
        Returns:
        A data object
      • toEnum

        default java.lang.String toEnum​(int v)
      • fromEnum

        default java.lang.Integer fromEnum​(java.lang.String v)
      • makeUnhosted

        default CipBOOL makeUnhosted()