Class BlockGraph

    • Constructor Detail

      • BlockGraph

        public BlockGraph()
    • Method Detail

      • addBlock

        public void addBlock​(PcodeBlock bl)
        Add a block to this container. There are (initially) no edges between it and any other block in the container.
        bl - is the new block to add
      • setIndices

        public void setIndices()
        Assign a unique index to all blocks in this container. After this call, getBlock(i) will return the block that satisfies block.getIndex() == i
      • getSize

        public int getSize()
        the number of blocks in this container
      • getBlock

        public PcodeBlock getBlock​(int i)
        Retrieve the i-th block from this container
        i - is the index of the block to fetch
      • addEdge

        public void addEdge​(PcodeBlock begin,
                            PcodeBlock end)
        Add a directed edge between two blocks in this container
        begin - is the "from" block of the edge
        end - is the "to" block of the edge
      • transferObjectRef

        public void transferObjectRef​(BlockGraph ingraph)
        Recursively run through this structured BlockGraph finding the BlockCopy leaves. Using the BlockCopy altindex, lookup the original BlockCopy in -ingraph- and transfer the Object ref and Address into the leaf
        ingraph - is the original flow graph
      • saveXmlBody

        public void saveXmlBody​( writer)
        Description copied from class: PcodeBlock
        Serialize information about the block to XML, other than header and edge info
        saveXmlBody in class PcodeBlock
        writer - is where to serialize to
        Throws: - if there is a problem with the stream
      • restoreXml

        public void restoreXml​(XmlPullParser parser,
                               AddressFactory factory)
                        throws PcodeXMLException
        Restore all blocks and edges in this container from an XML stream.
        parser - is the XML stream parser
        factory - is the AddressFactory used to construct any Address
        PcodeXMLException - if part of the XML description is invalid