ROSE 2.23.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Rose::Common::Analysis::InheritanceDesc Struct Reference

Description

Describes one inheritance relationship for a class.

Note
isVirtual() also expresses interface implementation (Java and CIL interfaces are modeled as abstract virtual base classes). C++ virtual inheritance semantics derived from it (virtualBaseClassOrder, hasVirtualInheritance, hasVirtualTable) have no meaning for them, and the implied-override computation relies on this mapping.
interface IFoo {}
class Base {}
class Derived : Base, IFoo {} // Derived->Base: non-virtual edge, Derived->IFoo: virtual edge

Definition at line 83 of file ClassHierarchyAnalysis.h.

#include <Rose/Common/Analysis/ClassHierarchyAnalysis.h>

Inheritance diagram for Rose::Common::Analysis::InheritanceDesc:
Inheritance graph
[legend]
Collaboration diagram for Rose::Common::Analysis::InheritanceDesc:
Collaboration graph
[legend]

Public Types

using base = std::tuple< ClassKeyType, bool, bool >
 Base tuple type used for storage.
 

Public Member Functions

ClassKeyType getClass () const
 Returns the ancestor class key.
 
bool isVirtual () const
 Returns true when this relationship uses virtual inheritance.
 
bool isDirect () const
 Returns true when this relationship is a direct base-class edge.
 
void setDirect (bool v)
 Sets whether this relationship is direct.
 

Member Typedef Documentation

◆ base

Base tuple type used for storage.

Definition at line 87 of file ClassHierarchyAnalysis.h.

Member Function Documentation

◆ getClass()

ClassKeyType Rose::Common::Analysis::InheritanceDesc::getClass ( ) const
inline

Returns the ancestor class key.

Returns
class key for the ancestor in this inheritance relationship.

Definition at line 92 of file ClassHierarchyAnalysis.h.

◆ isVirtual()

bool Rose::Common::Analysis::InheritanceDesc::isVirtual ( ) const
inline

Returns true when this relationship uses virtual inheritance.

Returns
true if the inheritance edge is virtual.

Definition at line 96 of file ClassHierarchyAnalysis.h.

◆ isDirect()

bool Rose::Common::Analysis::InheritanceDesc::isDirect ( ) const
inline

Returns true when this relationship is a direct base-class edge.

Returns
true if the relationship is a direct base edge.

Definition at line 100 of file ClassHierarchyAnalysis.h.

Referenced by Rose::Common::Analysis::IsDirect::operator()().

◆ setDirect()

void Rose::Common::Analysis::InheritanceDesc::setDirect ( bool  v)
inline

Sets whether this relationship is direct.

Parameters
vtrue if the relationship is direct.

Definition at line 104 of file ClassHierarchyAnalysis.h.


The documentation for this struct was generated from the following file: