GraphTool
1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
|
#include <linkler.h>
Public Member Functions | |
Linkler () | |
Linkler (std::string f) | |
Linkler (Linkler &l) | |
~Linkler () | |
SWU * | add_swu (std::string s_name) |
Module * | add_module (std::string m_name, std::string type) |
Executable * | add_executable (std::string e_name, int esp_id) |
Module * | add_file_to_module (std::string m_name, std::string f_name) |
bool | add_dependency (std::string a_module, std::string b_module, bool b_mod_type) |
Module * | add_external_dependent (std::string m_name) |
Module * | remove_file_from_module (std::string m_name, std::string f_name) |
bool | assoc_module_swu (std::string m_name, std::string s_name) |
bool | assoc_module_executable (std::string m_name, std::string e_name) |
SWU * | find_swu (std::string s_name) |
Module * | find_module (std::string module_name) |
Executable * | find_executable (std::string exec_name) |
void | add_swus_to_executables () |
void | assoc_swu_to_exec (Executable *e) |
SWUSet * | get_full_swuset (std::string e_name) |
std::string | file_path () |
unsigned int | num_modules () |
SWUSet * | swus () |
Accessor for the set of swu pointers. | |
ModuleSet * | modules () |
Accessor for the set of module pointers. | |
ExecutableSet * | executables () |
Accessor for the set of executable pointers. | |
void | print_swu_dependency_types () |
Prints all swu dependency types to stdout (can be called from the XML Parser to make sure that all dependency types are correct) | |
void | print_module_dependency_types () |
Prints all module dependency types to stdout (can be called from the XML Parser to make sure that all dependency types are correct) | |
Linkler is a singleton class that is used to coordinate the loading of the XML input file. This is used to pass around the list of SWUS, Modules and Executables used, it can be used to add external dependencies. This class also handles the dependencies between modules and between swus as well as the connection between swus and executables (not an direct dependency).
Linkler::Linkler | ( | ) |
Constructor, takes no parameters
Linkler::Linkler | ( | std::string | f | ) |
Constructor which takes filepath to the xml-file loaded
Linkler::Linkler | ( | Linkler & | l | ) |
Copy constructor, performs a deep copy on the associated linkler structure
Linkler::~Linkler | ( | ) |
Destructor, clears the contained sets
bool Linkler::add_dependency | ( | std::string | a_module, |
std::string | b_module, | ||
bool | b_mod_type | ||
) |
Adds a dependency between given module names as well as their corresponding swus
a_module | name of the refFrom module |
b_module | name of the refTo module |
b_mod_type | type of the dependency, absolute/relative |
Executable * Linkler::add_executable | ( | std::string | e_name, |
int | esp_id | ||
) |
Adds an executable to this linkler
e_name | name of the executable to be added |
esp_id | the esp-id number of the executable |
Module * Linkler::add_external_dependent | ( | std::string | m_name | ) |
Adds a external dependency to given module (dependency that has no refFrom tag in the XML file)
Module * Linkler::add_file_to_module | ( | std::string | m_name, |
std::string | f_name | ||
) |
Adds a file to a module
m_name | name of module to recieve file |
f_name | name of file to be added |
Module * Linkler::add_module | ( | std::string | m_name, |
std::string | type | ||
) |
Adds a module to this linkler
m_name | name of the module to be added |
type | memoryType of the module |
SWU * Linkler::add_swu | ( | std::string | s_name | ) |
Adds a swu to this linkler
s_name | name of the swu to be added |
void Linkler::add_swus_to_executables | ( | ) |
Adds corresponding swus to their respective executables with information from modules. Should ONLY be called after adding all modules and swus.
bool Linkler::assoc_module_executable | ( | std::string | m_name, |
std::string | e_name | ||
) |
Associates the given module with the given Executable.
m_name | module to be updated |
e_name | Executable to associate module with |
bool Linkler::assoc_module_swu | ( | std::string | m_name, |
std::string | s_name | ||
) |
void Linkler::assoc_swu_to_exec | ( | Executable * | e | ) |
Helper function for add_swus_to_executables
e | executable that will recieve swus |
std::string Linkler::file_path | ( | ) |
Accessor method for the file path associated with this linkler.
Executable * Linkler::find_executable | ( | std::string | exec_name | ) |
Find Executable by name, returns null if not found.
exec_name | name of Executable to be found |
Module * Linkler::find_module | ( | std::string | module_name | ) |
SWU * Linkler::find_swu | ( | std::string | s_name | ) |
SWUSet * Linkler::get_full_swuset | ( | std::string | e_name | ) |
Will return a swuset that will include all swus with any modules in the given executable.
@return | pointer to full swuset of given executable |
unsigned int Linkler::num_modules | ( | ) |
Returns the number of modules (pointers) in the module set
Module * Linkler::remove_file_from_module | ( | std::string | m_name, |
std::string | f_name | ||
) |
Removes a file with the given name from a module with the given name
m_name | name of module to remove file from |
f_name | name of file to remove |