ROSE 2.23.0
Loading...
Searching...
No Matches
CilCompatibility.h
1
2#ifndef ROSE_BinaryAnalysis_ByteCode_ClassHierarchy_CilCompatibility_H
3#define ROSE_BinaryAnalysis_ByteCode_ClassHierarchy_CilCompatibility_H 1
4
5#include <RoseFirst.h>
6#include <functional>
7#include <memory>
8#include <string>
9
10#include <Rose/Common/Analysis/AnalysisTypes.h>
11#include <Rose/Common/Analysis/AbstractCompatibilityBridge.h>
12
13namespace Rose::BinaryAnalysis::ByteCode::ClassHierarchy
14{
15
18struct CilMetadataCache;
19
28{
29 public:
30
34 std::string nameOf(Rose::Common::Analysis::FunctionKeyType key) const override;
35
36
40 std::string nameOf(Rose::Common::Analysis::ClassKeyType key) const override;
41
42
47
48
55
56
61
62
72
73
87
88
97 Rose::Common::Analysis::FunctionTypeRelation
99
100
110 void
114 ) const override;
115
127 bool
133 ) const override;
134
135
144
145
155
156
162 Rose::Common::Analysis::LanguageSpecificFn
164
165
173 ) const override;
174
175
181
182 private:
184 CilMetadataCache& cache() const;
185
187 void resetCache() const;
188
189 mutable std::shared_ptr<CilMetadataCache> cacheStore;
190};
191
192}
193
194#endif /* ROSE_BinaryAnalysis_ByteCode_ClassHierarchy_CilCompatibility_H */
a mapping of CIL related AST nodes in ROSE to fundamental functions of the class hierarchy analysis.
bool isPureVirtual(Rose::Common::Analysis::FunctionKeyType key) const override
returns true if the class represented by key is an abstract function.
std::string nameOf(Rose::Common::Analysis::FunctionKeyType key) const override
returns the source name of the function represented by key.
Rose::Common::Analysis::FunctionTypeRelation haveSameOrCovariantReturn(const Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::FunctionKeyType basId, Rose::Common::Analysis::FunctionKeyType drvId) const override
tests if drvId has the same or covariant return type with respect to basId
void explicitOverrides(const Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::ClassKeyType cls, std::function< void(Rose::Common::Analysis::FunctionKeyType, Rose::Common::Analysis::FunctionKeyType)> fn) const override
reports the explicit overrides (MethodImpl table) of cls.
std::string nameOf(Rose::Common::Analysis::ClassKeyType key) const override
returns the source name of the class represented by key.
Rose::Common::Analysis::LanguageSpecificFn languageSpecificProcessing() const override
returns CIL-specific class post-processing.
Rose::Common::Analysis::DataMemberType typeOf(Rose::Common::Analysis::VariableKeyType var) const override
returns the type of a non-static data member var.
bool isAbstract(Rose::Common::Analysis::ClassKeyType key) const override
returns true if the class represented by key is an abstract class.
void extractFromProject(Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::ASTRootType root) const override
extracts class by walking the AST rooted at root.
bool canOverrideInContext(const Rose::Common::Analysis::ClassAnalysis &classes, Rose::Common::Analysis::ClassKeyType drvClass, Rose::Common::Analysis::FunctionKeyType drv, Rose::Common::Analysis::ClassKeyType basClass, Rose::Common::Analysis::FunctionKeyType bas) const override
int compareFunctionsByType(Rose::Common::Analysis::FunctionKeyType lhs, Rose::Common::Analysis::FunctionKeyType rhs, bool exclReturnType=true) const override
compares the canonical types of functions lhs and rhs
int compareNames(Rose::Common::Analysis::FunctionKeyType lhs, Rose::Common::Analysis::FunctionKeyType rhs) const override
compares the source name of the functions lhs and rhs.
void extractFromMemoryPool(Rose::Common::Analysis::ClassAnalysis &classes) const override
extracts class information from the memory pool if available
void inheritanceEdges(Rose::Common::Analysis::ClassKeyType clkey, std::function< void(Rose::Common::Analysis::ClassKeyType, Rose::Common::Analysis::ClassKeyType, bool)> fn) const override
calls the callback function fn(derived, base, isvirtual) for all direct base classes of clkey
bool isFinal(Rose::Common::Analysis::FunctionKeyType key) const override
returns true if the function represented by key is final.
This is a stateless, abstract base class for implementing some functionality required by the class hi...
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.