Class CXIdxDeclInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class CXIdxDeclInfo extends Struct<CXIdxDeclInfo> implements NativeResource

 struct CXIdxDeclInfo {
     CXIdxEntityInfo const * entityInfo;
     CXCursor cursor;
     CXIdxLoc loc;
     CXIdxContainerInfo const * semanticContainer;
     CXIdxContainerInfo const * lexicalContainer;
     int isRedeclaration;
     int isDefinition;
     int isContainer;
     CXIdxContainerInfo const * declAsContainer;
     int isImplicit;
     CXIdxAttrInfo const * const * attributes;
     unsigned numAttributes;
     unsigned flags;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • ENTITYINFO

      public static final int ENTITYINFO
      The struct member offsets.
    • CURSOR

      public static final int CURSOR
      The struct member offsets.
    • LOC

      public static final int LOC
      The struct member offsets.
    • SEMANTICCONTAINER

      public static final int SEMANTICCONTAINER
      The struct member offsets.
    • LEXICALCONTAINER

      public static final int LEXICALCONTAINER
      The struct member offsets.
    • ISREDECLARATION

      public static final int ISREDECLARATION
      The struct member offsets.
    • ISDEFINITION

      public static final int ISDEFINITION
      The struct member offsets.
    • ISCONTAINER

      public static final int ISCONTAINER
      The struct member offsets.
    • DECLASCONTAINER

      public static final int DECLASCONTAINER
      The struct member offsets.
    • ISIMPLICIT

      public static final int ISIMPLICIT
      The struct member offsets.
    • ATTRIBUTES

      public static final int ATTRIBUTES
      The struct member offsets.
    • NUMATTRIBUTES

      public static final int NUMATTRIBUTES
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
  • Constructor Details

    • CXIdxDeclInfo

      public CXIdxDeclInfo(ByteBuffer container)
      Creates a CXIdxDeclInfo 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<CXIdxDeclInfo>
    • entityInfo

      public CXIdxEntityInfo entityInfo()
      Returns:
      a CXIdxEntityInfo view of the struct pointed to by the entityInfo field.
    • cursor

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

      public CXIdxLoc loc()
      Returns:
      a CXIdxLoc view of the loc field.
    • semanticContainer

      public CXIdxContainerInfo semanticContainer()
      Returns:
      a CXIdxContainerInfo view of the struct pointed to by the semanticContainer field.
    • lexicalContainer

      public CXIdxContainerInfo lexicalContainer()
      Returns:
      a CXIdxContainerInfo view of the struct pointed to by the lexicalContainer field.
    • isRedeclaration

      public boolean isRedeclaration()
      Returns:
      the value of the isRedeclaration field.
    • isDefinition

      public boolean isDefinition()
      Returns:
      the value of the isDefinition field.
    • isContainer

      public boolean isContainer()
      Returns:
      the value of the isContainer field.
    • declAsContainer

      public CXIdxContainerInfo declAsContainer()
      Returns:
      a CXIdxContainerInfo view of the struct pointed to by the declAsContainer field.
    • isImplicit

      public boolean isImplicit()
      Returns:
      the value of the isImplicit field.
    • attributes

      public PointerBuffer attributes()
      Returns:
      a PointerBuffer view of the data pointed to by the attributes field.
    • numAttributes

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

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

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

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

      public static CXIdxDeclInfo create()
      Returns a new CXIdxDeclInfo instance allocated with BufferUtils.
    • create

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

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

      public static CXIdxDeclInfo.Buffer malloc(int capacity)
      Returns a new CXIdxDeclInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static CXIdxDeclInfo.Buffer calloc(int capacity)
      Returns a new CXIdxDeclInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CXIdxDeclInfo.Buffer create(int capacity)
      Returns a new CXIdxDeclInfo.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      public static CXIdxDeclInfo malloc(MemoryStack stack)
      Returns a new CXIdxDeclInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

      public static CXIdxDeclInfo.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new CXIdxDeclInfo.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static CXIdxDeclInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new CXIdxDeclInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nentityInfo

      public static CXIdxEntityInfo nentityInfo(long struct)
      Unsafe version of entityInfo().
    • ncursor

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

      public static CXIdxLoc nloc(long struct)
      Unsafe version of loc().
    • nsemanticContainer

      public static CXIdxContainerInfo nsemanticContainer(long struct)
      Unsafe version of semanticContainer().
    • nlexicalContainer

      public static CXIdxContainerInfo nlexicalContainer(long struct)
      Unsafe version of lexicalContainer().
    • nisRedeclaration

      public static int nisRedeclaration(long struct)
      Unsafe version of isRedeclaration().
    • nisDefinition

      public static int nisDefinition(long struct)
      Unsafe version of isDefinition().
    • nisContainer

      public static int nisContainer(long struct)
      Unsafe version of isContainer().
    • ndeclAsContainer

      public static CXIdxContainerInfo ndeclAsContainer(long struct)
      Unsafe version of declAsContainer().
    • nisImplicit

      public static int nisImplicit(long struct)
      Unsafe version of isImplicit().
    • nattributes

      public static PointerBuffer nattributes(long struct)
      Unsafe version of attributes.
    • nnumAttributes

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

      public static int nflags(long struct)
      Unsafe version of flags().