6.5.3.3. Edges (Dependencies)¶
As with node types, the edge types that are used for modeling C are also used for C++. In addition, the following edge types are either used for C++ only or their meaning is extended for C++.
Alignof_Of_Type¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An edge e → T of type
Alignof_Of_Type represents the fact that entity e contains a
alignof expression using type T as operand.
Catch¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An
Catch edge e → T represents the fact
that in entity e there exists an exception handler for exceptions of type
t.
Declared_In¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
A function member is defined outside its declaring type.
Dispatching_Call¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Description
A dispatching call edge models a virtual call of a function member.
Extend¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
A
Extend edge t₁→ t₂ indicates that
entity t₁ inherits from t₂. The attributes
Element.Has_Public_Visibility,
Element.Has_Protected_Visibility and
Element.Has_Private_Visibility indicate the kind of inheritance. The
attribute Element.Is_Virtual_Inheritance indicates a virtual inheritance
relationship.
Grant_Friendship_To¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
A
Grant_Friendship_To edge
e₁→ e₂ represents the fact that entity e₁ grants
friendship to entity e₂ (e.g. caused by a friend declaration between two
classes).
Implicit_Call¶

Possible Source and Target Nodes
Only subtypes of this edge appear in views.
Description
An
Implicit_Call e→ r represents a
call from entity e to another entity r which the user has not explicitly
written into the code, e.g., a call to an implicit type conversion operator.
Implicit_Dispatching_Call¶

Possible Source and Target Nodes
Only subtypes of this edge appear in views.
Description
An
Implicit_Dispatching_Call represents a
dispatching call the user has not explicitly written into the code.
Implicit_Static_Call¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An
Implicit_Static_Call represents a static
call the user has not explicitly written into the code.
Inherit¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
Description
Edges of type
Inherit are inserted if the following
scenario occurs: A type B inherits from a type A. A
contains a definition for a method m, and B does not override it. If
in the code a call b.m(…) occurs, where the static type of the caller is
B, a “copy” m(B) of m is placed within the node B,
which is then the target of the call, and an edge m(B) → m of type
Inherit is inserted. The same applies in the case of
members. This special treatment is necessary to support e.g. the reflexion analysis for
detecting architectural flaws.
Instance_Of¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
A
Instance_Of edge e → T represents
the fact that entity e (e.g. a type) is a template instance of entity t
(which is one of the subtypes of
Template).
Instantiate¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An
Instantiate e₁→ e₂ indicates
that entity e₁ is using (instantiating) a template instance of a template
entity e₂.
Method_Address¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
Description
A
Method_Address edge is a special case of a
Routine_Address, but for a pointer-to-method usage.
New_Of_Type¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An edge e → T of type
New_Of_Type
represents the fact that entity e contains a new() expression, instantiating
an object of type T.
Override¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
Description
A
Override edge m₁→ m₂ indicates
that method m₁ overrides another method m₂ (contained in a type that
the type in which m₁ is defined inherits from).
Figure Inherit and Override edges for function members. shows function members inside classes and
their inheritance relationships.
Note
Code Example
class GrandParent
{
public:
virtual void method(void) {};
int field;
static void staticMethod(void) {};
};
class Parent : public GrandParent {};
class Child : public Parent
{
public:
void method (void) {};
int field; // additional field!
};
void caller1(void)
{
Child *ch = new Child();
ch->method();
ch->field = 42;
static_cast<GrandParent*>(ch)->field = 42;
ch->staticMethod();
}
void caller2(void)
{
Parent *p = new Parent();
p->method();
p->field = 42;
}
void caller3(void)
{
GrandParent *gp = new GrandParent();
gp->method();
gp->field = 42;
}
Inherit and Override edges for function members.¶
Template_Argument¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An edge e → T of type
Template_Argument represents the fact that T is used as a template
argument in the context of entity e.
For example, Figure Template_Argument edge from f to B. shows the generated
Template_Argument edge for function f to class B from the code
example.
Note
Code Example
class B {};
template <typename T> class A {};
void f() { A<B> a; }
Template_Argument edge from f to B.¶
Throw¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An edge e → T of type
Throw represents the
fact that in entity e an exception of type t might be thrown (by a
throw statement).
Typeid_Of_Type¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An edge e → T of type
Typeid_Of_Type represents the fact that entity e contains a
typeid expression using type T as operand.
Typeof_Of_Type¶

Possible Source and Target Nodes
Source type |
Target type |
Views |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
An edge e → T of type
Typeof_Of_Type represents the fact that entity e contains a
typeof expression using type T as operand.