|
ROSE 2.23.0
|
Implements the Common compatibility interface for C++ ROSE AST nodes.
Definition at line 137 of file CppCompatibility.h.
#include <Rose/Source/Analysis/CppCompatibility.h>


Public Member Functions | |
| Rose::Common::Analysis::VariableKeyType | variableId (const SgInitializedName *var) const |
| Converts a ROSE initialized-name pointer to an abstract variable key. | |
| Rose::Common::Analysis::VariableKeyType | variableId (const SgVariableDeclaration *var) const |
| Converts a ROSE variable declaration pointer to an abstract variable key. | |
| Rose::Common::Analysis::FunctionKeyType | functionId (const SgFunctionDeclaration *fun) const |
| Converts a ROSE function declaration pointer to an abstract function key. | |
| std::string | nameOf (Rose::Common::Analysis::VariableKeyType key) const |
Returns the source name of a variable represented by key. | |
| std::string | nameOf (Rose::Common::Analysis::FunctionKeyType key) const override |
Returns the source name of a function represented by key. | |
| std::string | nameOf (Rose::Common::Analysis::ClassKeyType key) const override |
Returns the source name of a class represented by key. | |
| std::intptr_t | numericId (Rose::Common::Analysis::AnyKeyType id) const |
| Returns a numeric representation of any abstract key. | |
| std::string | uniqueName (Rose::Common::Analysis::AnyKeyType id) const |
| Returns a unique frontend-derived name for any abstract key. | |
| SourceLocation | location (Rose::Common::Analysis::AnyKeyType id, bool resolveInstantiations=false) const |
| Returns source location information for any abstract key. | |
| int | compareNames (Rose::Common::Analysis::FunctionKeyType lhs, Rose::Common::Analysis::FunctionKeyType rhs) const override |
| Compares function source names. | |
| int | compareFunctionTypes (Rose::Common::Analysis::FunctionTypeKeyType lhs, Rose::Common::Analysis::FunctionTypeKeyType rhs, bool exclReturnType=true) const |
| Compares two function types by canonical form. | |
| int | compareFunctionsByType (Rose::Common::Analysis::FunctionKeyType lhs, Rose::Common::Analysis::FunctionKeyType rhs, bool exclReturnType=true) const override |
| Compares two functions by canonical function type. | |
| int | compareTypes (Rose::Common::Analysis::TypeKeyType lhs, Rose::Common::Analysis::TypeKeyType rhs) const |
| Compares two non-function types by canonical form. | |
| Rose::Common::Analysis::FunctionTypeRelation | haveSameOrCovariantReturn (const Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::FunctionKeyType basId, Rose::Common::Analysis::FunctionKeyType drvId) const override |
Tests whether drvId has the same or a covariant return type relative to basId. | |
| Rose::Common::Analysis::FunctionTypeRelation | areSameOrCovariant (const Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::TypeKeyType basId, Rose::Common::Analysis::TypeKeyType drvId) const |
| Tests whether two type keys denote the same or covariant class type. | |
| void | extractFromMemoryPool (Rose::Common::Analysis::ClassAnalysis &classes) const override |
| Extracts C++ class information from the ROSE memory pool. | |
| void | extractFromProject (Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::ASTRootType root) const override |
Extracts C++ class information by traversing the AST rooted at root. | |
| Rose::Common::Analysis::LanguageSpecificFn | languageSpecificProcessing () const override |
| Returns C++-specific class-analysis post-processing. | |
| void | inheritanceEdges (Rose::Common::Analysis::ClassKeyType clkey, std::function< void(Rose::Common::Analysis::ClassKeyType, Rose::Common::Analysis::ClassKeyType, bool)> fn) const override |
Calls fn for each direct base-class edge of clkey. | |
| Rose::Common::Analysis::DataMemberType | typeOf (Rose::Common::Analysis::VariableKeyType var) const override |
| Returns the type summary of a non-static data member. | |
| bool | isPureVirtual (Rose::Common::Analysis::FunctionKeyType id) const override |
Returns true when id denotes a pure virtual C++ function. | |
| bool | hasDefinition (Rose::Common::Analysis::FunctionKeyType id) const |
Returns true when id has an attached function definition. | |
| bool | isAbstract (Rose::Common::Analysis::ClassKeyType clkey) const override |
Returns true when clkey denotes an abstract C++ class. | |
| Rose::Common::Analysis::FuncNameFn | functionNaming () const |
| Returns a function key naming callback. | |
| Rose::Common::Analysis::ClassNameFn | classNaming () const |
| Returns a class key naming callback. | |
| Rose::Common::Analysis::VarNameFn | variableNaming () const |
| Returns a variable key naming callback. | |
| bool | isAutoGeneratable (const Rose::Common::Analysis::ClassAnalysis &all, Rose::Common::Analysis::ClassKeyType clkey, Rose::Common::Analysis::FunctionKeyType fnkey) const override |
Returns true when fnkey can be implicitly generated for clkey. | |
| std::uint32_t | languageStandard () const override |
| Returns the detected C++ language standard value. | |
| SpecialMemberFunctionContainer | specialMemberFunctions (Rose::Common::Analysis::ClassKeyType clazz) const |
Extracts special member functions declared or generated for clazz. | |
| Optional | classType (Rose::Common::Analysis::FunctionKeyType fn) const |
Returns the class that owns fn when it can be determined. | |
Public Member Functions inherited from Rose::Common::Analysis::AbstractCompatibilityBridge | |
| AbstractCompatibilityBridge ()=default | |
| Constructs a stateless compatibility bridge. | |
| virtual | ~AbstractCompatibilityBridge ()=default |
| Destroys a compatibility bridge through the base type. | |
| 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 bool | inheritedMethodsImplementVirtualBaseMethods () const |
| returns whether a method inherited along the non-virtual inheritance chain implements an otherwise unimplemented function of a virtual base. | |
| virtual bool | isInheritableImplementation (FunctionKeyType fnkey) const |
returns whether the inherited function fnkey qualifies as an implementation of a virtual base function (see inheritedMethodsImplementVirtualBaseMethods). | |
| virtual bool | canOverride (FunctionKeyType drv, FunctionKeyType bas) const |
returns whether drv may override bas under language rules beyond name and signature, such as access control. | |
| virtual bool | isFinal (FunctionKeyType fnkey) const |
returns whether the virtual function fnkey cannot be overridden. | |
| 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 signatures. | |
| 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, with knowledge of the classes in between. | |
| Rose::Common::Analysis::VariableKeyType Rose::Source::Analysis::CppCompatibility::variableId | ( | const SgInitializedName * | var | ) | const |
Converts a ROSE initialized-name pointer to an abstract variable key.
| var | ROSE initialized-name pointer to wrap. |
var. | Rose::Common::Analysis::VariableKeyType Rose::Source::Analysis::CppCompatibility::variableId | ( | const SgVariableDeclaration * | var | ) | const |
Converts a ROSE variable declaration pointer to an abstract variable key.
| var | ROSE variable declaration pointer to wrap. |
var. | Rose::Common::Analysis::FunctionKeyType Rose::Source::Analysis::CppCompatibility::functionId | ( | const SgFunctionDeclaration * | fun | ) | const |
Converts a ROSE function declaration pointer to an abstract function key.
| fun | ROSE function declaration pointer to wrap. |
fun. | std::string Rose::Source::Analysis::CppCompatibility::nameOf | ( | Rose::Common::Analysis::VariableKeyType | key | ) | const |
Returns the source name of a variable represented by key.
| key | abstract variable key to name. |
key.
|
overridevirtual |
Returns the source name of a function represented by key.
| key | abstract function key to name. |
key. Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
|
overridevirtual |
Returns the source name of a class represented by key.
| key | abstract class key to name. |
key. Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
| std::intptr_t Rose::Source::Analysis::CppCompatibility::numericId | ( | Rose::Common::Analysis::AnyKeyType | id | ) | const |
Returns a numeric representation of any abstract key.
| id | abstract key variant to inspect. |
id. | std::string Rose::Source::Analysis::CppCompatibility::uniqueName | ( | Rose::Common::Analysis::AnyKeyType | id | ) | const |
Returns a unique frontend-derived name for any abstract key.
| id | abstract key variant to name. |
id. | SourceLocation Rose::Source::Analysis::CppCompatibility::location | ( | Rose::Common::Analysis::AnyKeyType | id, |
| bool | resolveInstantiations = false |
||
| ) | const |
Returns source location information for any abstract key.
| id | abstract key variant whose source location is requested. |
| resolveInstantiations | true to resolve template instantiation locations when supported. |
id.
|
overridevirtual |
Compares function source names.
| lhs | left-hand side function key. |
| rhs | right-hand side function key. |
Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
| int Rose::Source::Analysis::CppCompatibility::compareFunctionTypes | ( | Rose::Common::Analysis::FunctionTypeKeyType | lhs, |
| Rose::Common::Analysis::FunctionTypeKeyType | rhs, | ||
| bool | exclReturnType = true |
||
| ) | const |
Compares two function types by canonical form.
| lhs | left-hand side function type key. |
| rhs | right-hand side function type key. |
| exclReturnType | true to ignore top-level return type differences. |
|
overridevirtual |
Compares two functions by canonical function type.
| lhs | left-hand side function key. |
| rhs | right-hand side function key. |
| exclReturnType | true to ignore top-level return type differences. |
Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
| int Rose::Source::Analysis::CppCompatibility::compareTypes | ( | Rose::Common::Analysis::TypeKeyType | lhs, |
| Rose::Common::Analysis::TypeKeyType | rhs | ||
| ) | const |
Compares two non-function types by canonical form.
| lhs | left-hand side type key. |
| rhs | right-hand side type key. |
|
overridevirtual |
Tests whether drvId has the same or a covariant return type relative to basId.
| classes | class hierarchy used to evaluate covariance. |
| basId | base-class function key. |
| drvId | derived-class function key. |
basId and drvId. Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
| Rose::Common::Analysis::FunctionTypeRelation Rose::Source::Analysis::CppCompatibility::areSameOrCovariant | ( | const Rose::Common::Analysis::ClassAnalysis & | classes, |
| Rose::Common::Analysis::TypeKeyType | basId, | ||
| Rose::Common::Analysis::TypeKeyType | drvId | ||
| ) | const |
Tests whether two type keys denote the same or covariant class type.
| classes | class hierarchy used to evaluate covariance. |
| basId | base return type key. |
| drvId | derived return type key. |
basId and drvId.
|
overridevirtual |
Extracts C++ class information from the ROSE memory pool.
| classes | analysis object to populate. |
Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
|
overridevirtual |
Extracts C++ class information by traversing the AST rooted at root.
| classes | analysis object to populate. |
| root | abstract key for the AST root to traverse. |
Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
|
overridevirtual |
Returns C++-specific class-analysis post-processing.
Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
|
override |
Calls fn for each direct base-class edge of clkey.
| clkey | class whose direct inheritance edges are requested. |
| fn | callback invoked for each edge as (derived, base, isVirtual). |
|
overridevirtual |
Returns the type summary of a non-static data member.
| var | data member key to inspect. |
Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
|
overridevirtual |
Returns true when id denotes a pure virtual C++ function.
| id | function key to inspect. |
id denotes a pure virtual function. Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
| bool Rose::Source::Analysis::CppCompatibility::hasDefinition | ( | Rose::Common::Analysis::FunctionKeyType | id | ) | const |
Returns true when id has an attached function definition.
| id | function key to inspect. |
id has an attached definition.
|
overridevirtual |
Returns true when clkey denotes an abstract C++ class.
| clkey | class key to inspect. |
clkey denotes an abstract class. Implements Rose::Common::Analysis::AbstractCompatibilityBridge.
| Rose::Common::Analysis::FuncNameFn Rose::Source::Analysis::CppCompatibility::functionNaming | ( | ) | const |
Returns a function key naming callback.
| Rose::Common::Analysis::ClassNameFn Rose::Source::Analysis::CppCompatibility::classNaming | ( | ) | const |
Returns a class key naming callback.
| Rose::Common::Analysis::VarNameFn Rose::Source::Analysis::CppCompatibility::variableNaming | ( | ) | const |
Returns a variable key naming callback.
|
overridevirtual |
Returns true when fnkey can be implicitly generated for clkey.
| all | class analysis context. |
| clkey | class for which implicit generation is tested. |
| fnkey | function whose signature is tested. |
fnkey can be implicitly generated for clkey. Reimplemented from Rose::Common::Analysis::AbstractCompatibilityBridge.
|
overridevirtual |
Returns the detected C++ language standard value.
Reimplemented from Rose::Common::Analysis::AbstractCompatibilityBridge.
| SpecialMemberFunctionContainer Rose::Source::Analysis::CppCompatibility::specialMemberFunctions | ( | Rose::Common::Analysis::ClassKeyType | clazz | ) | const |
Extracts special member functions declared or generated for clazz.
| clazz | class whose special member functions are requested. |
clazz. | Optional Rose::Source::Analysis::CppCompatibility::classType | ( | Rose::Common::Analysis::FunctionKeyType | fn | ) | const |
Returns the class that owns fn when it can be determined.
| fn | function key to inspect. |