Package ghidra.app.util
Class DataTypeDependencyOrderer
- java.lang.Object
-
- ghidra.app.util.DataTypeDependencyOrderer
-
public class DataTypeDependencyOrderer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataTypeDependencyOrderer.Entry
-
Constructor Summary
Constructors Constructor Description DataTypeDependencyOrderer(DataTypeManager dtManager)
This constructor starts with an empty DataType list, which can be added to.DataTypeDependencyOrderer(DataTypeManager dtManager, java.util.ArrayList<DataType> dtlist)
This constructor takes an initial DataType list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addType(DataType dataType)
This method adds a single DataTypes to the input DataType list and marks the data as dirty (all must need recalculated).void
addTypeList(java.util.ArrayList<DataType> dtlist)
This method adds a list of DataTypes to the input DataType list and marks the data as dirty (all must need recalculated).void
clear()
This method clears the input DataType list and marks the data as dirty (all must need recalculated).Pair<java.util.ArrayList<DataType>,java.util.ArrayList<DataType>>
getAcyclicDependencyLists()
This method returns two lists: 1) is the set of structs.java.util.ArrayList<DataType>
getDependencyList()
This returns the acyclic dependency list (broken at structs and pointers to structs)java.util.ArrayList<DataType>
getStructList()
This method returns the ArrayList of structs to structs found in the input list, intended to be used initially as zero-sized structures.void
removeType(DataType dataType)
This method removes a DataType from the list and marks the data as dirty (all must need recalculated).
-
-
-
Constructor Detail
-
DataTypeDependencyOrderer
public DataTypeDependencyOrderer(DataTypeManager dtManager)
This constructor starts with an empty DataType list, which can be added to.- Parameters:
dtManager
- the manager used to extract IDs
-
DataTypeDependencyOrderer
public DataTypeDependencyOrderer(DataTypeManager dtManager, java.util.ArrayList<DataType> dtlist)
This constructor takes an initial DataType list.- Parameters:
dtManager
- the manager used to extract IDsdtlist
- Initial list of DataTypes to order
-
-
Method Detail
-
addType
public void addType(DataType dataType)
This method adds a single DataTypes to the input DataType list and marks the data as dirty (all must need recalculated).- Parameters:
dataType
- A single DataType to add to the input DataType list.
-
addTypeList
public void addTypeList(java.util.ArrayList<DataType> dtlist)
This method adds a list of DataTypes to the input DataType list and marks the data as dirty (all must need recalculated).- Parameters:
dtlist
- List of DataTypes to add to the input DataType list.
-
removeType
public void removeType(DataType dataType)
This method removes a DataType from the list and marks the data as dirty (all must need recalculated).- Parameters:
dataType
- The DataType to remove from the input list
-
clear
public void clear()
This method clears the input DataType list and marks the data as dirty (all must need recalculated).
-
getAcyclicDependencyLists
public Pair<java.util.ArrayList<DataType>,java.util.ArrayList<DataType>> getAcyclicDependencyLists()
This method returns two lists: 1) is the set of structs. Intended for outputting zero-sized definitions. 2) is the acyclic dependency list (broken at structs and pointers to structs) This works (and the dependency graph is able to be broken of cycles) because structures can be given zero size to start with and then later updated with full size.- Returns:
- pair of arrayLists--one of structs and one complete list of dependents
-
getStructList
public java.util.ArrayList<DataType> getStructList()
This method returns the ArrayList of structs to structs found in the input list, intended to be used initially as zero-sized structures.- Returns:
- An arrayList of structs
-
getDependencyList
public java.util.ArrayList<DataType> getDependencyList()
This returns the acyclic dependency list (broken at structs and pointers to structs)- Returns:
- An ArrayList of dependents.
-
-