HeaderDoc::Dependency

Declared In:

Introduction

Represents an inter-header dependency.

Discussion

Instances of this class describe dependencies between headers.A

The actual dependency ordering process is described in the documentation for the fix_dependency_order function.



Member Functions

_initialize

Initializes an instance of a Dependency object.

addchild

Adds a dependency.

clone

Duplicates this Dependency object into another one.

dbprint

Prints the object for debugging purposes.

depname

Gets/sets the short name for this header/dependency.

findname

Returns the dependency object for a given header filename.

name

Gets/sets the name for this header/dependency.

new

Creates a new Dependency object.

reparent

Reparents a depdency under another one.


_initialize


Initializes an instance of a Dependency object.

Parameters
self

The object to initialize.


addchild


Adds a dependency.

sub addchild 
Parameters
self

The Dependency object for the current header.

name

The child Dependency object for the header this header includes.


clone


Duplicates this Dependency object into another one.

sub clone 
Parameters
self

The object to clone.

clone

The victim object.


dbprint


Prints the object for debugging purposes.

sub dbprint 

depname


Gets/sets the short name for this header/dependency.

sub depname 
Parameters
self

The Dependency object.

name

The new name. (Optional.)

Discussion

The depname value contains the name of the header without any leading path parts. The name value contains the name of the header with any leading path parts.


findname


Returns the dependency object for a given header filename.

sub findname 
Parameters
self

The Dependency object.

name

The name to look up.


name


Gets/sets the name for this header/dependency.

sub name 
Parameters
self

The Dependency object.

name

The new name. (Optional.)

Discussion

The name value contains the name, including any leading path parts. The depname value contains the name of the header without any leading path parts.


new


Creates a new Dependency object.

sub new 
Parameters
param

A reference to the relevant package object (e.g. HeaderDoc::Dependency->new() to allocate a new instance of this class).


reparent


Reparents a depdency under another one.

sub reparent 
Discussion

Currently unused.


Member Data

CHILDREN

An array of references to other dependency nodes for the headers that this header includes.

DEPNAME

The name of the header with leading path parts stripped off.

DEPTH

The depth for the deepest place that this header appears within the dependency tree. Used in a depth-first traversal of the tree.

EXISTS

Set to 1 if this header was one of the headers listed on the command line.

HeaderDoc::Dependency::VERSION

The revision control revision number for this module.

MARKED

Used by upper layers.

NAME

The name of the header.

PARENT

The parent for this dependency (the header that has a #include directive for this one).

PRINTED

Used to flag nodes already traversed. This prevents the possibility of loops in the graph from causing incorrect behavior (a hang).


CHILDREN


An array of references to other dependency nodes for the headers that this header includes.

$self->{CHILDREN}

DEPNAME


The name of the header with leading path parts stripped off.

$self->{DEPNAME}

DEPTH


The depth for the deepest place that this header appears within the dependency tree. Used in a depth-first traversal of the tree.

$self->{DEPTH}

EXISTS


Set to 1 if this header was one of the headers listed on the command line.

$self->{EXISTS}

HeaderDoc::Dependency::VERSION


The revision control revision number for this module.

$HeaderDoc::Dependency::VERSION = '$Revision: 1298084578 $';  
Discussion

In the git repository, contains the number of seconds since January 1, 1970.


MARKED


Used by upper layers.

$self->{MARKED}

NAME


The name of the header.

$self->{NAME}

PARENT


The parent for this dependency (the header that has a #include directive for this one).

$self->{PARENT}

PRINTED


Used to flag nodes already traversed. This prevents the possibility of loops in the graph from causing incorrect behavior (a hang).

$self->{PRINTED}