Class StateStructureCPtr


  • public class StateStructureCPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • StateStructureCPtr

        public StateStructureCPtr​(long cPtr,
                                  boolean cMemoryOwn)
      • StateStructureCPtr

        public StateStructureCPtr()
        Default constructor yielding a NULL-pointer.
      • StateStructureCPtr

        public StateStructureCPtr​(StateStructure ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • deref

        public StateStructure deref()
        The pointer stored in the object.
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • getMaxID

        public int getMaxID()
        gets the max ID of any StateData/Frame currently in the tree.

        All frame/data IDs (see StateData::getID()) for the data of the tree are
        lower than this number (and greater than or equal to zero).
      • getDefaultState

        public State getDefaultState()
        get the default state of the frame tree
        Returns:
        the default tree state
      • getStateData

        public VectorStateDataPtr getStateData()
        All state data in the tree.
        Returns:
        All state data in the tree
      • getFrames

        public FrameVector getFrames()
        All frames of the tree. Notice that elements in
        this vector can be NULL

        Returns:
        All frames of the tree.
      • getDAFs

        public FrameVector getDAFs()
        All DAFs of the tree.

        Returns:
        All DAFs of the tree.
      • findFrame

        public Frame findFrame​(java.lang.String name)
        Returns frame with the specified name.

        If multiple frames has the same name, the first frame encountered
        will be returned. If no frame is found, the method returns NULL.

        Parameters:
        name - [in] name of Frame.

        Returns:
        The frame with name name or NULL if no such frame.
      • findData

        public StateDataPtr findData​(java.lang.String name)
        Find data from name.
        Parameters:
        name - [in] the name.
        Returns:
        the data if found.