cbp2make
Makefile generation tool for Code::Blocks IDE
|
Dependency information for build units in a project. More...
#include <depsearch.h>
Public Member Functions | |
CPlatform & | Platform (void) |
Platform/OS type, generally used for creating compatible file paths. More... | |
void | Clear (void) |
Resets the unit dependency database to the initial state. More... | |
void | Show (void) |
Print dependency information for all of build units to the standard output. More... | |
CString | OneLineReport (const size_t Index, const bool Deps, const bool XRefs) |
Returns a short string representation of dependency information. More... | |
size_t | RecordsCount (void) const |
Returns the number of dependency records. More... | |
CString | Name (const size_t Index) const |
Returns name of a build unit with dependency record number Index. More... | |
size_t | DirectDependenciesCount (const size_t Index) const |
Counts direct dependencies of a build unit with dependency record number Index. More... | |
size_t | IndirectDependenciesCount (const size_t Index) |
Counts only indirect dependencies of a build unit with number Index. More... | |
size_t | AllDependenciesCount (const size_t Index) |
Returns the total count of dependencies of a build unit with dependency record number Index. More... | |
CStringList | DirectDependencies (const size_t Index) const |
Returns a list of build unit names that a build unit with dependency record number Index depends on directly. More... | |
CStringList | IndirectDependencies (const size_t Index) |
Returns a list of build unit names that a build unit with dependency record number Index depends on indirectly. More... | |
CStringList | AllDependencies (const size_t Index) |
Returns a complete list of build unit names that a build unit with dependency record number Index depends on directly or indirectly. More... | |
size_t | DirectCrossReferencesCount (const size_t Index) const |
Counts direct cross references to a build unit with dependency record number Index. More... | |
size_t | IndirectCrossReferencesCount (const size_t Index) |
Counts indirect cross references to a build unit with dependency record number Index. More... | |
size_t | AllCrossReferencesCount (const size_t Index) |
Returns the total count of cross references of a build unit with dependency record number Index. More... | |
CStringList | DirectCrossReferences (const size_t Index) const |
Returns a list of build unit names that directly depend on a build unit with dependency record number Index. More... | |
CStringList | IndirectCrossReferences (const size_t Index) |
Returns a list of build unit names that indirectly depend on a build unit with dependency record number Index. More... | |
CStringList | AllCrossReferences (const size_t Index) |
Returns a complete list of build unit names that depend on a build unit with dependency record number Index either directly or indirectly. More... | |
bool | AreDependenciesComplete (const size_t Index) |
Verifies if a dependency list for a build unit with dependency record number Index is marked as complete. More... | |
bool | AreCrossReferencesComplete (const size_t Index) |
Verifies if a cross reference list for a build unit with dependency record number Index is marked as complete. More... | |
void | SetDependenciesComplete (const size_t Index, const bool State=true) |
Marks a dependency list for a build unit with dependency record number Index as complete. More... | |
void | SetCrossReferencesComplete (const size_t Index, const bool State=true) |
Marks a cross reference list for a build unit with number Index as complete. More... | |
int | FindRecord (const CString &Name) |
Performs dependency record lookup by a build unit name. More... | |
size_t | AddRecord (const CString &Name) |
Adds a new dependency record for the Name build unit. More... | |
bool | AddDependency (const size_t Index, const CString &DependencyName) |
Adds the DependencyName build unit to a dependency record with number Index. More... | |
size_t | AddDependency (const CString &Name, const CString &DependencyName) |
Adds the DependencyName build unit to a dependency record of the Name build unit. More... | |
void | MakeRules (CMakefile &Makefile, const int Section, const bool Multiline) |
Generates makefile rules for build unit dependencies. More... | |
CDependencyInfo (void) | |
Creates build unit dependency database. More... | |
~CDependencyInfo (void) | |
Destroys build unit dependency database. More... | |
Private Member Functions | |
void | ResetMarkers (void) |
Clears CDependencyRecord::m_Marker for all records in CDependencyInfo::m_Records. More... | |
size_t | DependenciesCount (CDependencyRecord *Record) |
Returns the number of dependencies for a build unit pointed by Record. More... | |
CStringList | Dependencies (CDependencyRecord *Record) |
Returns the list of file names of build units that a build unit pointed by Record depends on. More... | |
size_t | CrossReferencesCount (CDependencyRecord *Record) |
Returns the number of cross references for a build unit pointed by Record. More... | |
CStringList | CrossReferences (CDependencyRecord *Record) |
Returns the list of file names of build units that depend on a build unit pointed by Record. More... | |
Private Attributes | |
CPlatform | m_Platform |
Platform/OS type, generally used for creating compatible file paths. More... | |
std::vector< CDependencyRecord * > | m_Records |
Database of build unit dependencies. More... | |
Dependency information for build units in a project.
Stores a database of build unit dependencies and cross references, searches and unwinds dependncies of a particular unit, writes makefile rules for unit dependencies. Generally speaking, CDependencyInfo tracks only dependencies between abstract names (strings), it doesn't really care whether those names are real file names or build units or not. The only exception to that is providing platform information to a dependency search filter like CIncludeSearchFilter and its descendants for building compatible file paths.
CDependencyInfo::CDependencyInfo | ( | void | ) |
Creates build unit dependency database.
CDependencyInfo::~CDependencyInfo | ( | void | ) |
Destroys build unit dependency database.
CDependencyInfo::AddDependency | ( | const size_t | Index, |
const CString & | DependencyName | ||
) |
Adds the DependencyName build unit to a dependency record with number Index.
Index | number of a dependency record of a build unit. |
DependencyName | name of another build unit. |
Adds the DependencyName build unit to a dependency record of the Name build unit.
Name | name of a build unit. |
DependencyName | name of another build unit. |
CDependencyInfo::AddRecord | ( | const CString & | Name | ) |
Adds a new dependency record for the Name build unit.
Name | name of a build unit. |
CDependencyInfo::AllCrossReferences | ( | const size_t | Index | ) |
Returns a complete list of build unit names that depend on a build unit with dependency record number Index either directly or indirectly.
Index | number of a dependency record. |
CDependencyInfo::AllCrossReferencesCount | ( | const size_t | Index | ) |
Returns the total count of cross references of a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::AllDependencies | ( | const size_t | Index | ) |
Returns a complete list of build unit names that a build unit with dependency record number Index depends on directly or indirectly.
Index | number of a dependency record. |
CDependencyInfo::AllDependenciesCount | ( | const size_t | Index | ) |
Returns the total count of dependencies of a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::AreCrossReferencesComplete | ( | const size_t | Index | ) |
Verifies if a cross reference list for a build unit with dependency record number Index is marked as complete.
Index | number of a dependency record. |
CDependencyInfo::AreDependenciesComplete | ( | const size_t | Index | ) |
Verifies if a dependency list for a build unit with dependency record number Index is marked as complete.
Index | number of a dependency record. |
CDependencyInfo::Clear | ( | void | ) |
Resets the unit dependency database to the initial state.
|
private |
Returns the list of file names of build units that depend on a build unit pointed by Record.
Record | dependency record of a build unit. |
|
private |
Returns the number of cross references for a build unit pointed by Record.
Record | dependency record of a build unit. |
|
private |
Returns the list of file names of build units that a build unit pointed by Record depends on.
Record | dependency record of a build unit. |
|
private |
Returns the number of dependencies for a build unit pointed by Record.
Record | dependency record of a build unit. |
CDependencyInfo::DirectCrossReferences | ( | const size_t | Index | ) | const |
Returns a list of build unit names that directly depend on a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::DirectCrossReferencesCount | ( | const size_t | Index | ) | const |
Counts direct cross references to a build unit with dependency record number Index.
Index | number of a build unit. |
CDependencyInfo::DirectDependencies | ( | const size_t | Index | ) | const |
Returns a list of build unit names that a build unit with dependency record number Index depends on directly.
Index | number of a dependency record. |
CDependencyInfo::DirectDependenciesCount | ( | const size_t | Index | ) | const |
Counts direct dependencies of a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::FindRecord | ( | const CString & | Name | ) |
Performs dependency record lookup by a build unit name.
Name | name of a build unit. |
CDependencyInfo::IndirectCrossReferences | ( | const size_t | Index | ) |
Returns a list of build unit names that indirectly depend on a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::IndirectCrossReferencesCount | ( | const size_t | Index | ) |
Counts indirect cross references to a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::IndirectDependencies | ( | const size_t | Index | ) |
Returns a list of build unit names that a build unit with dependency record number Index depends on indirectly.
Index | number of a dependency record. |
CDependencyInfo::IndirectDependenciesCount | ( | const size_t | Index | ) |
Counts only indirect dependencies of a build unit with number Index.
Index | number of a build unit. |
Indirect dependencies are dependencies of all build units that selected build unit with number Index depends on excluding these units.
CDependencyInfo::MakeRules | ( | CMakefile & | Makefile, |
const int | Section, | ||
const bool | Multiline | ||
) |
Generates makefile rules for build unit dependencies.
Makefile | a makefile object. |
Section | number of makefile section. |
Multiline | allows multi-line rules. |
CDependencyInfo::Name | ( | const size_t | Index | ) | const |
Returns name of a build unit with dependency record number Index.
Index | number of a dependency record. |
CDependencyInfo::OneLineReport | ( | const size_t | Index, |
const bool | Deps, | ||
const bool | XRefs | ||
) |
Returns a short string representation of dependency information.
Index | number a dependency record. |
Deps | enables output of dependencies. |
XRefs | enables output of cross references. |
|
inline |
Platform/OS type, generally used for creating compatible file paths.
CDependencyInfo::RecordsCount | ( | void | ) | const |
Returns the number of dependency records.
|
private |
Clears CDependencyRecord::m_Marker for all records in CDependencyInfo::m_Records.
This function should be called before unwinding a new dependency.
CDependencyInfo::SetCrossReferencesComplete | ( | const size_t | Index, |
const bool | State = true |
||
) |
Marks a cross reference list for a build unit with number Index as complete.
Index | number of a build unit. |
State | state of completeness. |
CDependencyInfo::SetDependenciesComplete | ( | const size_t | Index, |
const bool | State = true |
||
) |
Marks a dependency list for a build unit with dependency record number Index as complete.
Index | number of a dependency record. |
State | state of completeness. |
CDependencyInfo::Show | ( | void | ) |
Print dependency information for all of build units to the standard output.
|
private |
Platform/OS type, generally used for creating compatible file paths.
|
private |
Database of build unit dependencies.