2#ifndef ROSE_Common_Analysis_AbstractCompatibilityBridge_H
3#define ROSE_Common_Analysis_AbstractCompatibilityBridge_H 1
5#include <Rose/Common/Analysis/AnalysisTypes.h>
7namespace Rose::Common::Analysis
15using LanguageSpecificFn = std::function<void(ClassAnalysis&)>;
This is a stateless, abstract base class for implementing some functionality required by the class hi...
virtual bool isAbstract(ClassKeyType key) const =0
returns true if the class represented by key is an abstract class.
virtual bool isAutoGeneratable(const ClassAnalysis &classes, ClassKeyType clkey, FunctionKeyType fnkey) const
returns whether a function with fnkey's signature can be implicitly generated in clkey.
virtual void extractFromMemoryPool(ClassAnalysis &classes) const =0
extracts class information from the memory pool if available
virtual bool inheritedMethodsImplementVirtualBaseMethods() const
returns whether a method inherited along the non-virtual inheritance chain implements an otherwise un...
AbstractCompatibilityBridge()=default
Constructs a stateless compatibility bridge.
virtual void inheritanceEdges(ClassKeyType clkey, std::function< void(ClassKeyType, ClassKeyType, bool)> fn) const =0
calls the callback function fn(derived, base, isvirtual) for all direct base classes of clkey
virtual std::string nameOf(ClassKeyType key) const =0
returns the source name of the class represented by key.
virtual bool canOverride(FunctionKeyType drv, FunctionKeyType bas) const
returns whether drv may override bas under language rules beyond name and signature,...
virtual ~AbstractCompatibilityBridge()=default
Destroys a compatibility bridge through the base type.
virtual DataMemberType typeOf(VariableKeyType var) const =0
returns the type of a non-static data member var.
virtual FunctionTypeRelation haveSameOrCovariantReturn(const ClassAnalysis &classes, FunctionKeyType basId, FunctionKeyType drvId) const =0
tests if drvId has the same or covariant return type with respect to basId
virtual void extractFromProject(ClassAnalysis &classes, ASTRootType root) const =0
extracts class by walking the AST rooted at root.
virtual bool isPureVirtual(FunctionKeyType key) const =0
returns true if the class represented by key is an abstract function.
virtual LanguageSpecificFn languageSpecificProcessing() const =0
returns a function that handles language specific post-processing for the extract classes.
virtual int compareNames(FunctionKeyType lhs, FunctionKeyType rhs) const =0
compares the source name of the functions lhs and rhs.
virtual std::uint32_t languageStandard() const
returns the active language standard as a C++ __cplusplus-style value when available.
virtual bool canOverrideInContext(const ClassAnalysis &classes, ClassKeyType drvClass, FunctionKeyType drv, ClassKeyType basClass, FunctionKeyType bas) const
returns whether drv, declared in drvClass, may override bas, declared in basClass,...
virtual bool isInheritableImplementation(FunctionKeyType fnkey) const
returns whether the inherited function fnkey qualifies as an implementation of a virtual base functio...
virtual bool isFinal(FunctionKeyType fnkey) const
returns whether the virtual function fnkey cannot be overridden.
virtual std::string nameOf(FunctionKeyType key) const =0
returns the source name of the function represented by key.
virtual void explicitOverrides(const ClassAnalysis &classes, ClassKeyType cls, std::function< void(FunctionKeyType, FunctionKeyType)> fn) const
reports override relations that are declared explicitly instead of being derived from names and signa...
virtual int compareFunctionsByType(FunctionKeyType lhs, FunctionKeyType rhs, bool exclReturnType=true) const =0
compares the canonical types of functions lhs and rhs
holds data about all classes in a program
Describes the class-valued type and selected qualifiers of a data member.
Strongly typed wrapper around an abstract pointer-sized analysis key.