GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Member Functions | Protected Member Functions | List of all members
SWU Class Reference

#include <swu.h>

Public Member Functions

 SWU (const std::string)
 
 ~SWU ()
 
void remove_from_datastructure ()
 
bool add_dependency (Dependency< SWU, SWU > *, Dependency< Module, Module > *)
 
bool remove_dependency (SWU *)
 
void add_module (Module *)
 
void add_executable (Executable *executable)
 
int remove_module (Module *)
 
int remove_executable (Executable *)
 
Modulefind_module (std::string)
 
std::string name () const
 Accessor for name.
 
ModuleSet * modules ()
 Accessor for the set of modules.
 
SwuDependencySet * dependencies ()
 Accessor for the set of dependencies.
 
SwuDependentSet * dependents ()
 Accessor for the set of dependents.
 
ExecutableSet * executables ()
 Accessor for the set of executables.
 
ModDependencySet * module_dependencies ()
 Accessor for the set of module dependencies.
 
ModDependentSet * module_dependents ()
 Accessor for the set of module dependents.
 
void update_file_count ()
 Function to update number of files in this swu.
 
int num_files ()
 accessor for the number of files in this swu
 
ModDependencySet sub_dependencies (Dependency< SWU, SWU > *dependency)
 

Protected Member Functions

bool add_dependent (Dependency< SWU, SWU > *, Dependency< Module, Module > *)
 
bool remove_dependent (SWU *)
 

Detailed Description

SWU class, represents a SWU (/Software Unit).

Used for storing sets of modules (/Load Blocks) and executables (/Run Blocks). The class also stores SWU to SWU dependency information created by the underlying modules.

Constructor & Destructor Documentation

SWU::SWU ( const std::string  s_name)

Constructor that takes a name as input.

Parameters
strings_name name of the swu.
SWU::~SWU ( )

Destructor

Member Function Documentation

bool SWU::add_dependency ( Dependency< SWU, SWU > *  swu_dep,
Dependency< Module, Module > *  mod_dep 
)

Adds a dependency to the current swu

Parameters
swuwhich swu the current swu have a dependency to
typewhich type of dependency, absolute or relative
bool SWU::add_dependent ( Dependency< SWU, SWU > *  swu_dep,
Dependency< Module, Module > *  mod_dep 
)
protected

Adds a dependent to the current swu

Parameters
swuwhich swu the current swu have a dependent from
typewhich type of dependent, absolute or relative
void SWU::add_executable ( Executable executable)

Adds an executable to the current swu

Parameters
executablemodule to be added.
void SWU::add_module ( Module m)

Adds a module to the current swu

Parameters
modulemodule to be added.
Module * SWU::find_module ( std::string  m_name)

Search for a module by its name

Parameters
m_namethe module name to search for
Returns
Pointer to Module if found, otherwise NULL
bool SWU::remove_dependency ( SWU swu)

Removes a dependency from the current swu

Parameters
swuwhich swu dependency to remove
bool SWU::remove_dependent ( SWU swu)
protected

Removes a dependent from the current swu

Parameters
swuwhich swu dependent to remove
void SWU::remove_from_datastructure ( )

Remove this SWU from all linked datastructures. If ever deleting the SWU manually without using the Linkler's destructor, then this needs to be run a prior to ensure that it is removed from all related datastructures.

int SWU::remove_module ( Module m)

Removes a module from the current swu

Parameters
modulemodule to be removed.
Returns
Number of removed modules
ModDependencySet SWU::sub_dependencies ( Dependency< SWU, SWU > *  dependency)

Get all sub-dependencies to a given dependency. This includes both to and from dependencies If the dependency doesn't have sub-dependencies an empty set will be returned


The documentation for this class was generated from the following files: