Class ListBase


  • public class ListBase
    extends CFacade
    Generated facet for DNA struct type 'ListBase'.

    Class Documentation

    Java .Blend

    This is the entry point to work with linked lists. It is for example used in libraries Library, to provide a reference to the first and the last element of a linked list of library objects.

    Blender Source Code

    Never change the size of this! dna_genfile.c detects pointer_size with it.

    • Field Detail

      • __DNA__SDNA_INDEX

        public static final int __DNA__SDNA_INDEX
        This is the sdna index of the struct ListBase.

        It is required when allocating a new block to store data for ListBase.

        See Also:
        StructDNA, BlockTable, Constant Field Values
      • __DNA__FIELD__first

        public static final long[] __DNA__FIELD__first
        Field descriptor (offset) for struct member 'first'.

        Field Documentation

        Java .Blend

        first element in the list

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         ListBase listbase = ...;
         CPointer<Object> p = listbase.__dna__addressof(ListBase.__DNA__FIELD__first);
         CPointer<CPointer<Object>> p_first = p.cast(new Class[]{CPointer.class, Object.class});
         

        Metadata

        • Field: 'first'
        • Signature: 'void*'
        • Actual Size (32bit/64bit): 4/8
      • __DNA__FIELD__last

        public static final long[] __DNA__FIELD__last
        Field descriptor (offset) for struct member 'last'.

        Field Documentation

        Java .Blend

        last element in the list

        Pointer Arithmetics

        This is how you get a reference on the corresponding field in the struct:

         ListBase listbase = ...;
         CPointer<Object> p = listbase.__dna__addressof(ListBase.__DNA__FIELD__last);
         CPointer<CPointer<Object>> p_last = p.cast(new Class[]{CPointer.class, Object.class});
         

        Metadata

        • Field: 'last'
        • Signature: 'void*'
        • Actual Size (32bit/64bit): 4/8
    • Constructor Detail

      • ListBase

        public ListBase​(long __address,
                        Block __block,
                        BlockTable __blockTable)
      • ListBase

        protected ListBase​(ListBase that)
    • Method Detail

      • getFirst

        public CPointer<java.lang.Object> getFirst()
                                            throws java.io.IOException
        Get method for struct member 'first'.

        Field Documentation

        Java .Blend

        first element in the list
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__first
      • setFirst

        public void setFirst​(CPointer<java.lang.Object> first)
                      throws java.io.IOException
        Set method for struct member 'first'.

        Field Documentation

        Java .Blend

        first element in the list
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__first
      • getLast

        public CPointer<java.lang.Object> getLast()
                                           throws java.io.IOException
        Get method for struct member 'last'.

        Field Documentation

        Java .Blend

        last element in the list
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__last
      • setLast

        public void setLast​(CPointer<java.lang.Object> last)
                     throws java.io.IOException
        Set method for struct member 'last'.

        Field Documentation

        Java .Blend

        last element in the list
        Throws:
        java.io.IOException
        See Also:
        __DNA__FIELD__last
      • __io__addressof

        public CPointer<ListBase> __io__addressof()
        Instantiates a pointer on this instance.