Class TreeStateCPtr


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

      • TreeStateCPtr

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

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

        public TreeStateCPtr​(TreeState 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 TreeState deref()
        The pointer stored in the object.
      • __ref__

        public TreeState __ref__()
        Dereferencing operator.
      • getDeref

        public TreeState getDeref()
        Member access operator.
      • equals

        public boolean equals​(TreeState p)
      • 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
      • getParent

        public Frame getParent​(FrameCPtr frame)
        The parent frame of frame.

        If the frame has no parent, then NULL is returned.

        (We should query the modifiable part of the tree here, but that is
        not implemented yet.)

        Parameters:
        frame - [in] The frame for which to retrieve the parent.

        Returns:
        The parent of the frame or NULL if the frame has no parent.
      • getChildren

        public FrameVector getChildren​(FrameCPtr frame)
        The child frames of frame.

        (We should query the modifiable part of the tree here, but that is
        not implemented yet.)

        Note that we break const-correctness. We treat TreeState as an
        implementation detail upon which an iterator interface in Frame is
        then built.

        Parameters:
        frame - [in] The frame for which to retrieve the children.

        Returns:
        The children of the frame if any children exist, else NULL.
      • getStateSetup

        public StateSetupPtr getStateSetup()
        gets the StateSetup used to create the TreeState
        Returns:
        the StateSetup