Class CXIdxEntityInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CXIdxEntityInfo
    extends Struct
    implements NativeResource

    Layout

    
     struct CXIdxEntityInfo {
         CXIdxEntityKind kind;
         CXIdxEntityCXXTemplateKind templateKind;
         CXIdxEntityLanguage lang;
         char const * name;
         char const * USR;
         CXCursor cursor;
         CXIdxAttrInfo const * const * attributes;
         unsigned numAttributes;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • KIND, TEMPLATEKIND, LANG, NAME, USR, CURSOR, ATTRIBUTES, NUMATTRIBUTES

        The struct member offsets.
    • Constructor Detail

      • CXIdxEntityInfo

        public CXIdxEntityInfo​(java.nio.ByteBuffer container)
        Creates a CXIdxEntityInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • kind

        public int kind()
        Returns the value of the kind field.
      • templateKind

        public int templateKind()
        Returns the value of the templateKind field.
      • lang

        public int lang()
        Returns the value of the lang field.
      • name

        public java.nio.ByteBuffer name()
        Returns a ByteBuffer view of the null-terminated string pointed to by the name field.
      • nameString

        public java.lang.String nameString()
        Decodes the null-terminated string pointed to by the name field.
      • USR

        public java.nio.ByteBuffer USR()
        Returns a ByteBuffer view of the null-terminated string pointed to by the USR field.
      • USRString

        public java.lang.String USRString()
        Decodes the null-terminated string pointed to by the USR field.
      • cursor

        public CXCursor cursor()
        Returns a CXCursor view of the cursor field.
      • numAttributes

        public int numAttributes()
        Returns the value of the numAttributes field.
      • malloc

        public static CXIdxEntityInfo malloc()
        Returns a new CXIdxEntityInfo instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static CXIdxEntityInfo calloc()
        Returns a new CXIdxEntityInfo instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static CXIdxEntityInfo create​(long address)
        Returns a new CXIdxEntityInfo instance for the specified memory address.
      • createSafe

        @Nullable
        public static CXIdxEntityInfo createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static CXIdxEntityInfo.Buffer create​(long address,
                                                    int capacity)
        Create a CXIdxEntityInfo.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static CXIdxEntityInfo.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static CXIdxEntityInfo mallocStack()
        Returns a new CXIdxEntityInfo instance allocated on the thread-local MemoryStack.
      • callocStack

        public static CXIdxEntityInfo callocStack()
        Returns a new CXIdxEntityInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static CXIdxEntityInfo mallocStack​(MemoryStack stack)
        Returns a new CXIdxEntityInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static CXIdxEntityInfo callocStack​(MemoryStack stack)
        Returns a new CXIdxEntityInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nkind

        public static int nkind​(long struct)
        Unsafe version of kind().
      • ntemplateKind

        public static int ntemplateKind​(long struct)
        Unsafe version of templateKind().
      • nlang

        public static int nlang​(long struct)
        Unsafe version of lang().
      • nname

        public static java.nio.ByteBuffer nname​(long struct)
        Unsafe version of name().
      • nnameString

        public static java.lang.String nnameString​(long struct)
        Unsafe version of nameString().
      • nUSR

        public static java.nio.ByteBuffer nUSR​(long struct)
        Unsafe version of USR.
      • nUSRString

        public static java.lang.String nUSRString​(long struct)
        Unsafe version of USRString().
      • ncursor

        public static CXCursor ncursor​(long struct)
        Unsafe version of cursor().
      • nnumAttributes

        public static int nnumAttributes​(long struct)
        Unsafe version of numAttributes().