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

Description

Stores override metadata for one virtual function.

interface IFoo { void F(); }
class Base : IFoo {
public virtual void F() {} // virtual newslot
public virtual void G() {}
}
class Derived : Base {
public new virtual void G() {} // newslot: hides, does not override Base.G
public sealed override void F() {} // final: no further overriders
void IFoo.F() {} // explicit: overrides IFoo.F via MethodImpl
}

Definition at line 193 of file ClassHierarchyAnalysis.h.

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

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

Public Types

using base = VirtualFunctionDescBase
 Base tuple type used for storage.
 

Public Member Functions

 VirtualFunctionDesc ()=delete
 Disabled because a virtual function descriptor needs a declaring class.
 
 ~VirtualFunctionDesc ()=default
 Default destructor.
 
 VirtualFunctionDesc (const VirtualFunctionDesc &other)=default
 Default copy constructor.
 
 VirtualFunctionDesc (VirtualFunctionDesc &&other)=default
 Default move constructor.
 
VirtualFunctionDesc & operator= (const VirtualFunctionDesc &other)=default
 Default copy assignment.
 
VirtualFunctionDesc & operator= (VirtualFunctionDesc &&other)=default
 Default move assignment.
 
 VirtualFunctionDesc (ClassKeyType clKey, bool pure)
 Constructs a descriptor for a virtual function declared in clKey.
 
ClassKeyType classId () const
 returns a the class where this function is declared
 
bool isPureVirtual () const
 Returns true when the represented function is pure virtual or abstract.
 
bool isFinal () const
 Returns true when the represented function cannot be overridden.
 
void isFinal (bool val)
 Records whether the represented function cannot be overridden.
 
const OverrideContainer & overriders () const
 returns a (const) reference to all functions that are overriding this function
 
OverrideContainer & overriders ()
 returns a (const) reference to all functions that are overriding this function
 
OverrideContainer & overridden ()
 returns a (const) reference to all functions that this function overrides
 
const OverrideContainer & overridden () const
 returns a (const) reference to all functions that this function overrides
 

Member Typedef Documentation

◆ base

using Rose::Common::Analysis::VirtualFunctionDesc::base = VirtualFunctionDescBase

Base tuple type used for storage.

Definition at line 197 of file ClassHierarchyAnalysis.h.

Constructor & Destructor Documentation

◆ VirtualFunctionDesc() [1/3]

Rose::Common::Analysis::VirtualFunctionDesc::VirtualFunctionDesc ( const VirtualFunctionDesc &  other)
default

Default copy constructor.

Parameters
otherdescriptor to copy.

◆ VirtualFunctionDesc() [2/3]

Rose::Common::Analysis::VirtualFunctionDesc::VirtualFunctionDesc ( VirtualFunctionDesc &&  other)
default

Default move constructor.

Parameters
otherdescriptor to move from.

◆ VirtualFunctionDesc() [3/3]

Rose::Common::Analysis::VirtualFunctionDesc::VirtualFunctionDesc ( ClassKeyType  clKey,
bool  pure 
)
inline

Constructs a descriptor for a virtual function declared in clKey.

Parameters
clKeyclass that declares the virtual function.
puretrue if the function is pure virtual or abstract.

Definition at line 226 of file ClassHierarchyAnalysis.h.

Member Function Documentation

◆ operator=() [1/2]

VirtualFunctionDesc & Rose::Common::Analysis::VirtualFunctionDesc::operator= ( const VirtualFunctionDesc &  other)
default

Default copy assignment.

Parameters
otherdescriptor to copy.
Returns
reference to this descriptor.

◆ operator=() [2/2]

VirtualFunctionDesc & Rose::Common::Analysis::VirtualFunctionDesc::operator= ( VirtualFunctionDesc &&  other)
default

Default move assignment.

Parameters
otherdescriptor to move from.
Returns
reference to this descriptor.

◆ classId()

ClassKeyType Rose::Common::Analysis::VirtualFunctionDesc::classId ( ) const
inline

returns a the class where this function is declared

Returns
class key for the declaring class.

Definition at line 232 of file ClassHierarchyAnalysis.h.

◆ isPureVirtual()

bool Rose::Common::Analysis::VirtualFunctionDesc::isPureVirtual ( ) const
inline

Returns true when the represented function is pure virtual or abstract.

Returns
true if this virtual function is pure virtual or abstract.

Definition at line 236 of file ClassHierarchyAnalysis.h.

◆ isFinal() [1/2]

bool Rose::Common::Analysis::VirtualFunctionDesc::isFinal ( ) const
inline

Returns true when the represented function cannot be overridden.

Returns
true if the bridge reported this function as final.

Definition at line 240 of file ClassHierarchyAnalysis.h.

◆ isFinal() [2/2]

void Rose::Common::Analysis::VirtualFunctionDesc::isFinal ( bool  val)
inline

Records whether the represented function cannot be overridden.

Parameters
valtrue if the function is final.

Definition at line 244 of file ClassHierarchyAnalysis.h.

◆ overriders() [1/2]

const OverrideContainer & Rose::Common::Analysis::VirtualFunctionDesc::overriders ( ) const
inline

returns a (const) reference to all functions that are overriding this function

Returns
mutable or const container of overriding functions.

Definition at line 249 of file ClassHierarchyAnalysis.h.

◆ overriders() [2/2]

OverrideContainer & Rose::Common::Analysis::VirtualFunctionDesc::overriders ( )
inline

returns a (const) reference to all functions that are overriding this function

Returns
mutable or const container of overriding functions.

Definition at line 250 of file ClassHierarchyAnalysis.h.

◆ overridden() [1/2]

OverrideContainer & Rose::Common::Analysis::VirtualFunctionDesc::overridden ( )
inline

returns a (const) reference to all functions that this function overrides

Returns
mutable or const container of overridden functions.

Definition at line 257 of file ClassHierarchyAnalysis.h.

◆ overridden() [2/2]

const OverrideContainer & Rose::Common::Analysis::VirtualFunctionDesc::overridden ( ) const
inline

returns a (const) reference to all functions that this function overrides

Returns
mutable or const container of overridden functions.

Definition at line 258 of file ClassHierarchyAnalysis.h.


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